API Reference: Crypto Prices, Bars and Trades
Details
Docs navigation
- Getting started: Quickstart, Authentication, Rate limits, Errors and retries
- Guides: Symbol formats, Timestamps and time zones, Pagination, Split and dividend adjustments, WebSocket streaming, Dataset downloads, Excel and Google Sheets, Changelog
- API reference: Stock bars, Stock trades and quotes, Snapshots and movers, Tickers, exchanges, calendar, Splits and dividends, Fundamentals and SEC filings, Options chain and Greeks, Options EOD, bars, OI, Forex, Crypto (you are here), Crypto derivatives, Futures bars and continuous, Settlements and COT, Indices, Economic data, Technical indicators
- SDKs: Python, JavaScript
Three endpoints cover crypto spot markets: latest prices with market cap and rank, OHLCV bars per exchange or across venues, and every individual trade. This crypto API endpoint reference lists the parameters and fields for each, with real rows from our free Binance samples so you can see the exact output format before the API opens.
Early access. Planned v1 endpoints, not live yet. Prices: Free gets 60-second cached prices for the top 1,000 coins (10,000 calls a month); Starter ($29/mo) real time for all coins. Bars: Free gets daily bars for full history and 1-minute bars for 30 days; Starter 1-minute bars for 5 years; Pro ($79/mo) 1-second bars and full history. Trades: Starter gets the last 30 days; Pro full history and the live stream. The free samples on /sample-data are real and downloadable today.
Pricing
Latest prices
GET https://api.marketdata.co/v1/crypto/prices
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
symbols |
string | no | top 100 by market cap | Comma-separated pairs, e.g. BTC-USD,ETH-USD |
limit |
integer | no | 100 | Up to 1,000 when symbols is omitted |
Fields: symbol, asset_id (e.g. bitcoin), name, timestamp, price (volume-weighted across venues), volume_24h, change_24h_pct, market_cap, market_cap_rank, circulating_supply, plus optional bid, ask, change_7d_pct, high_24h, low_24h, fully_diluted_market_cap, total_supply and max_supply.
Details
Bars
GET https://api.marketdata.co/v1/crypto/bars
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
symbol |
string | yes | Pair, e.g. BTC-USDT |
|
exchange |
string | no | aggregate | Venue code, e.g. binance; omit for our cross-venue aggregate |
interval |
string | no | 1d |
1s, 1m, 5m, 1h, 1d |
start, end |
string | no | 30 days | UTC dates or timestamps |
limit, cursor, format |
no | Paging and output |
Response fields
| Field | Type | Description |
|---|---|---|
symbol |
string | Pair |
exchange |
string | Venue, or null for the aggregate |
interval |
string | Bar size |
timestamp |
string | Bar start, ISO 8601 UTC |
open, high, low, close |
number | Trade prices |
volume |
number | Base-asset volume |
quote_volume |
number | Quote-asset volume |
vwap |
number | Volume-weighted average price (optional) |
trade_count |
integer | Trades in the bar (optional) |
taker_buy_volume |
number | Base volume bought by aggressors (optional) |
market_cap |
number | Daily aggregate bars only (optional) |
Example
Example (curl):
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.marketdata.co/v1/crypto/bars?symbol=BTC-USDT&exchange=binance&interval=1m&start=2026-10-31T15:40:00Z&end=2026-10-31T16:00:00Z"
Rows from our free BTC-USDT 1-minute sample, in the same format the API returns:
symbol,interval,timestamp,open,high,low,close,volume,quote_volume,vwap,trade_count,taker_buy_volume
BTC-USDT,1m,2026-10-31T15:40:00Z,77598.76,77598.76,77598.75,77598.76,6.02156,467265.57,77598.76,479,4.31787
BTC-USDT,1m,2026-10-31T15:41:00Z,77598.75,77628.53,77598.75,77628.53,8.09918,628567.28,77608.76,1773,5.61679
Source: Binance
Example (Python), taker buy share per bar, a quick read on aggressor flow:
import os
import requests
import pandas as pd
r = requests.get(
"https://api.marketdata.co/v1/crypto/bars",
headers={"Authorization": f"Bearer {os.environ['MARKETDATA_API_KEY']}"},
params={"symbol": "ETH-USDT", "exchange": "binance", "interval": "1m", "start": "2026-10-31"},
)
bars = pd.DataFrame(r.json()["results"])
bars["buy_share"] = bars["taker_buy_volume"] / bars["volume"]
Details
Trades
GET https://api.marketdata.co/v1/crypto/trades
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
symbol |
string | yes | Pair | |
exchange |
string | yes | Venue code | |
start, end |
string | no | last hour | UTC timestamps, one day max per call |
limit, cursor, format |
no | Paging and output |
Fields: symbol, exchange, trade_id, timestamp (UTC, up to nanoseconds), price, size (base asset), notional (price times size), aggressor_side (buy or sell), plus optional received_timestamp, sequence and is_liquidation.
First rows of our free trades sample:
symbol,trade_id,timestamp,price,size,notional,aggressor_side
BTC-USDT,6809266910,2026-11-01T00:00:00.447286Z,77582.02,0.00105,81.46,sell
BTC-USDT,6809266911,2026-11-01T00:00:00.452197Z,77582.02,0.00217,168.35,sell
Source: Binance
API
Errors for these endpoints
| HTTP | error.code |
When |
|---|---|---|
| 400 | invalid_symbol_format |
BTCUSDT or BTC/USDT; use BTC-USDT |
| 400 | missing_parameter |
exchange missing on trades |
| 400 | range_too_large |
Trades over one day in one call |
| 403 | plan_required |
1-minute history past 30 days on Free, 1s bars below Pro |
| 404 | symbol_not_found |
Pair not listed on that exchange |
Watch out
Notes and gotchas
- Crypto trades 24/7. Daily bars run 00:00 to 24:00 UTC, which will not match sites that use a local midnight.
BTC-USDTandBTC-USDare different markets. USDT is a stablecoin, not dollars, and the two prices drift apart in stress.- Volume is in the base asset. Use
quote_volumeto compare liquidity across coins. - Exchange outages leave real gaps in per-exchange bars. The aggregate fills from other venues.
- Binance-sourced samples carry a note to check Binance terms before commercial display.
Keep reading
Next steps
Details
Was this page useful?
[Yes] [No]
Want an exchange we don't cover? Tell us on the custom data form.