erdewit / ib_insync

Python sync/async framework for Interactive Brokers API
BSD 2-Clause "Simplified" License
2.81k stars 754 forks source link

Getting the underlying ibapi instances #40

Closed athenawisdoms closed 6 years ago

athenawisdoms commented 6 years ago

After placing the order with

limitTrade = ib.placeOrder(contract, limitOrder)

is it possible to get the underlying ibapi.Order?

erdewit commented 6 years ago

limitTrade.order is the order.

athenawisdoms commented 6 years ago

Sorry, I meant to ask:

After creating the limit order with

limitOrder = LimitOrder('BUY', 100, 0.05)

and before placing the order with

limitTrade = ib.placeOrder(contract, limitOrder)

is it possible to get the ibapi.Order?

erdewit commented 6 years ago

There is no ibapi.Order, it is replaced by ib_insync.Order which is backwards compatible with it.

Not sure why you're interested in the ibapi object.