Comment on page
Coin Metrics collects quotes representing the best bid order and best ask order residing at the top of the order book for individual markets like
coinbase-btc-usd-spot. To calculate our pair quotes, we aggregate the quotes across a selection of high-quality constituent markets to derive quotes for a pair like
Our pair quotes are conceptually similar to the National Best Bid Offer (NBBO), a regulation issued by the United States Securities and Exchange Commission that requires brokers to execute customer trades at the best available price.
/timeseries-stream/pair-quotesendpoint supports multiple aggregation methods to aggregate the quotes data from individual constituent markets for a given pair. The different aggregation methods can be specified using the
Currently, only the
aggregated_spreadmethod is implemented, and alternative methods will be implemented in the future.
aggregated_spreadmethod uses the following methodology:
For a given pair, select major spot markets where the market contains the given pair. For each market i, calculate the bid ask spread in percentage terms and the midprice:
Calculate the weighted-average bid-ask spread and weighted-average midprice where the weight is determined by Volume_i, the cumulative volume over some time period [t-1, t] on market i. The advantage of using a trailing volume as opposed to other volume measures, such as order size at the top of the book, is that volume indicates the real contribution of a given exchange to the market. Using order sizes from the book would allow for the random behavior of market participants to bias the aggregate in a way that does not represent the actual contribution of an exchange to the broader crypto market. Using these weights will measure the trading activity actually realized on a market at a given spread. In this way, the volume-weighted spread (as opposed to size-weighted spread) will indicate the spread that is realized via real volume for a given asset or asset-pair.
Using weighted-average midprice and weighted-average spread, calculate the aggregated bid and aggregated ask. The aggregated bid amount and aggregated ask amount are the sum of bid amounts and ask amounts from major markets, respectively.
time: The exchange-reported time in ISO 8601 date-time format. Always with nanoseconds precision.
pair: The id of the pair.
ask_price: The price of the ask order in units of the quote currency as determined by the aggregation method.
ask_size: The size of the ask order in units of the base asset as determined by the aggregation method.
bid_price: The price of the bid order in units of the quote currency as determined by the aggregation method.
bid_size: The size of the bid order in units of the base asset as determined by the aggregation method.
mid_price: The average of the
spread: The bid-ask spread in raw units.
cm_sequence_id: The sequence id number of the websocket message.
Coin Metrics uses our Trusted Exchange Framework v2.0 to seelct a set of high-quality and trustworthy exchanges in selection of our constituent markets. The set of exchanges includes
All markets from trusted exchanges that contain the given pair are selected.
Our websocket API will send a new message once every 250 milliseconds.
- CM Market Data Feed v2.8 on May 2023.
The asset quotes are currently available for the following assets: