We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
下記のようなエラーメッセージが表示され、注文が通りません。
E, [2019-03-07T12:02:47.552307 #1] ERROR -- : An error as occured while processing response. Status 400 {"orderRejectTransaction":{"type":"MARKET_IF_TOUCHED_ORDER_REJECT","instrument":"USD_JPY","units":"300","price":"110.79999999999999","timeInForce":"GTC","triggerCondition":"DEFAULT","partialFill":"DEFAULT","positionFill":"DEFAULT","reason":"CLIENT_ORDER","rejectReason":"PRICE_PRECISION_EXCEEDED","id":"6864","accountID":"001-009-1939778-001","userID":1939778,"batchID":"6864","requestID":"78566986778195099","time":"2019-03-07T12:02:47.539716401Z"},"relatedTransactionIDs":["6864"],"lastTransactionID":"6864","errorMessage":"The price specified contains more precision than is allowed for the instrument","errorCode":"PRICE_PRECISION_EXCEEDED"} (OandaApiV20::RequestError) /usr/local/bundle/gems/oanda_api_v20-2.0.0/lib/oanda_api_v20/api.rb:59:in rescue in method_missing' /usr/local/bundle/gems/oanda_api_v20-2.0.0/lib/oanda_api_v20/api.rb:54:in method_missing' /app/jiji2/src/jiji/model/securities/internal/oanda/ordering.rb:21:in order' /app/jiji2/src/jiji/model/trading/brokers/abstract_broker.rb:190:in order' /app/jiji2/src/jiji/model/trading/brokers/abstract_broker.rb:75:in buy' /app/jiji2/src/jiji/model/trading/brokers/broker_proxy.rb:33:in buy' agent/USD.rb:229:in register_order' agent/USD.rb:122:in register_order' agent/USD.rb:82:in block in register_orders' agent/USD.rb:102:in block in each_traps' agent/USD.rb:99:in times' agent/USD.rb:99:in each_traps' agent/USD.rb:80:in register_orders' agent/USD.rb:29:in next_tick' /app/jiji2/src/jiji/model/agents/agents.rb:35:in block in next_tick' /app/jiji2/src/jiji/model/agents/agents.rb:33:in each' /app/jiji2/src/jiji/model/agents/agents.rb:33:in next_tick' /app/jiji2/src/jiji/model/trading/jobs/notify_next_tick_job.rb:15:in exec' /app/jiji2/src/jiji/model/trading/process.rb:35:in do_next_job' /app/jiji2/src/jiji/model/trading/process.rb:28:in run' /app/jiji2/src/jiji/model/trading/process.rb:22:in block in start' /usr/local/bundle/gems/thread-0.2.2/lib/thread/pool.rb:67:in execute' /usr/local/bundle/gems/thread-0.2.2/lib/thread/pool.rb:405:in block (2 levels) in spawn_thread' /usr/local/bundle/gems/thread-0.2.2/lib/thread/pool.rb:372:in loop' /usr/local/bundle/gems/thread-0.2.2/lib/thread/pool.rb:372:in `block in spawn_thread'
rescue in method_missing' /usr/local/bundle/gems/oanda_api_v20-2.0.0/lib/oanda_api_v20/api.rb:54:in
order' /app/jiji2/src/jiji/model/trading/brokers/abstract_broker.rb:190:in
buy' /app/jiji2/src/jiji/model/trading/brokers/broker_proxy.rb:33:in
register_order' agent/USD.rb:122:in
block in register_orders' agent/USD.rb:102:in
times' agent/USD.rb:99:in
register_orders' agent/USD.rb:29:in
block in next_tick' /app/jiji2/src/jiji/model/agents/agents.rb:33:in
next_tick' /app/jiji2/src/jiji/model/trading/jobs/notify_next_tick_job.rb:15:in
do_next_job' /app/jiji2/src/jiji/model/trading/process.rb:28:in
block in start' /usr/local/bundle/gems/thread-0.2.2/lib/thread/pool.rb:67:in
block (2 levels) in spawn_thread' /usr/local/bundle/gems/thread-0.2.2/lib/thread/pool.rb:372:in
The text was updated successfully, but these errors were encountered:
PRICE_PRECISION_EXCEEDED ですので指値( "price":"110.79999999999999" )の桁数が多すぎるためエラーになっていると思われます。round 等を使用して桁数を調整してみてください。
PRICE_PRECISION_EXCEEDED
"price":"110.79999999999999"
round
Sorry, something went wrong.
http://jiji2.unageanu.net/usage/030400_trap_repeat_if_done_agent.html を特に触らずに使っています。 しばらく放置してたら、注文は通るようになりました。
注文は通るのですが、take profitの値が反映されないようです。
なるほど、、、ご報告ありがとうございます。 OANDA API v20への移行の影響で take profit の指定方法が変わったのでその影響で動作しなくなっているようです。時間を見て修正しておきます。
take profit
No branches or pull requests
下記のようなエラーメッセージが表示され、注文が通りません。
E, [2019-03-07T12:02:47.552307 #1] ERROR -- : An error as occured while processing response. Status 400
{"orderRejectTransaction":{"type":"MARKET_IF_TOUCHED_ORDER_REJECT","instrument":"USD_JPY","units":"300","price":"110.79999999999999","timeInForce":"GTC","triggerCondition":"DEFAULT","partialFill":"DEFAULT","positionFill":"DEFAULT","reason":"CLIENT_ORDER","rejectReason":"PRICE_PRECISION_EXCEEDED","id":"6864","accountID":"001-009-1939778-001","userID":1939778,"batchID":"6864","requestID":"78566986778195099","time":"2019-03-07T12:02:47.539716401Z"},"relatedTransactionIDs":["6864"],"lastTransactionID":"6864","errorMessage":"The price specified contains more precision than is allowed for the instrument","errorCode":"PRICE_PRECISION_EXCEEDED"} (OandaApiV20::RequestError)
/usr/local/bundle/gems/oanda_api_v20-2.0.0/lib/oanda_api_v20/api.rb:59:in
rescue in method_missing' /usr/local/bundle/gems/oanda_api_v20-2.0.0/lib/oanda_api_v20/api.rb:54:in
method_missing'/app/jiji2/src/jiji/model/securities/internal/oanda/ordering.rb:21:in
order' /app/jiji2/src/jiji/model/trading/brokers/abstract_broker.rb:190:in
order'/app/jiji2/src/jiji/model/trading/brokers/abstract_broker.rb:75:in
buy' /app/jiji2/src/jiji/model/trading/brokers/broker_proxy.rb:33:in
buy'agent/USD.rb:229:in
register_order' agent/USD.rb:122:in
register_order'agent/USD.rb:82:in
block in register_orders' agent/USD.rb:102:in
block in each_traps'agent/USD.rb:99:in
times' agent/USD.rb:99:in
each_traps'agent/USD.rb:80:in
register_orders' agent/USD.rb:29:in
next_tick'/app/jiji2/src/jiji/model/agents/agents.rb:35:in
block in next_tick' /app/jiji2/src/jiji/model/agents/agents.rb:33:in
each'/app/jiji2/src/jiji/model/agents/agents.rb:33:in
next_tick' /app/jiji2/src/jiji/model/trading/jobs/notify_next_tick_job.rb:15:in
exec'/app/jiji2/src/jiji/model/trading/process.rb:35:in
do_next_job' /app/jiji2/src/jiji/model/trading/process.rb:28:in
run'/app/jiji2/src/jiji/model/trading/process.rb:22:in
block in start' /usr/local/bundle/gems/thread-0.2.2/lib/thread/pool.rb:67:in
execute'/usr/local/bundle/gems/thread-0.2.2/lib/thread/pool.rb:405:in
block (2 levels) in spawn_thread' /usr/local/bundle/gems/thread-0.2.2/lib/thread/pool.rb:372:in
loop'/usr/local/bundle/gems/thread-0.2.2/lib/thread/pool.rb:372:in `block in spawn_thread'
The text was updated successfully, but these errors were encountered: