Olympus
History

Kline/candlestick data

Get kline/candlestick data for a symbol. Returns data in Binance array-of-arrays format. This is a public endpoint — no authentication required. Requires `DATABASE_URL` to be configured.

GET
/api/v1/klines

Get kline/candlestick data for a symbol. Returns data in Binance array-of-arrays format. This is a public endpoint — no authentication required. Requires DATABASE_URL to be configured.

Query Parameters

symbol*string

Trading pair (e.g. ETH-USD)

interval*string

Kline interval

Value in"1m" | "5m" | "15m" | "1h" | "4h" | "1d"
startTime?integer

Start time in milliseconds since epoch

Formatint64
endTime?integer

End time in milliseconds since epoch

Formatint64
limit?integer

Number of klines to return (1–1000, default 500)

Default500
Range1 <= value <= 1000

Response Body

application/json

application/json

application/json

curl -X GET "http://localhost:3000/api/v1/klines?symbol=ETH-USD&interval=1h"
[
  [
    1709040000000,
    "3210.50",
    "3250.00",
    "3200.00",
    "3245.75",
    "14523.8000",
    1709040059999,
    "0",
    308,
    "0",
    "0",
    "0"
  ]
]
{
  "code": -1121,
  "msg": "Invalid symbol."
}
{
  "code": -1,
  "msg": "history not available"
}