3

I have looked at this query Interactive Brokers API: Trader Workstation (TWS) vs IB Gateway It does not answer my question of: If I push an order through IB's gateway, will I be able to see the same open order position within TWS? This is of course using the same IB trading account. Thanks

Community
  • 1
  • 1
Bryan Downing
  • 207
  • 2
  • 14

2 Answers2

5

From my experience the answer is no. I have a program that executes trades through the API that runs using the IB Gateway on a virtual machine on AWS. When I log in through the TWS interface I don't see the trades that were executed through the gateway, but the portfolio balances reflect the fact that the trades actually occurred. I'm trying to figure out now how to view the trade data (execution price, commission) related to the Gateway-initiated trades.

If anyone knows a way to see this trade data in TWS I would sure like to know. Perhaps there is a setting that can be changed?

Tom Wilson
  • 51
  • 2
  • Under Account Settings -> Users & Access Rights, you can add a new user to the same account. Once you have two users, they shouldn't kick each other out on login. – Zsolt Safrany Aug 23 '20 at 20:56
  • I have a similar problem: I submitted trades while being connected via TWS. I can fetch open positions/orders via API without any issues. Once I connect to the same account (same login credentials) via GW, I can fetch the open positions but not the open/pending orders. Any idea on why that is the case? I use the same clientId at login. – Mikkel Dec 30 '21 at 11:20
2

Yes, if you submit an order via an API client connected to the IB Gateway, you will see it in TWS if you connect to the same account.

Note that you do need different users for Gateway and TWS. The reason is that each user is tied to market data subscriptions, most of which incur a monthly fee and have rate limitations. If you could log in with the same user more than once, you'd get essentially unlimited market data for the same price.

Dan Dascalescu
  • 143,271
  • 52
  • 317
  • 404