Skip to content
Sign up

Market data

Get candles

Open, high, low, close and volume for any instrument, from one-minute candles to one-week ones.

GET/api/v1/markets/candles
curl --request GET \
  --url "https://reirex.com/api/v1/markets/candles?symbol=BTC&interval=1h" \
  --header "Accept: application/json"

200 OKapplication/json

{
  "symbol": "BTC",
  "interval": "1h",
  "source": "live",
  "candles": [
    {
      "t": 1791961200,
      "o": 72100,
      "h": 72350,
      "l": 71990,
      "c": 72260,
      "v": 60
    },
    {
      "t": 1791964800,
      "o": 72255.4,
      "h": 72345.4,
      "l": 72124.8,
      "c": 72234.8,
      "v": 89
    },
    {
      "t": 1791968400,
      "o": 72395.7,
      "h": 72485.7,
      "l": 72131,
      "c": 72241,
      "v": 71
    },
    // 297 more
  ]
}

Candles come oldest first, and the last one is still forming: its close is the latest price. Ask again at the next interval, or stream the market to see every trade that moves it.

Query parameters

  • symbolstringrequired

    The instrument's symbol, such as BTC, ASML, EURUSD or XAU.

  • intervalstringrequired

    The width of each candle.

    One of1m5m15m30m1h4h1d1w

  • limitintegerDefault: 300

    How many candles, counting back from now.

    From 10 to 1000

Response

  • symbolstring

    The instrument's symbol.

  • intervalstring

    The candle width you asked for.

  • sourcestring

    Where the prices come from.

  • candlesobject[]

    The candles, oldest first.