How to get best bid and ask at a given instant on IB live trading?
I am writing code to automate my strategy in interactive brokers.
IBPy seems to have the feature to get 5 level depth, but there doesn't seem to be anything on backtrader documentation regarding that - getting best bid/ask, best bid+1/ask+1, etc., if I want to slice orders and place orders at x lots per level.
Can someone help with this?
vladisld last edited by
@hercp AFAIK it is not directly supported in the current Backtrader implementation, however there was an attempt to implement it in private fork:
Not sure what is the quality of this implementation - take a look at see if it fits.