Get Single
Get Single Asset OHLCV
Retrieve OHLCV data for a specific asset
GET
/
v1
/
assets
/
{idOrSlug}
/
ohlcv
Get Asset OHLCV
curl --request GET \
--url https://api.blockworks.com/v1/assets/{idOrSlug}/ohlcv \
--header 'x-api-key: <api-key>'import requests
url = "https://api.blockworks.com/v1/assets/{idOrSlug}/ohlcv"
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.blockworks.com/v1/assets/{idOrSlug}/ohlcv', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"open": 2991.0164373997,
"high": 4514.81,
"low": 4347.24,
"close": 2972.9752699223,
"volume": 14018548707.668,
"updated_at": 1759454319,
"asset_code": "ETH",
"asset_slug": "ethereum"
}Overview
Get the current OHLCV (Open, High, Low, Close, Volume) data for a specific asset over the last 24 hours. This endpoint returns just the OHLCV data block withasset_code and asset_slug included.
Example Request
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.blockworks.com/v1/assets/ethereum/ohlcv"
const res = await fetch(
'https://api.blockworks.com/v1/assets/ethereum/ohlcv',
{ headers: { 'x-api-key': 'YOUR_API_KEY' } }
)
const data = await res.json()
import requests
r = requests.get(
'https://api.blockworks.com/v1/assets/ethereum/ohlcv',
headers={'x-api-key': 'YOUR_API_KEY'}
)
data = r.json()
Example Response
{
"open": 2991.0164373997,
"high": 4514.81,
"low": 4347.24,
"close": 2972.9752699223,
"volume": 14018548707.668,
"updated_at": 1759454319,
"asset_code": "ETH",
"asset_slug": "ethereum"
}
Response Fields
| Field | Type | Description |
|---|---|---|
open | number | Price at the start of the trailing 24h window |
high | number | Highest price during the trailing 24h window |
low | number | Lowest price during the trailing 24h window |
close | number | Price at the end of the trailing 24h window |
volume | number | Total traded volume over the trailing 24h window |
updated_at | number | Unix timestamp when values were last refreshed |
asset_code | string | Asset code (e.g., “ETH”) |
asset_slug | string | Asset slug (e.g., “ethereum”) |
Notes
- This endpoint is equivalent to using
?expand=ohlcv_last_24_hon the/v1/assets/{idOrSlug}endpoint, but returns only the OHLCV data. - The response includes
asset_codeandasset_slugfor easy identification.
See also
Authorizations
Path Parameters
Response
OHLCV data for the specified asset
Unix timestamp
Maximum string length:
20Maximum string length:
100