This is more complexity than I currently need here.
Just a simple poll which is done at EOD for market open trades (if any).
That¡¯s about it.
Super-basic.
Just need to know how to read the all_positions and all_navs structures.
Maybe just a for loop with a print?
toggle quoted message
Show quoted text
On Jun 11, 2021, at 8:54 AM, RobDawg35 <rob.sandberg26@...> wrote:
I have set this up to be stored on a database with each script continually grabbing the current position. This way, once you exit IB over the weekend, you can start up the scripts again and they know exactly where you are in a trade. Can easily attach a tag to each position.
On Fri, Jun 11, 2021 at 9:52 AM Stuart Cracraft via groups.io <smcracraft@...> wrote:
Hi,
Thanks for that.
I stood it up and get this:
$ ./new.py
Testing IB's API as an imported library:
Waiting for IB's API response for accounts positions requests...
Waiting for IB's API response for NAVs requests¡
$
So it¡¯s not reporting all the individual position tickers and quantity and total settled cash maybe because of this:
print("Testing IB's API as an imported library:")
all_positions = read_positions()
all_navs = read_navs()
I would like to know how to read the all_positions and all_navs structures to extract the above tickers/quantity/settled cash
as that would be solution here.
Happy to upvote it too.
Stuart
On Jun 11, 2021, at 7:36 AM, Rational-IM <ds@...> wrote:
Hello Stuart:
I discussed this issue on an old post at Stackoverflow:
If you like, vote it up (question and answer) - might help others to find it too.
Have a great weekend.