Skip to main content

Quotes

Overview

The Quotes data type provides information about the best bid and ask prices for a specific trading pair on an exchange. This data is crucial for understanding the current state of the market and the spread between buy and sell orders.

File Organization

Quote data is organized in the S3 bucket as follows:

T-QUOTES/
└── D-YYYYMMDD/
└── E-[EXCHANGE]/
└── IDDI-[IDENTIFIER]+SC-[COINAPI_SYMBOL_ID]+S-[EXCHANGE_SYMBOL].csv.gz

Example: T-QUOTES/D-20230701/E-BINANCE/IDDI-1234+SC-BINANCE_SPOT_ETH_USDT+S-ETH-USDT.csv.gz

Where:

  • T-QUOTES: Indicates the data type (Quotes)
  • D-YYYYMMDD: Date of the data
  • E-[EXCHANGE]: Exchange name
  • IDDI-[IDENTIFIER]: CoinAPI's internal identifier
  • SC-[COINAPI_SYMBOL_ID]: CoinAPI's symbol identifier
  • S-[EXCHANGE_SYMBOL]: The symbol as identified by the exchange

File Format

Files are in CSV format, compressed with gzip. Each row represents a single quote update.

Data Fields

Column NameTypeDescription
id_site_coinapistringUUID of the site which received the quote. Useful for replaying markets from the perspective of an algorithmic trading strategy.
time_exchangedatetimeUTC timestamp of the quote provided by the exchange or estimated using the exchange API delay.
time_coinapidatetimeUTC timestamp when CoinAPI first received the quote. Useful for replaying markets from an algorithmic trading strategy perspective.
ask_pxdecimalBest ask (sell) price
ask_sxdecimalTotal amount of volume resting on the best ask level in the base asset of the symbol
bid_pxdecimalBest bid (buy) price
bid_sxdecimalTotal amount of volume resting on the best bid level in the base asset of the symbol

Example Data

id_site_coinapi,time_exchange,time_coinapi,ask_px,ask_sx,bid_px,bid_sx
550e8400-e29b-41d4-a716-446655440000,2023-07-01T12:00:00.123456Z,2023-07-01T12:00:00.234567Z,30000.50,1.5,30000.00,2.0
550e8400-e29b-41d4-a716-446655440001,2023-07-01T12:00:01.123456Z,2023-07-01T12:00:01.234567Z,30001.00,1.2,30000.50,1.8

Data Collection Process

  1. We continuously monitor the order books of supported exchanges.
  2. When a change in the best bid or ask is detected, a new quote entry is recorded.
  3. The data is processed, normalized, and stored in our system.
  4. At the end of each day (UTC), the data is aggregated into daily files and uploaded to the S3 bucket.

Corner Cases and Special Considerations

  1. Missing Data: If an exchange experiences downtime or connectivity issues, there may be gaps in the quote data.
  2. Extreme Values: During periods of high volatility, you may observe unusually large spreads or extreme prices. These are typically valid market conditions rather than errors.
  3. time_exchange vs time_coinapi: If these times are equal, it means the exchange did not provide a timestamp, and we're using our receipt time for both fields.

Usage Tips

  1. When analyzing spread, calculate it as ask_px - bid_px.
  2. The ask_sx and bid_sx fields can be used to gauge market depth at the best prices.
  3. Comparing time_exchange and time_coinapi can provide insights into latency between the exchange and our data collection points.

For any questions or issues with the Quotes data, please contact our support team.