OHLCV candles

GET
/chains/{chain}/pairs/{address}/candles

TradingView-compatible arrays. s is no_data when the range holds no trades, which is a success, not an error.

Path Parameters

chain*string

chain slug (ton) or numeric chain id (950000)

Length1 <= length <= 32
address*string

chain-native address; EVM addresses are case-insensitive

Length1 <= length <= 128

Query Parameters

res*string

candle resolution

Value in

  • "1"
  • "3"
  • "5"
  • "15"
  • "30"
  • "45"
  • "1H"
  • "2H"
  • "4H"
  • "6H"
  • "12H"
  • "1D"
  • "1W"
  • "1M"
  • "6M"
  • "1Y"
from*integer

unix seconds, inclusive

Formatint64
Range0 <= value
to*integer

unix seconds, inclusive

Formatint64
Range0 <= value
countback?integer

return exactly this many candles ending at to, ignoring from

Formatint64
Range1 <= value <= 5000
currency?string

denomination of prices

Default"usd"

Value in

  • "usd"
  • "native"
price_from_quote?boolean

derive price from the quote token instead of the base

Defaultfalse
volume_from_quote?boolean

derive volume from the quote token instead of the base. Note for anyone porting from v2, where this defaulted to true: here it defaults to false, so the same call returns volume in base-token units rather than quote. Send it explicitly and the two versions agree.

Defaultfalse

Header Parameters

Accept-Payment?string

payment methods the client can use, comma-separated, case-insensitive. With x402 in the list, a spent keyless budget answers 402 with the x402 challenge instead of 429.

PAYMENT-SIGNATURE?string

base64 x402 v2 payment payload for this request. A paid request skips the keyless budget and is settled only when it answers 2xx. The v1 header X-PAYMENT is accepted too.

Response Body

application/json

application/problem+json

application/problem+json

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/chains/string/pairs/string/candles?res=1&from=0&to=0"
{  "s": "ok",  "t": [    0  ],  "o": [    0  ],  "h": [    0  ],  "l": [    0  ],  "c": [    0  ],  "v": [    0  ],  "err_msg": "string"}