cex.io APIcex.io ↗
Access CEX.io market data via API: live tickers, order books, trade history, OHLCV candles, and spot pair info for BTC, ETH, and more.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/1dd8fdd2-c4cf-435c-94b9-f27cfe6abb11/get_prices' \ -H 'X-API-Key: $PARSE_API_KEY'
Retrieve current prices and market caps for all supported tokens as a quick snapshot from the marketing API.
No input parameters required.
{
"type": "object",
"fields": {
"data": "array of objects with price, change, quote, baseName, base, and marketCap for each token"
},
"sample": {
"data": [
{
"base": "BTC",
"price": 80125,
"quote": "USD",
"change": -1.6,
"baseName": "Bitcoin",
"marketCap": 1603009354318
},
{
"base": "ETH",
"price": 2295.5,
"quote": "USD",
"change": -2.14,
"baseName": "Ethereum",
"marketCap": 276390239866
}
],
"status": "success"
}
}About the cex.io API
This API exposes 7 endpoints covering CEX.io cryptocurrency market data, from real-time price snapshots to full order book depth. The get_ticker endpoint returns last price, bid, ask, 24h high/low, and volume for any trading pair, while get_ohlcv delivers 1-minute, 1-hour, and 1-day candlestick arrays for completed historical dates. Both the legacy REST and newer Spot Trading APIs are represented.
Market Data Coverage
The API spans two generations of CEX.io market data endpoints. The legacy REST layer handles get_ticker, get_order_book, get_trade_history, and get_ohlcv. The Spot Trading layer adds get_spot_pairs_info and get_spot_ticker, which use a BASE-QUOTE pair format (e.g. BTC-USD) and return fields like bestBid, bestAsk, volumeUSD, and priceChangePercentage. A separate get_prices endpoint returns a flat snapshot of all supported tokens with price, marketCap, change, base, and baseName fields — useful for a quick cross-market scan without specifying a pair.
Order Books and Trade History
get_order_book accepts symbol1, symbol2, and an optional depth integer to cap the number of bid/ask levels returned. The response includes bids and asks as [price, amount] arrays alongside sell_total and buy_total aggregate figures. get_trade_history returns recent fills in reverse chronological order, each with type (buy or sell), date as a Unix timestamp string, amount, price, and a tid transaction ID. The since parameter accepts a tid to page through history, but note that tid values are pair-specific and non-transferable across pairs.
OHLCV Candles
get_ohlcv takes a date in YYYYMMDD format and a trading pair. It returns three candle resolutions in the same response: data1m, data1h, and a daily candle, each serialized as a JSON string array. The endpoint only returns data for completed historical days — requests for today or very recent dates return empty arrays. Omitting the date parameter defaults to 7 days prior to the current date.
Spot Pairs Metadata
get_spot_pairs_info returns constraint data for all tradeable pairs: baseMin, baseMax, baseLotSize, quoteMin, quoteMax, and precision settings. This is useful for validating order sizes before submitting trades or for building pair selection interfaces that respect exchange minimums.
- Displaying a live BTC-USD price ticker with bid, ask, and 24h change using
get_ticker - Visualizing order book depth charts from
get_order_bookbids and asks arrays - Backtesting trading strategies against 1-minute OHLCV candles from
get_ohlcv - Building a market cap dashboard using
marketCapandpricefields fromget_prices - Monitoring recent fill activity and trade direction (buy/sell) via
get_trade_history - Validating order size constraints before execution using
baseMin/baseMaxfromget_spot_pairs_info - Aggregating spread data across all pairs using
bestBidandbestAskfromget_spot_ticker
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does CEX.io have an official developer API?+
What does `get_ohlcv` return and what are its date constraints?+
get_ohlcv returns three candle resolutions — data1m (1-minute), data1h (1-hour), and daily — all in a single response for the specified trading pair and date. The date parameter must be in YYYYMMDD format and must refer to a fully completed historical day. Requests for today's date or very recent dates return empty data arrays.Are `tid` values from `get_trade_history` usable across different trading pairs?+
since parameter accepts a tid to retrieve trades after a specific transaction, but tid values are pair-specific. A tid obtained from BTC-USD trade history cannot be used to page through ETH-USD history and will not return the expected results.Does this API cover authenticated endpoints like order placement or account balances?+
Can I retrieve OHLCV data for candle intervals other than 1-minute and 1-hour?+
get_ohlcv endpoint returns 1-minute (data1m), 1-hour (data1h), and 1-day candles in each response. Other intervals such as 4-hour or 15-minute candles are not currently returned. You can fork this API on Parse and revise it to derive or aggregate additional intervals from the available 1-minute data.