Expand description
Market data mapping: BCS wire models to brokapi-core domain types.
Structs§
- Mapped
Market Event - An event mapped from a market data message, with the subscription it belongs to if known.
Traits§
- Book
Level Source - A price level of an order book in either wire form (REST or WebSocket), so one function can map both.
Functions§
- map_
last_ trade - Maps a market trade message to a [
MarketTrade]. - map_
quotes - Maps a quotes message to a [
Quote]. - map_
rest_ candles - Maps the candles of
POST /candles-chartto domain candles of the timeframetfthat was asked. - map_
rest_ last_ trade - One trade of the tape (
POST /last-trades) forinstrument, the one asked for: the records of the docs carry no instrument. Side is1buy /2sell (older samples:BUY/SELL); a record whose side is neither is dropped rather than guessed. - map_
rest_ order_ book - Maps a REST order book answer to an [
Event::OrderBook] holding an [OrderBook::Snapshot]. - map_
ws_ market_ data - Maps a market data WebSocket message to an event.
- map_
ws_ order_ book - Maps a WebSocket order book message to an [
OrderBook::Snapshot]. Every message of this stream is a full book, not a delta. - parse_
subscribe_ error - Detect BCS market-data subscribe error payloads (
errorsarray).