August 19, 2024

What Kind of Crypto Data Can You Access Through API?

featured image

Looking for different types of aggregated and standardized data from multiple cryptocurrency exchanges? You have come to the right place! This article will tell you what kind of data you can get with an easy API connection to our Market Data API.

By integrating with CoinAPI, you can access real-time and historical crypto market data from 400+ integrated exchanges. Historical depth varies by exchange, symbol, and data type, with some datasets extending back more than a decade.

Different types of market data also have different levels of granularity. Trades, quotes, and order books are event-based or tick-level datasets, while OHLCV is available in aggregation periods from 1 second up to longer calendar periods.

Below you will find what crypto data you can access.

CoinAPI provides comprehensive information about trades and transactions. Both terms are used to describe the exchange of assets between buyers and sellers on cryptocurrency exchanges.

The data provided for trades and transactions includes:

  1. Trade Data - This includes details such as the trade ID, timestamp, price, and volume of each trade.
  2. Historical Trades - You can access historical trade data, which allows you to analyze past trading activity.
  3. Real-time Trades - CoinAPI offers real-time trade data, enabling you to monitor current market activity as it happens.
1[
2    {
3        "symbol_id": "BINANCE_SPOT_BTC_USDT",
4        "time_exchange": "2024-01-01T00:00:00.000000Z",
5        "time_coinapi": "2024-01-01T00:00:00.0045420Z",
6        "uuid": "001e66b6-3ee2-4a31-8d02-091780c044a2",
7        "price": 42283.58,
8        "size": 0.00069,
9        "taker_side": "SELL",
10        "id_trade": "3344747379",
11        "id_order_maker": "96bd6411-0005-0000-0000-000000000000",
12        "id_order_taker": "96bd6559-0005-0000-0000-000000000000"
13    },
14    {
15        "symbol_id": "BINANCE_SPOT_BTC_USDT",
16        "time_exchange": "2024-01-01T00:00:00.0010000Z",
17        "time_coinapi": "2024-01-01T00:00:00.0045353Z",
18        "uuid": "acd32990-8d34-41e1-a386-38216c15cea2",
19        "price": 42283.59,
20        "size": 0.00144,
21        "taker_side": "BUY",
22        "id_trade": "3344747380",
23        "id_order_maker": "96bd64ab-0005-0000-0000-000000000000",
24        "id_order_taker": "96bd655a-0005-0000-0000-000000000000"
25    },
26    {
27        "symbol_id": "BINANCE_SPOT_BTC_USDT",
28        "time_exchange": "2024-01-01T00:00:00.0030002Z",
29        "time_coinapi": "2024-01-01T00:00:00.0069037Z",
30        "uuid": "6e98275b-b7be-49d4-a697-9e4c2413e5fb",
31        "price": 42283.58,
32        "size": 0.00069,
33        "taker_side": "SELL",
34        "id_trade": "3344747381",
35        "id_order_maker": "96bd6411-0005-0000-0000-000000000000",
36        "id_order_taker": "96bd655b-0005-0000-0000-000000000000"
37    }
38]

Trades example for BINANCE_SPOT_BTC_USDT

This data not only serves traders but also financial analysts, academic researchers, developers, and data scientists.

An exchange rate is the value at which one currency can be exchanged for another. It serves as a measure of the value of one currency relative to another.

CoinAPI provides a dedicated Exchange Rates API for normalized crypto/fiat and crypto/crypto exchange rates. This is separate from the Market Data API, which provides exchange-specific trades, quotes, order books, OHLCV, metrics, and metadata.

Low-latency access to market and exchange-rate data can support latency-sensitive workflows such as statistical arbitrage, depending on the protocol, infrastructure, and deployment.

1{
2    "time": "2024-08-20T08:37:56.0000000Z",
3    "asset_id_base": "BTC",
4    "asset_id_quote": "USD",
5    "rate": 60769.259091524554011334614945
6}

Exchange rate for BTC/USD

Read the full guide on cryptocurrency exchange rates.

Find out why is the role of latency in cryptocurrency data crucial.

Quotes are top-of-book bid/ask updates showing the best bid and ask prices and sizes for a symbol on a specific exchange. They provide useful information about current market conditions and the spread between buy and sell orders.

This data is also referred to as Level 1 market data.

Here are some key components of quotes in the Market Data API:

  1. Best Bid and Ask Prices - Quotes provide information about the highest price a buyer is willing to pay (bid) and the lowest price a seller is willing to accept (ask) for a specific trading pair.
  2. Volume Information - Along with the prices, quotes also include the volume resting on the best bid and ask. If the volume is zero, it indicates that the size is unknown.
  3. Timestamps - Quotes include exchange timestamps where provided (time_exchange) and CoinAPI receive timestamps (time_coinapi), helping users understand source timing and ingestion timing.
1[
2    {
3        "symbol_id": "BINANCE_SPOT_BTC_USDT",
4        "time_exchange": "2024-01-01T00:00:00.0227853Z",
5        "time_coinapi": "2024-01-01T00:00:00.0227853Z",
6        "ask_price": 42283.59,
7        "ask_size": 2.81993,
8        "bid_price": 42283.58,
9        "bid_size": 9.09329
10    },
11    {
12        "symbol_id": "BINANCE_SPOT_BTC_USDT",
13        "time_exchange": "2024-01-01T00:00:00.0333546Z",
14        "time_coinapi": "2024-01-01T00:00:00.0333546Z",
15        "ask_price": 42283.59,
16        "ask_size": 2.81861,
17        "bid_price": 42283.58,
18        "bid_size": 9.09329
19    },
20    {
21        "symbol_id": "BINANCE_SPOT_BTC_USDT",
22        "time_exchange": "2024-01-01T00:00:00.0384892Z",
23        "time_coinapi": "2024-01-01T00:00:00.0384892Z",
24        "ask_price": 42283.59,
25        "ask_size": 2.81861,
26        "bid_price": 42283.58,
27        "bid_size": 9.09277
28    },
29    {
30        "symbol_id": "BINANCE_SPOT_BTC_USDT",
31        "time_exchange": "2024-01-01T00:00:00.0384961Z",
32        "time_coinapi": "2024-01-01T00:00:00.0384961Z",
33        "ask_price": 42283.59,
34        "ask_size": 2.81861,
35        "bid_price": 42283.58,
36        "bid_size": 9.09159
37    }
38]

Quotes for BINANCE_SPOT_BTC_USDT

Quotes can be accessed as latest/current or historical data through REST, while WebSocket and FIX are available for continuous real-time updates.

For more detailed information, refer to Quotes Data.

An order book is an updated list of buy and sell orders on a trading platform for a financial instrument such as a cryptocurrency. It shows the quantity being bid or offered at different price levels.

CoinAPI provides order book snapshots and updates, with available depth depending on the exchange, protocol, endpoint, and dataset.

Different levels of order book data provide different degrees of market depth:

  1. Level 1 (L1) - Provides the best bid and ask prices along with their sizes. This is the most basic level of order book data and is often used for quick reference to the current market price.
  2. Level 2 (L2) - Includes multiple price levels on both the bid and ask sides. It provides more depth than L1, showing market depth beyond the best bid and ask. This level is useful for understanding supply and demand at different price levels.
  3. Level 3 (L3) - Provides order-level information where supported by the source venue and CoinAPI dataset. Depending on the venue, this can include information such as order ID, price, size, and update type.
1{
2  "symbol_id": "BINANCE SPOT BTC USDT",
3  "time_exchange": "2024-08-20T08:40:45.208000000Z",
4  "time_coinapi": "2024-08-20T08:40:45.213103Z",
5  "asks": [
6    {
7      "price": 60782.32000000,
8      "size": 1.04093000
9    },
10    {
11      "price": 60782.33000000,
12      "size": 0.00147000
13    },
14    {
15      "price": 60782.45000000,
16      "size": 0.00009000
17    },
18    {
19      "price": 60782.46000000,
20      "size": 0.03877000
21    },
22    {
23      "price": 60782.47000000,
24      "size": 0.00616000
25    },
26    {
27      "price": 60782.59000000,
28      "size": 0.00096000
29    },
30    {
31      "price": 60782.60000000,
32      "size": 0.09865000
33    },
34    {
35      "price": 60782.64000000,
36      "size": 0.00087000
37    },
38    {
39      "price": 60782.72000000,
40      "size": 0.00009000
41    },
42    {
43      "price": 60782.81000000,
44      "size": 0.00086000
45    },
46    {
47      "price": 60782.85000000,
48      "size": 0.00107000
49    },
50    {
51      "price": 60783.34000000,
52      "size": 0.00633000
53    },
54    {
55      "price": 60783.57000000,
56      "size": 0.32092000
57    },
58    {
59      "price": 60784.00000000,
60      "size": 0.04127000
61    },
62    {
63      "price": 60785.89000000,
64      "size": 0.10937000
65    }
66  ]
67}

Orderbooks L3 for BINANCE_SPOT_BTC_USDT

Order book snapshots capture the state of the book at a specific point in time, up to the supported depth for the endpoint or dataset. They are useful for analyzing liquidity and market depth without processing every individual order book update.

Market Data REST order book snapshots are suited for current and targeted historical snapshots, with depth depending on endpoint limits.

For bulk historical order book research, CoinAPI Flat Files provides datasets such as:

  • limitbook_full
  • limitbook_snapshot_50
  • limitbook_depth_bands

Availability varies by exchange, symbol, historical period, and dataset.

OHLCV (Open, High, Low, Close, Volume) is a summary of changes in the price of a trading instrument and trading activity over a specified period.

The Open and Close values indicate the price at which the instrument was first and last represented during the period. The High and Low values represent the maximum and minimum prices during that period, while volume describes trading activity.

OHLCV is available in multiple aggregation periods, from 1 second up to longer calendar periods.

CoinAPI's OHLCV formation also accounts for periods where the order book is active but no trades occur. In such cases, CoinAPI can emit a bar with volume_traded=0 and trades_count=0.

1[
2  {
3    "time_period_start": "2024-01-01T00:00:00.000000Z",
4    "time_period_end": "2024-01-02T00:00:00.000000Z",
5    "time_open": "2024-01-01T00:00:00.000000Z",
6    "time_close": "2024-01-01T23:59:59.999999Z",
7    "price_open": 42283.58,
8    "price_high": 44184.1,
9    "price_low": 42100.77,
10    "price_close": 44179.55,
11    "volume_traded": 26187.108389999987,
12    "trades_count": 1070662
13  },
14  {
15    "time_period_start": "2024-01-02T00:00:00.000000Z",
16    "time_period_end": "2024-01-03T00:00:00.000000Z",
17    "time_open": "2024-01-02T00:00:00.000000Z",
18    "time_close": "2024-01-02T23:59:59.999999Z",
19    "price_open": 44179.55,
20    "price_high": 45879.63,
21    "price_low": 44148.34,
22    "price_close": 44946.91,
23    "volume_traded": 62156.20929000035,
24    "trades_count": 2151078
25  },
26  {
27    "time_period_start": "2024-01-03T00:00:00.000000Z",
28    "time_period_end": "2024-01-04T00:00:00.000000Z",
29    "time_open": "2024-01-03T00:00:00.000000Z",
30    "time_close": "2024-01-03T23:59:59.999999Z",
31    "price_open": 44946.91,
32    "price_high": 45600,
33    "price_low": 40750,
34    "price_close": 42845.23,
35    "volume_traded": 81194.36704000004,
36    "trades_count": 2658036
37  },
38  {
39    "time_period_start": "2024-01-04T00:00:00.000000Z",
40    "time_period_end": "2024-01-05T00:00:00.000000Z",
41    "time_open": "2024-01-04T00:00:00.000000Z",
42    "time_close": "2024-01-04T23:59:59.999999Z",
43    "price_open": 42845.23,
44    "price_high": 44729.88,
45    "price_low": 42613.77,
46    "price_close": 44151.1,
47    "volume_traded": 48038.06097000002,
48    "trades_count": 1819941
49  },
50  {
51    "time_period_start": "2024-01-05T00:00:00.000000Z",
52    "time_period_end": "2024-01-06T00:00:00.000000Z",
53    "time_open": "2024-01-05T00:00:00.000000Z",
54    "time_close": "2024-01-05T23:59:59.999999Z",
55    "price_open": 44151.1,
56    "price_high": 44357.46,
57    "price_low": 42450,
58    "price_close": 44145.12,
59    "volume_traded": 40086.37648000012,
60    "trades_count": 2064843
61  }
62]

This data structure contains daily trading information, including opening and closing times, price ranges (open, high, low, close), trading volume, and the number of trades for each day from January 1st to January 5th, 2024.

Read more about OHLCV data or check in doumentation.

In addition to the data types mentioned above, CoinAPI provides reference and event-level data that can help users understand and work with crypto markets.

Metadata in CoinAPI provides essential information about exchanges, assets, and symbols. This includes details such as the name of the exchange, the type of asset, and standardized identifiers used for trading instruments.

Metadata is crucial for understanding the context of the data you are working with. It helps map and standardize information across different exchanges, making it easier to integrate and analyze.

For example, developers can use /v1/exchanges, /v1/assets, and /v1/symbols to discover exchanges, assets, instruments, availability, and standardized identifiers.

Event-level data captures individual market events such as trades, quote updates, and order book updates from supported sources, normalized into CoinAPI schemas.

Unlike aggregated data such as OHLCV, event-level data lets users work with individual market events. This can be useful for custom analysis, trading-model development, market microstructure research, and other workflows that require granular data.

Tick-by-tick data provides a detailed record of individual market events. Each "tick" represents an event, such as a trade execution or a change in the best bid or ask price.

This data can be valuable for high-frequency trading strategies, quantitative analysis, and backtesting trading models.

Market Data REST supports targeted historical queries. For large-scale historical tick, quote, and order book datasets, Flat Files are generally the better fit.

Get to know Market Data API better.

The best access method depends on whether you need individual requests, continuous streaming, or bulk historical datasets.

NeedBest access method
Latest snapshots / metadataREST
Targeted historical queriesREST
Continuous real-time trades, quotes, order books, OHLCVWebSocket or FIX
Bulk historical trades, quotes, order books, OHLCVFlat Files
Normalized crypto/fiat and crypto/crypto ratesExchange Rates API
PRIMKT, VWAP, CAPIVIX indexesIndexes API

This distinction is especially important for larger data workloads. REST is useful for targeted requests, while WebSocket and FIX are designed for continuous real-time feeds. Flat Files are better suited to bulk historical data and large-scale research.

Separately, CoinAPI's Indexes API provides access to crypto indexes and index-related data, including PRIMKT, VWAP, and CAPIVIX, as well as historical values, time series, and index composition.

Different indexes use different methodologies. PRIMKT, VWAP, and CAPIVIX should therefore not all be treated as traditional market-cap-weighted cryptocurrency baskets.

Instead, each index is designed for a specific purpose and calculation methodology.

Read: Crypto Indexes - Everything You Need to Know.

From individual trades and quotes to order books, OHLCV, and metadata, CoinAPI provides standardized access to crypto market data across hundreds of integrated exchanges.

For real-time and targeted historical market data, explore the CoinAPI Market Data API.

For large-scale historical datasets, use CoinAPI Flat Files, while Exchange Rates API and Indexes API cover normalized rates and crypto indexes.

Data availability varies by exchange, symbol, instrument type, dataset, historical period, and plan. Use CoinAPI metadata and product documentation to confirm coverage for your specific use case.

Explore Market Data API | Explore Flat Files | Explore Exchange Link | Contact

Recent Articles

Crypto API made simple: Try now or speak to our sales team