How to access the positions direction from exchange? #609
-
I am running a live code on binance,I found that when I manually close all order on binance website,My strategy cannot recevied a feedback,it still think it has a position.I find that the strategy not directly query position from exhcange, where the code did not add position infomation to the account. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Hi @graceyangfan just so I understand the context better, when you say that it still thinks it has a position - was this on start-up or shutdown? Also, are you using a Redis backed cache, or in-memory (either should work). On startup the |
Beta Was this translation helpful? Give feedback.
Hi @graceyangfan just so I understand the context better, when you say that it still thinks it has a position - was this on start-up or shutdown? Also, are you using a Redis backed cache, or in-memory (either should work).
On startup the
LiveExecutionEngine
will callreconcile_state
on every adapter. All specific implementations work slightly differently, however in the case of Binance Futures it will query for all open order and positions which are open according to the exchange, and also all orders and positions which Nautilus believes to be open based on its current state. This is because unfortunately Binance don't allow you to query closed orders unless you pass a specific symbol, wh…