Skip to content

GET /price/history/:symbol

Historical OHLCV candlestick data.

Cost: $0.02 USDC

Parameters

Path Parameters

ParameterTypeRequiredDescription
symbolstringYesToken symbol

Query Parameters

ParameterTypeDefaultDescription
intervalstring1hCandle interval: 1m, 5m, 15m, 1h, 4h, 1d
limitint24Number of candles (max 1000)
startstring-Start time (ISO 8601)
endstring-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

FieldTypeDescription
symbolstringToken symbol
intervalstringCandle interval used
total_candlesintNumber of candles returned
candlesarrayArray of candle objects

Candle Object

FieldTypeDescription
timestampstringISO 8601 candle start time
openfloatOpening price
highfloatHighest price
lowfloatLowest price
closefloatClosing price
volume_usdfloatVolume in USD
source_countintNumber of DEX sources

Intervals

IntervalMax LimitDescription
1m14401-minute candles (max 24h)
5m2885-minute candles (max 24h)
15m9615-minute candles (max 24h)
1h7201-hour candles (max 30 days)
4h1804-hour candles (max 30 days)
1d365Daily candles (max 1 year)

Released under the MIT License.