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 dataE-[EXCHANGE]
: Exchange nameIDDI-[IDENTIFIER]
: CoinAPI's internal identifierSC-[COINAPI_SYMBOL_ID]
: CoinAPI's symbol identifierS-[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 Name | Type | Description |
---|---|---|
id_site_coinapi | string | UUID of the site which received the quote. Useful for replaying markets from the perspective of an algorithmic trading strategy. |
time_exchange | datetime | UTC timestamp of the quote provided by the exchange or estimated using the exchange API delay. |
time_coinapi | datetime | UTC timestamp when CoinAPI first received the quote. Useful for replaying markets from an algorithmic trading strategy perspective. |
ask_px | decimal | Best ask (sell) price |
ask_sx | decimal | Total amount of volume resting on the best ask level in the base asset of the symbol |
bid_px | decimal | Best bid (buy) price |
bid_sx | decimal | Total 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
- We continuously monitor the order books of supported exchanges.
- When a change in the best bid or ask is detected, a new quote entry is recorded.
- The data is processed, normalized, and stored in our system.
- 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
- Missing Data: If an exchange experiences downtime or connectivity issues, there may be gaps in the quote data.
- 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.
- 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
- When analyzing spread, calculate it as
ask_px - bid_px
. - The
ask_sx
andbid_sx
fields can be used to gauge market depth at the best prices. - Comparing
time_exchange
andtime_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.
Was this section helpful?