¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Is there a way to sync historical TRADES with historical BID_ASK?


 

I get historical ticks via?reqHistoricalTicks API call. I can request "TRADES" and "BID_ASK" only separately. I want to "sync" them and know which price did a trade hit (BID or ASK). Is there a way to reliable know what BID and ASK are?at a given TRADE time? Their time is in UNIX timestamp which is in seconds.

TRADES output:
Time: 1660915800, TickAttribLast: PastLimit: 0, Unreported: 0, Price: 4259.000000, Size: 4, Exchange: , SpecialConditions:?
Time: 1660915800, TickAttribLast: PastLimit: 0, Unreported: 0, Price: 4259.000000, Size: 4, Exchange: , SpecialConditions:?
Time: 1660915800, TickAttribLast: PastLimit: 0, Unreported: 0, Price: 4259.000000, Size: 4, Exchange: , SpecialConditions:?
Time: 1660915800, TickAttribLast: PastLimit: 0, Unreported: 0, Price: 4259.250000, Size: 1, Exchange: , SpecialConditions:?
Time: 1660915800, TickAttribLast: PastLimit: 0, Unreported: 0, Price: 4259.250000, Size: 5, Exchange: , SpecialConditions:?

BID_ASK output:
Time: 1660915799, TickAttriBidAsk: BidPastLow: 0, AskPastHigh: 0, PriceBid: 4259.000000, PriceAsk: 4259.250000, SizeBid: 34, SizeAsk: 73
Time: 1660915800, TickAttriBidAsk: BidPastLow: 0, AskPastHigh: 0, PriceBid: 4258.750000, PriceAsk: 4259.000000, SizeBid: 58, SizeAsk: 5
Time: 1660915800, TickAttriBidAsk: BidPastLow: 0, AskPastHigh: 0, PriceBid: 4258.750000, PriceAsk: 4259.250000, SizeBid: 57, SizeAsk: 67
Time: 1660915800, TickAttriBidAsk: BidPastLow: 0, AskPastHigh: 0, PriceBid: 4259.000000, PriceAsk: 4259.250000, SizeBid: 13, SizeAsk: 62
Time: 1660915800, TickAttriBidAsk: BidPastLow: 0, AskPastHigh: 0, PriceBid: 4258.750000, PriceAsk: 4259.000000, SizeBid: 59, SizeAsk: 5


Join [email protected] to automatically receive all group messages.