/timeseries-stream/market-orderbooks. The first message that the client receives is an order book snapshot. All subsequent messages are updates to the order book. This allows a user to maintain the current state of the order book at all times by storing the order book state locally and applying updates to it.
coinbase-btc-usd-spotmarket from our
/timeseries/market-orderbooksAPI endpoint is provided below.
market: The id of the market. Market ids use the following naming convention:
exchangeName-baseAsset-quoteAsset-spotfor spot markets,
exchangeName-futuresSymbol-futurefor futures markets, and
exchangeName-optionsSymbol-optionfor options markets.
time: The exchange-reported time in ISO 8601 date-time format.
coin_metrics_id: Unique identifier of the order snapshot.
price: The price of the bid or ask on the order book in units of the quote currency.
size: The size of the bid or ask on the order book in units of the base asset for a spot market or number of contracts for a derivatives market.
[side, price, size]tuple where the size represents the new value and not the delta from the previous value.
[side, price, size]tuple where the size represents the new value and not the delta from the previous value. However, some of this information can be derived by examining the change as a result of applying an order book update. If an update contains a tuple with a
sizeof 0, this means that the order was matched with an incoming order (if at the top of the book) or canceled. If an update contains a tuple with
sizethat is greater than the current size, this means that a new order was added to the order book or an existing order was changed.
timefield always lies exactly on the second or hour, the actual time of the snapshot is close to but not exactly at this timestamp. We store the exact timestamp that a snapshot was taken and will expose this data through our API in a future release.