Is position duration tracking supported? #37
-
Hi all, is there a way to track for how long the position is open ? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I would suggest to try |
Beta Was this translation helpful? Give feedback.
-
Also worth noting the IBKR API only returns executions and fills from the past 1-2 days at most before deleting them forever from the API output. So your choices are:
Also, if you are running multiple client ids for your API clients, only the client id where a trade executes will receive a live execution notification, but you can fetch all executions/fills for all clients at any time using |
Beta Was this translation helpful? Give feedback.
I would suggest to try
IB.fills()
, it will tell you open/close times. It has a "but", you need to aggregate and match fills