Get futures coin OHLCV
Get historical OHLCV (Open, High, Low, Close, Volume) candlestick data for a specific coin's futures markets. Includes aggregated volume, open interest, and funding rate metrics per time interval.
https://api.coinranking.com/v2/futures/coin/:uuid/ohlcv
Preview access
Free, Basic and Startup plans can test this endpoint with five successful requests per account per UTC day. Use the documented endpoint URL with your existing API key. Preview access is applied automatically. The allowance resets at 00:00 UTC.
All API keys, resource IDs, query parameters and pagination requests share this endpoint's allowance for your account. Failed requests do not consume the preview allowance. Successful previews also count toward your normal API usage, and your plan's result, historical-window and rate limits still apply. See endpoint previews for limits, response headers and quota errors.
Path parameters
| Parameter | Description |
|---|---|
uuid String | UUID of the coin whose futures OHLCV data you want to retrieve. UUIDs can be found using the coins endpoint or by checking the URL on coinranking.com. |
Query parameters
| Parameter | Description |
|---|---|
referenceCurrencyUuid (optional) String | UUID of coin (either fiat or crypto), in which all prices, volume, and open interest values are calculated. Defaults to US Dollar, but you can use any coin. You can find UUIDs for reference currencies in any coin endpoint, including a convenient dedicated reference currency endpoint. Default value: yhjMzLPhuIDlExample:
https://api.coinranking.com/v2/futures/coin/Qwsogvtv82FCd/ohlcv?referenceCurrencyUuid=5k-_VTxqtCEI
|
interval (optional) String | The time interval for each OHLCV candle. Default value: dayAllowed values: minute hour day Example:
https://api.coinranking.com/v2/futures/coin/Qwsogvtv82FCd/ohlcv?interval=hour
|
limit (optional) Number | Limit. Used for pagination. The maximum amount of results you can fetch in one request is 100 for Free and 5000 for all paid plans, including previews where available. Default value: 50Size range: 0-5000 Example:
https://api.coinranking.com/v2/futures/coin/Qwsogvtv82FCd/ohlcv?limit=24
|
offset (optional) Number | Offset. Used for pagination. Default value: 0Example:
https://api.coinranking.com/v2/futures/coin/Qwsogvtv82FCd/ohlcv?offset=50
|
Code examples
curl 'https://api.coinranking.com/v2/futures/coin/Qwsogvtv82FCd/ohlcv?interval=hour&limit=24' \
-H 'x-access-token: your-api-key' \
-G const options = {
headers: {
'x-access-token': 'your-api-key',
},
};
fetch('https://api.coinranking.com/v2/futures/coin/Qwsogvtv82FCd/ohlcv?interval=hour&limit=24', options)
.then((response) => response.json())
.then((result) => console.log(result)); <?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.coinranking.com/v2/futures/coin/Qwsogvtv82FCd/ohlcv?interval=hour&limit=24",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"x-access-token: your-api-key"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response; import requests
headers = {
'x-access-token': 'your-api-key'
}
response = requests.request("GET", "https://api.coinranking.com/v2/futures/coin/Qwsogvtv82FCd/ohlcv?interval=hour&limit=24", headers=headers)
print(response.text) Response
HTTP/1.1 200 OK
{
"status": "success",
"data": {
"ohlc": [
{
"startingAt": 1781751600,
"endingAt": 1781755200,
"open": "64666.485149336484",
"high": "64666.485149336484",
"low": "64246.48003981144",
"close": "64256.31282669365",
"avg": "64394.6839676963",
"fundingRate": "0.0004590414603976",
"24hVolume": "50763275697.59846",
"intervalVolume": "2098612030.9823127",
"openInterest": "27311986293.88096"
},
{
"startingAt": 1781748000,
"endingAt": 1781751600,
"open": "64515.10650160997",
"high": "64729.10228094825",
"low": "64471.85033569906",
"close": "64669.42572509435",
"avg": "64630.49546985798",
"fundingRate": "0.001634332243547448",
"24hVolume": "50293148694.23656",
"intervalVolume": "2095390882.2745335",
"openInterest": "27333883954.1142"
}
]
}
} Response fields
| Property | Description |
|---|---|
status String | Status of the request. Allowed values:success |
data.ohlc Object[] | List of OHLC items. |
data.ohlc.startingAt Number | An Epoch timestamp in seconds marking the start of the time period on which the OHLC values are based. |
data.ohlc.endingAt Number | An Epoch timestamp in seconds marking the end of the time period on which the OHLC values are based. |
data.ohlc.open String|null | Opening price of the coin for the time period in the reference currency. |
data.ohlc.high String|null | Highest price of the coin during the time period in the reference currency. |
data.ohlc.low String|null | Lowest price of the coin during the time period in the reference currency. |
data.ohlc.close String|null | Closing price of the coin for the time period in the reference currency. |
data.ohlc.avg String|null | Average price of the coin over the time period in the reference currency. |
data.ohlc.24hVolume String|null | Total 24h volume of the coin in the reference currency. |
data.ohlc.intervalVolume String|null | Total volume of the coin for the specified time interval in the reference currency. |
data.ohlc.openInterest String|null | Open interest at the end of the interval, in the reference currency. |
data.ohlc.fundingRate String|null | Open-interest-weighted average 8-hour funding rate across all markets for this coin during the interval. Null when not available. |
Error response
HTTP/1.1 404 Not Found
{
"status": "fail",
"type": "COIN_NOT_FOUND",
"message": "Coin not found"
} Error responses
| Error | Description |
|---|---|
VALIDATION_ERROR Object | The request could not be validated. The response should provide more details. |
REFERENCE_UNAVAILABLE Object | The reference currency used in the request is not available. Choose another UUID. |
| Error | Description |
|---|---|
COIN_NOT_FOUND Object | The coin could not be found. Try another UUID. |