curl --request GET \
--url https://api.darvas.app/v1/crypto/prices \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.darvas.app/v1/crypto/prices"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.darvas.app/v1/crypto/prices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ticker": "BTC-USDT",
"exchange": "okx",
"market_type": "spot",
"interval": "day",
"interval_multiplier": 1,
"prices": [
{
"open": 96520.1,
"close": 97811.4,
"high": 98240,
"low": 95910.2,
"volume": 8312.47,
"time": "2026-11-24T00:00:00.000Z",
"time_milliseconds": 1795564800000,
"quote_volume": 806155230.15
}
]
}{
"error": "VALIDATION_ERROR",
"message": "Send ticker or cik"
}{
"error": "UNAUTHORIZED",
"message": "The API key is not valid"
}{
"error": "PLAN_REQUIRED",
"message": "The account of this key has no active data API plan"
}{
"error": "NOT_FOUND",
"message": "No company has this ticker or CIK"
}{
"error": "RATE_LIMITED",
"message": "Too many requests"
}{
"error": "INTERNAL_ERROR",
"message": "Something went wrong"
}{
"error": "UNAVAILABLE",
"message": "The data service is unavailable"
}Crypto Historical OHLCV Prices & Formula API
Query crypto spot and perpetual OHLCV bars across 9 exchanges, Darvas composite feeds and custom spread formulas with cursor pagination up to 500.
curl --request GET \
--url https://api.darvas.app/v1/crypto/prices \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.darvas.app/v1/crypto/prices"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.darvas.app/v1/crypto/prices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ticker": "BTC-USDT",
"exchange": "okx",
"market_type": "spot",
"interval": "day",
"interval_multiplier": 1,
"prices": [
{
"open": 96520.1,
"close": 97811.4,
"high": 98240,
"low": 95910.2,
"volume": 8312.47,
"time": "2026-11-24T00:00:00.000Z",
"time_milliseconds": 1795564800000,
"quote_volume": 806155230.15
}
]
}{
"error": "VALIDATION_ERROR",
"message": "Send ticker or cik"
}{
"error": "UNAUTHORIZED",
"message": "The API key is not valid"
}{
"error": "PLAN_REQUIRED",
"message": "The account of this key has no active data API plan"
}{
"error": "NOT_FOUND",
"message": "No company has this ticker or CIK"
}{
"error": "RATE_LIMITED",
"message": "Too many requests"
}{
"error": "INTERNAL_ERROR",
"message": "Something went wrong"
}{
"error": "UNAVAILABLE",
"message": "The data service is unavailable"
}Overview
This endpoint returns historical and live OHLCV candles from one minute to one month for Darvas aggregated pairs (exchange=darvas) and for single instruments across nine primary crypto exchanges. The open candle in progress arrives on the newest page.
| Coverage | Details |
|---|---|
| Aggregated feed | darvas combines every primary exchange that lists a spot or perpetual swap pair, plus ALLUSD pairs (BTC-ALLUSD, BTC-ALLUSD-SWAP) that merge USD, USDT and USDC markets |
| Single exchanges | okx (default), binance, bybit, hyperliquid, coinbase, kraken, bitstamp, deribit and bitfinex |
| Formulas | Inverses, ratios, spreads and arithmetic over listed crypto instruments, typed (USDTBTC, BTCUSDT*USDTETH, BTCUSDT/NVDAUSDT, COINBASE:BTCUSD - BINANCE:BTCUSDT) or canonical (1 / [okx:BTC-USDT-SWAP]), on exchange=formula |
| Frames | minute x 1, 5, 15, 30; hour x 1, 2, 4, 6, 12; day (default), week, month x 1, in UTC |
| Updated | Live: the newest minute updates as trades arrive |
| Page size | 500 candles; limit counts across pages, default 5,000, up to 50,000 |
| MCP tool | list_crypto_prices on the data API MCP server |
Aggregated feeds and venues
Passexchange=darvas to combine every exchange that lists a canonical pair: BASE-QUOTE for spot (BTC-USDT, BTC-ALLUSD) or BASE-QUOTE-SWAP for perpetuals (BTC-USDT-SWAP, BTC-ALLUSD-SWAP).
- Price and volume math. Each aggregated candle takes the median open and close across reporting exchanges, drops closes more than 25% off the median and wicks more than 5% past the median high or low when three or more exchanges report, and sums base
volumeandquote_volume. - ALLUSD stablecoin guard. On
ALLUSDpairs, if USDT or USDC strays more than 0.5% from fiat USD in a candle, Darvas drops that stablecoin from the bucket so a depeg cannot pull the series. - Venue filtering. Pass a comma-separated
venueslist (up to 16 exchanges, such asvenues=binance,coinbase,okx) withexchange=darvasto aggregate only those exchanges. Sendingvenueswith any single exchange returns400. - Response scope. Answers for
exchange=darvasincludeconstituents(every exchange the pair combines) andvenues(the filtered subset, ornullwhen all constituents are combined). Both fields are absent for single-exchange requests.
Inverse, ratio and spread formulas
ticker also takes a formula over listed crypto instruments, written as in the chart’s pair search or in the canonical form an answer names it by:
| Formula | Typed | Canonical form |
|---|---|---|
| Inverse | USDTBTC, 1/BTCUSDT | 1 / [okx:BTC-USDT-SWAP] |
| Ratio | BTCUSDT/NVDAUSDT, BTC/NVDA, BTCNVDA, BTCUSDT*USDTETH | [okx:BTC-USDT-SWAP] / [okx:NVDA-USDT-SWAP] |
| Spread | COINBASE:BTCUSD - BINANCE:BTCUSDT | [coinbase:BTC-USD] - [binance:perpetual:BTCUSDT] |
| Arithmetic | (BTCUSDT + ETHUSDT) / 2 | ([okx:BTC-USDT-SWAP] + [okx:ETH-USDT-SWAP]) / 2 |
- Exchange. Send
exchange=formulato readtickeras a formula. Without it, a ticker no exchange lists is read as a formula before it is refused, and a symbol without anEXCHANGE:prefix is looked up on theexchangesent first.market_typepicks the market a symbol is read in first. - Resolution. A typed symbol resolves as the chart’s pair search resolves it: Darvas aggregated pairs first, then OKX, Binance, Bybit and the other exchanges, perpetuals before spot.
USDTBTCwith noexchangeanswers as1 / [darvas:BTC-USDT-SWAP]while Darvas lists that pair. The canonical form names every leg’s exchange and id, so it always reads the same legs. - Answer. A formula answers with
exchangeformula,market_typesynthetic, the canonical formula asticker, the name Darvas shows asdisplay_symbol(such asUSDTBTCorBTC/NVDA) and itslegs, each a listed instrument withexchange,tickerandmarket_type. - Candles. A formula’s candle is the formula of its legs’ candles at every time all legs hold one: open from the legs’ opens, close from their closes, and high and low the highest and lowest of the formula at the legs’ opens, highs, lows and closes. A one-leg formula such as an inverse keeps its leg’s volume; any other formula has volume
0. - Crypto only. Every leg is a listed instrument on a crypto exchange. A formula naming a CFD or partner broker symbol (such as
1 / [ctrader:EURUSD]) returns400, one with a leg no exchange lists returns404, andvenueswith a formula returns400./crypto/tickersresolves a formulaqueryto the same canonicalticker.
Instrument IDs and pagination
Single-exchange IDs follow each venue:BTC-USDT or BTC-USDT-SWAP on OKX, ETH-USDC-SWAP on Hyperliquid, BTC-USD on Coinbase, and spot:BTCUSDT or perpetual:BTCUSDT on Binance and Bybit. A bare Binance or Bybit symbol such as BTCUSDT also works with market_type (spot or swap, defaulting to spot). Use /crypto/tickers to list every instrument and aggregated pair with its constituents.
Pages walk back in time: the first page ends at end_date (today by default), each next_page_url continues before it, and the last page reaches start_date. Every page lists its candles oldest first. A formula’s pages work the same way, and each page reads its legs again, so every leg stays a listed crypto instrument.
For the latest price alone, see /crypto/prices/snapshot. For precomputed moving averages, RSI, MACD, Bollinger Bands and ATR on these candles, see /crypto/indicators.
Examples
import os
import requests
headers = {"X-API-KEY": os.environ["DARVAS_API_KEY"]}
url = "https://api.darvas.app/v1/crypto/prices"
# Aggregated BTC across USD, USDT and USDC spot markets on selected exchanges
agg = requests.get(
url,
headers=headers,
params={
"ticker": "BTC-ALLUSD",
"exchange": "darvas",
"venues": "binance,coinbase,kraken,okx",
"interval": "hour",
"interval_multiplier": 4,
"start_date": "2026-11-01",
},
).json()
print("Constituents:", agg["constituents"], "Filtered:", agg["venues"])
for candle in agg["prices"][-3:]:
print(candle["time"], candle["close"], candle["volume"])
curl -H "X-API-KEY: $DARVAS_API_KEY" \
"https://api.darvas.app/v1/crypto/prices?ticker=BTC-USDT-SWAP&exchange=okx&interval=day&start_date=2026-11-01"
# Daily candles of BTC priced in NVDA, from the two OKX perpetuals
curl -H "X-API-KEY: $DARVAS_API_KEY" -G "https://api.darvas.app/v1/crypto/prices" \
--data-urlencode "ticker=OKX:BTC-USDT-SWAP / OKX:NVDA-USDT-SWAP" \
--data-urlencode "exchange=formula" \
--data-urlencode "start_date=2026-11-01"
Authorizations
Query Parameters
The instrument id: BTC-USDT or BTC-USDT-SWAP on OKX, ETH-USDC-SWAP on Hyperliquid, BTC-USD on Coinbase, spot:BTCUSDT or perpetual:BTCUSDT on Binance and Bybit. A Binance or Bybit symbol such as BTCUSDT also works with market_type, spot without it. A Darvas aggregated pair is BASE-QUOTE or BASE-QUOTE-SWAP, such as BTC-USDT-SWAP, or BTC-ALLUSD for one combining its USD, USDT and USDC markets. A formula over listed crypto instruments is typed as in the chart's pair search, such as USDTBTC (the inverse of BTC-USDT), BTCUSDT*USDTETH, BTCUSDT/NVDAUSDT, BTC/NVDA, COINBASE:BTCUSD - BINANCE:BTCUSDT or (BTCUSDT + ETHUSDT) / 2, or sent in the canonical form an answer names it by, such as 1 / [okx:BTC-USDT-SWAP]. Every leg is a listed instrument on a crypto exchange. With exchange formula the ticker is read as a formula; without it, a ticker no exchange lists is read as one, its symbols looked up on the exchange sent first.
512^[A-Za-z0-9 ._:@/()\[\]*+^-]{1,512}$Response
List crypto candles: one page.
The answer of GET /crypto/prices.