Crypto market data API: pair quotes and live streaming
Crypto trades around the clock. Subscribe to pairs over WebSocket and receive a continuous stream of trades and quotes.
What you can get
| Endpoint | Description |
|---|---|
/crypto/quote | Real-time quote for a pair |
/crypto/quotes | Batch quotes |
/crypto/tick, /crypto/depth | Real-time ticks and order book |
/crypto/kline | Minute, day, week and month candles |
wss://itick.dev/crypto | WebSocket subscription with continuous quote and trade updates |
Example: BTCUSDT quote
curl -H "token: YOUR_API_KEY" \
"https://itick.dev/crypto/quote?region=BA&code=BTCUSDT"{
"code": 0,
"msg": null,
"data": {
"s": "BTCUSDT",
"ld": 116211.33,
"o": 114953.48,
"h": 116828.93,
"l": 114259,
"v": 11296.78228
}
}Market codes
For crypto, region is a market code that selects the source. The documented values are BA, BT and PB, with instrument codes such as BTCUSDT. See the iTick product list for which exchange each code maps to.
Subscribe over WebSocket
Crypto trades 24/7, and a WebSocket subscription keeps pushing updates so you do not need to poll. The example below subscribes to BTCUSDT quotes and ticks.
const ws = new WebSocket("wss://itick.dev/crypto?token=YOUR_API_KEY");
ws.onopen = () => {
ws.send(JSON.stringify({ ac: "subscribe", params: "BTCUSDT$BA", types: "quote,tick" }));
// Send a heartbeat at least every 30 seconds
setInterval(() => ws.send(JSON.stringify({ ac: "ping", params: String(Date.now()) })), 25000);
};
ws.onmessage = (event) => console.log(event.data);Frequently asked questions
How fast are the WebSocket updates?
Updates are produced by the upstream provider and forwarded to subscribed connections without caching. Actual latency depends on the upstream and the network, and we do not promise specific millisecond figures.
Which pairs and exchanges are supported?
That follows the iTick product list, and available instruments depend on your plan. See the iTick product list.
Does the free plan include WebSocket?
The free plan does not include WebSocket streaming by default; paid plans do. See pricing for connection and subscription limits.
Try the crypto data API free
Sign up and start with REST on the free plan; upgrade when you need streaming.
Sign up free