Skip to content
RealMarketAPI

historical ohlcv data api download

Historical OHLCV Data API: Paginated Bulk Download Guide

Download years of OHLCV candle history with the history endpoint using pagination, rate-limit awareness, and local storage patterns.

Summary

Retrieve bulk OHLCV history with cursor-based pagination and store locally for backtesting or analytics pipelines.

Runnable example

Paginated history fetch. Replace YOUR_KEY with your API key.

Paginated history fetch
curl -X GET "https://api.realmarketapi.com/api/v1/history
  ?ApiKey=YOUR_KEY
  &symbolCode=XAUUSD
  &timeFrame=H1
  &startTime=2025-08-01T00:00:00Z
  &endTime=2026-08-01T00:00:00Z
  &pageSize=1000"

Production notes

  • 01Throttle bulk requests to stay within your plan rate limits — use a short sleep between pages.
  • 02Store candles in an append-only format and resume from the last saved OpenTime on re-run.
  • 03Validate that returned candle counts match the expected range before committing to storage.

Run this example with your own key

Create a free account, then try the request in the playground before wiring it into production.