Get candles
/perp/candlesPublicGet the candles (OHLC) of a perpetual market at the range resolution, 1 minute by default. Paginated, newest first. An unknown market, or one you have no access to, fails with NOT_FOUND.
from?stringStart date, unix epoch 0 by default
date-time"1970-01-01T00:00:00.000Z"to?stringEnd date, default to current time
date-time"2026-11-20T18:52:46.879Z"limit?integerNumber of entries to return, default to 1000
1 <= value <= 10001000cursor?Cursor for pagination: the nextCursor of the previous page, passed as cursor[value]
range?stringResolution of the OHLCs
"1m""1m""3m""5m""10m""15m""30m""45m""1h""2h""3h""4h""1d""1w""1month""3months"instrument*stringInstrument of the market
"inverse_perp""quanto_perp"pair*stringPair of the market
OK
application/json- response
instrument*stringInstrument of the market
"inverse_perp""quanto_perp"pair*stringPair of the market
data*array<>nextCursor*|Cursor to use for fetching the next page of results: the last candle's time. Pass it back as the cursor parameter of the next request. Returns null when there are no more results.
import { createHttpClient } from '@ln-markets/sdk/rest/v3'
const client = createHttpClient()
const result = await client.perp.getCandles({
from: '1970-01-01T00:00:00.000Z',
to: '2025-09-01T15:04:21.129Z',
limit: 500,
range: '1m',
instrument: 'inverse_perp',
pair: 'btc_usd'
}){
"instrument": "inverse_perp",
"pair": "btc_usd",
"data": [
{
"time": "2023-05-23T09:52:57.863Z",
"open": 43250.5,
"high": 43500,
"low": 43100,
"close": 43400,
"volume": 1250000
}
],
"nextCursor": {
"value": "2024-01-15T10:30:00.000Z"
}
}Get ticker GET
Get the ticker of a perpetual market: mark price, last price, executable prices by order size, 24h change and volume, the next funding and quanto…
Get funding settlements GET
Get the funding settlement history of a perpetual market. Paginated, newest first. An unknown market, or one you have no access to, fails with NOT_FOUND…