Get coin trading volume history
With the coin trading-volume-history endpoint you can retrieve a coin's historical trading volume. Each value is the total volume traded over the given interval, expressed in the reference currency (e.g. US Dollar or Bitcoin). Use this data to build volume charts, compare activity across periods, or analyze trends.
https://api.coinranking.com/v2/coin/:uuid/trading-volume-history
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 you want to request trading volume history for. A UUID is our unique identifier for each coin. You can find them in all our coin endpoints, or look them up in the find UUID page. |
Query parameters
| Parameter | Description |
|---|---|
referenceCurrencyUuid (optional) String | UUID of the reference currency (fiat or crypto) in which volumes are expressed. You can find UUIDs in our coin endpoints or the reference currencies endpoint. Default value: yhjMzLPhuIDl (US Dollar)Example:
https://api.coinranking.com/v2/coin/Qwsogvtv82FCd/trading-volume-history?referenceCurrencyUuid=5k-_VTxqtCEI
|
interval (optional) String | The interval determines the time period over which each volume item is aggregated. Default value: dayAllowed values: hour day week month Example:
https://api.coinranking.com/v2/coin/Qwsogvtv82FCd/trading-volume-history?interval=hour
|
limit (optional) Number | Maximum number of history entries to return. For example, when interval=day and limit=30, data is returned for the last 30 days. Free is limited to 100 results per response. All other plans can receive up to 5000 results per response, including previews. Default value: 50Size range: 1-5000 Example:
https://api.coinranking.com/v2/coin/Qwsogvtv82FCd/trading-volume-history?limit=100
|
Code examples
curl 'https://api.coinranking.com/v2/coin/Qwsogvtv82FCd/trading-volume-history?interval=day&limit=50' \
-H 'x-access-token: your-api-key' \
-G const options = {
headers: {
'x-access-token': 'your-api-key',
},
};
fetch('https://api.coinranking.com/v2/coin/Qwsogvtv82FCd/trading-volume-history?interval=day&limit=50', 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/coin/Qwsogvtv82FCd/trading-volume-history?interval=day&limit=50",
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/coin/Qwsogvtv82FCd/trading-volume-history?interval=day&limit=50", headers=headers)
print(response.text) Response
HTTP/1.1 200 OK
{
"status": "success",
"data": {
"history": [
{
"timestamp": 1770422400000,
"volume": "42791236212.35"
},
{
"timestamp": 1770508800000,
"volume": "27425856445.82"
},
{
"timestamp": 1770595200000,
"volume": "29311576049.00"
}
]
}
} Response fields
| Property | Description |
|---|---|
status String | Status of the request Allowed values:success |
data Object | |
data.history Object[] | List of trading volume entries |
data.history.timestamp Number | An Epoch timestamp in seconds |
data.history.volume String/null | Trading volume over the interval in the reference currency. |
Error response
HTTP/1.1 404 Not Found
{
"status": "fail",
"type": "COIN_NOT_FOUND",
"message": "Coin not found"
} Error responses
| Error | Description |
|---|---|
COIN_NOT_FOUND Object | The coin could not be found. Try another UUID. |
| 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. |