GET /price/history/:symbol
Historical OHLCV candlestick data.
Cost: $0.02 USDC
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Token symbol |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| interval | string | 1h | Candle interval: 1m, 5m, 15m, 1h, 4h, 1d |
| limit | int | 24 | Number of candles (max 1000) |
| start | string | - | Start time (ISO 8601) |
| end | string | - | End time (ISO 8601) |
Request
response = client.get(
"https://api.foursec.xyz/price/history/ETH?interval=1h&limit=24"
)
data = response.json()
Response
{
"symbol": "ETH",
"interval": "1h",
"total_candles": 24,
"candles": [
{
"timestamp": "2026-07-04T14:00:00Z",
"open": 2448.10,
"high": 2455.20,
"low": 2445.80,
"close": 2450.32,
"volume_usd": 520000,
"source_count": 3
},
{
"timestamp": "2026-07-04T13:00:00Z",
"open": 2445.50,
"high": 2449.00,
"low": 2443.20,
"close": 2448.10,
"volume_usd": 480000,
"source_count": 3
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
| symbol | string | Token symbol |
| interval | string | Candle interval used |
| total_candles | int | Number of candles returned |
| candles | array | Array of candle objects |
Candle Object
| Field | Type | Description |
|---|---|---|
| timestamp | string | ISO 8601 candle start time |
| open | float | Opening price |
| high | float | Highest price |
| low | float | Lowest price |
| close | float | Closing price |
| volume_usd | float | Volume in USD |
| source_count | int | Number of DEX sources |
Intervals
| Interval | Max Limit | Description |
|---|---|---|
| 1m | 1440 | 1-minute candles (max 24h) |
| 5m | 288 | 5-minute candles (max 24h) |
| 15m | 96 | 15-minute candles (max 24h) |
| 1h | 720 | 1-hour candles (max 30 days) |
| 4h | 180 | 4-hour candles (max 30 days) |
| 1d | 365 | Daily candles (max 1 year) |