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.
@vladisld It was quite useful. Thank you.
Also, have you had a usecase where you're having data resampled to different timeframes (like you want to get 15m bar of futures and only 5m bar of options for entry based on futures) work?
When I keep all the datafeeds at 5s snapshot, i am receiving data.
But if I keep few feeds at 1s snapshot and few at 5s, I am not receiving any data at all.
Have you faced this?