Keyboard Shortcuts
Likes
Search
Tick-by-tick data is coming in bursts
Hi everyone,
I've recently started messing around with the Java API, specifically the?'reqTickByTickData'?method. But I noticed some unexpected behavior and would like to know why this is and if there's something I can do to resolve it. In my program I request tick by tick data twice. Once with tickType of?'Last'?and once with a tickType of?'BidAsk'. On their respective callback methods being called I log the time parameter of the callback. The below lines are the logs, where 'LAST' indicates a log from the 'Last' callback method and 'BIDASK' indicates a log from the 'BidAsk' callback method. You will notice that some of the data comes in clumps for example, the 4th line to the 10th line all indicate the exact same time. I find this likely to be inaccurate as this was ran premarket when I wouldn't expect a lot of activity occurring at the exact same time. I'm of the thinking that for whatever reason I'm getting slightly delayed data, that is pushed together with other data generated roughly around the same time. Has anyone else ran into this. would upgrading subscription help I wonder? Thanks for any input you can offer. BIDASK: RequestId: 2| Ticker: AAPL| Time: 1660220588| BidPrice: 170.04| AskPrice: 170.08| AskSize: 300| TickAttributeBidAsk:? BIDASK: RequestId: 2| Ticker: AAPL| Time: 1660220588| BidPrice: 170.04| AskPrice: 170.09| AskSize: 300| TickAttributeBidAsk:?
BIDASK: RequestId: 2| Ticker: AAPL| Time: 1660220588| BidPrice: 170.07| AskPrice: 170.09| AskSize: 2600| TickAttributeBidAsk:?
LAST: RequestId: 1| Ticker: AAPL| tickType: 1| Time: 1660220606| Price: 170.09| Size: 161| TickAttributeLast: | Exchange: ARCA| SpecialConditions: T
LAST: RequestId: 1| Ticker: AAPL| tickType: 1| Time: 1660220606| Price: 170.09| Size: 100| TickAttributeLast: | Exchange: ARCA| SpecialConditions: T
LAST: RequestId: 1| Ticker: AAPL| tickType: 1| Time: 1660220606| Price: 170.09| Size: 100| TickAttributeLast: | Exchange: ARCA| SpecialConditions: T
LAST: RequestId: 1| Ticker: AAPL| tickType: 1| Time: 1660220606| Price: 170.09| Size: 100| TickAttributeLast: | Exchange: ARCA| SpecialConditions: T
LAST: RequestId: 1| Ticker: AAPL| tickType: 1| Time: 1660220606| Price: 170.09| Size: 100| TickAttributeLast: | Exchange: ARCA| SpecialConditions: T
LAST: RequestId: 1| Ticker: AAPL| tickType: 1| Time: 1660220606| Price: 170.09| Size: 4000| TickAttributeLast: | Exchange: FINRA| SpecialConditions: T
LAST: RequestId: 1| Ticker: AAPL| tickType: 1| Time: 1660220606| Price: 170.09| Size: 139| TickAttributeLast: | Exchange: FINRA| SpecialConditions: T
BIDASK: RequestId: 2| Ticker: AAPL| Time: 1660220606| BidPrice: 170.07| AskPrice: 170.1| AskSize: 100| TickAttributeBidAsk:?
BIDASK: RequestId: 2| Ticker: AAPL| Time: 1660220606| BidPrice: 170.08| AskPrice: 170.1| AskSize: 100| TickAttributeBidAsk:?
BIDASK: RequestId: 2| Ticker: AAPL| Time: 1660220606| BidPrice: 170.08| AskPrice: 170.09| AskSize: 100| TickAttributeBidAsk:?
BIDASK: RequestId: 2| Ticker: AAPL| Time: 1660220606| BidPrice: 170.07| AskPrice: 170.09| AskSize: 200| TickAttributeBidAsk:?
BIDASK: RequestId: 2| Ticker: AAPL| Time: 1660220608| BidPrice: 170.07| AskPrice: 170.1| AskSize: 300| TickAttributeBidAsk:?
BIDASK: RequestId: 2| Ticker: AAPL| Time: 1660220608| BidPrice: 170.07| AskPrice: 170.09| AskSize: 300| TickAttributeBidAsk:?
BIDASK: RequestId: 2| Ticker: AAPL| Time: 1660220608| BidPrice: 170.05| AskPrice: 170.09| AskSize: 100| TickAttributeBidAsk:?
BIDASK: RequestId: 2| Ticker: AAPL| Time: 1660220608| BidPrice: 170.07| AskPrice: 170.09| AskSize: 100| TickAttributeBidAsk:?
BIDASK: RequestId: 2| Ticker: AAPL| Time: 1660220608| BidPrice: 170.06| AskPrice: 170.09| AskSize: 100| TickAttributeBidAsk:?
BIDASK: RequestId: 2| Ticker: AAPL| Time: 1660220608| BidPrice: 170.05| AskPrice: 170.09| AskSize: 100| TickAttributeBidAsk:?
|
Please keep in mind that time stamps in TickByTick callbacks have a resolution of 1 second. Therefore, liquid instruments can have many trades per second, each trade would be reported as a separate callback, and all trades that took place within the same second will have the same time stamp. The same is true, and for many instruments more visible, for BidAsk updates. The instruments we subscribe to often have 10 BidAsk updates for each trade. Your log is from pre-market trading but I am sure AAPL is good for seven trades in one second an hour before market open. Hope that helps, 闯ü谤驳别苍 PS. If you tag each callback with your own local higher resolution arrival time stamp you will see that callbacks with identical time stamps do not happen in one block. What I mean is you will see that they take place over approximately one second but not equally spaced nor all together. There is also a separate thread about millisecond resolution of TickByTick data. |