Interactive Brokers icon

Interactive Brokers

Interact with Interactive Brokers TWS API

Actions7

Position → Get All

AI-generated

Summary

Retrieve all open positions from Interactive Brokers TWS API, returning detailed position information segmented by account.

Inputs

None.

Output shape

a list of position objects, each including the account identifier and position details

The list contains one entry per position or a message object if no positions are found or if the TWS API is not connected. The operation subscribes to position updates, waits approximately 5 seconds to collect data, then unsubscribes before returning the collected positions.

Discussion