Open Orders

View as MarkdownOpen in Claude

get_open_orders(

timeout: Integer. A default value of 3 seconds is supplied.

)

app.get_open_orders()

All orders from the current day’s trading session are returned in a dictionary, using the orderId as the key to discover the specific order.

Response Object

{
{Order ID}: Dictionary. Returns the [Contract](/tws-api/doc/contracts-financial-instruments/the-contract-object), [Order](/tws-api/doc/orders/the-order-and-contract-objects), and [OrderState] objects of the affiliated orderId.
{
orderId: Integer. The identifier for the order. Relevant for order tracking, modification, and cancellation.

contract: [Contract Object](/tws-api/doc/contracts-financial-instruments/the-contract-object). Contract to trade.

order: [Order Object](/tws-api/doc/orders/the-order-and-contract-objects). Parameters for the given order to execute.

orderState: [OrderState Object]. Current state of the order. Contains margin impact and status details.

}

{351: {'orderId': 351, 'contract': 2172957720272: ConId: 265598, Symbol: AAPL, SecType: STK, LastTradeDateOrContractMonth: , Strike: 0, Right: , Multiplier: , Exchange: SMART, PrimaryExchange: , Currency: USD, LocalSymbol: AAPL, TradingClass: NMS, IncludeExpired: False, SecIdType: , SecId: , Description: , IssuerId: Combo:, 'order': 2172957719120: 351,8675309,979867965: LMT BUY 100@800 GTC, 'orderState': }}