Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

candleSnapshot

OHLCV bars for one instrument. The window is [startTime, endTime). A request that would span more than 3000 bars may be rejected as an empty list.

coin accepts a name (BTC-USDC) or the numeric id from perpMeta, or an outcome instrumentId. On an outcome market the closes are probabilities in [0, 1].

data is a candle array, not a paged { data, hasMore, total } object.

POST/infotype candleSnapshot

Seed a candlestick chart; then keep the last bar live with candle.

Request body
reqobjectrequired
coinstringrequired

Instrument name (`BTC-USDC`) or numeric id from `perpMeta`, or an outcome `instrumentId`.

endTimeinteger · uint64required

Window end, Unix milliseconds.

intervalstringrequired
"1m""3m""5m""15m""30m""1h""2h""4h""8h""12h""1d"
startTimeinteger · uint64required

Window start, Unix milliseconds. The returned range is `[startTime, endTime)`.

typestringrequired

Must be `candleSnapshot`.

"candleSnapshot"
Request example
curl -X POST https://rpc.txflow-testnet.xyz/info \
  -H "Content-Type: application/json" \
  -H "x-api-version: 2026-08-16" \
  -d '{
  "type": "candleSnapshot",
  "req": {
    "coin": "1",
    "interval": "1d",
    "startTime": 1712484000000,
    "endTime": 1720260000000
  }
}'
Try it
POST https://rpc.txflow-testnet.xyz/info
Response 200
codeinteger

`0` on success.

dataCandle[]
cstring
hstring
istring

Echo of the requested `interval`.

lstring
ninteger · uint64

Trade count in the bar.

ostring
sstring

Echo of the requested `coin`.

tinteger · uint64

Bar open time, Unix milliseconds.

Tinteger · uint64

Bar close time, Unix milliseconds.

vstring
successboolean
Response example
{
  "success": true,
  "code": 0,
  "data": [
    {
      "t": 1720000000000,
      "T": 1720086400000,
      "o": "65000.0",
      "h": "66100.0",
      "l": "64800.0",
      "c": "65500.0",
      "v": "12.4",
      "n": 842,
      "s": "1",
      "i": "1d"
    }
  ]
}