Additional informations on real-time data strweams : Trades/Quotes Schema

Dear Alpaca Community,

Maybe this topic has already been discussed, but I couldn’t find any clarification on the relationship between Trades/Quotes streams (Data Points: Real-time Data | Alpaca Docs) and limit order book (LOB) and its matching algorithm:

For quote schema in real-time data point: What does the bid/ask/size correspond to in the order book? Is it the updated best bid/ask following a new limit order? If yes, does the size correspond to the volume available at a quoted price? Is it just a bid/ask quoted by a market participant?

For trades schema in real-time data point: What do trade price and trade size correspond to in the LOB? Is it the middle of the best bid/ask price (Best Bid + Best Ask / 2.0) after an executed market order? Is it the micro-price e.g the volume-weighted bid/ask price after an executed market order? Or simply is it the average filled price of the last executed market order?

Additionally, it is possible to know the direction of the market order for the last trade? E.g buy market order against sell limit order OR sell market order against buy limit order.

It would be amazing to have more info about those streams and LOBs, considering that at less than a minute bar, microstructure becomes important for trading.

Best,

1 Like

I’ve the same questions. Anyone from Alpaca can answer? I see many questions in the community are unanswered. Where are Alpaca supports?