Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Capturing NBB and NBO with IB paper trading

Hello,

Does anyone know of an efficient way to capture the NBB and NBO using IB paper trading? For real trading, I assume it would be as simple as putting in a relative order with an offset of 0, but paper trading does not support relative order types. Considering data.current does not accept bid or ask as a parameter, I am wondering if there is any other way to send limit orders at the NBB/NBO (via IB paper)?

Thanks
Hershel

2 responses

Hershel,

Did you find a solution to this? I'd be interested in doing the same thing.

Thanks,
Austin

Hi Austin,

In theory a market order should work, you just don't have that insurance element that you will get the best price at the right time. Alternatively you could put in a limit order with market price as a parameter, but in that scenario you don't have the certainty that your order will get filled (should the price move prior to your order getting filled).
Good luck,

Hershel