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

ticker

Pushes last price, 24-hour change, high/low, and volume for one instrument every few seconds, starting right after you subscribe. Served by the API service at /api-ws.

Channeltickerserver → client · type ticker

Show last price, 24-hour change, high/low, and volume for one instrument.

Subscribe
{
  "method": "subscribe",
  "subscription": {
    "type": "ticker",
    "coin": "BTC",
    "instrumentId": 1
  }
}
Try it
WS wss://rpc.txflow-testnet.xyz/api-ws
Subscription parameters
coinstringrequired

Instrument name (`BTC` or `BTC-USDC`); for an Outcome market, its `instrument_id` as a string.

instrumentIdintegerrequired

The same instrument's id (`index` from `perpMeta`). Must match `coin`, or the subscription is rejected.

typestringrequired
"ticker"
Server message
channelstring
"ticker"
dataobject
coinstring

Base name.

coinVlmstring

24-hour volume, in base units.

dayHighPxstring
dayLowPxstring
dayNtlVlmstring

24-hour notional volume, in quote.

instrumentIdinteger
lastPricestring
prevDayPxstring

Price 24 hours ago.

Message example
{
  "channel": "ticker",
  "data": {
    "coin": "BTC",
    "instrumentId": 1,
    "lastPrice": "83280.6",
    "prevDayPx": "83110.4",
    "dayHighPx": "84032.7",
    "dayLowPx": "80896.1",
    "dayNtlVlm": "32544402.28",
    "coinVlm": "393.4642"
  }
}

coin and instrumentId must name the same instrument — { "coin": "BTC", "instrumentId": 1 } — or the subscription is rejected with instrument_id … does not match coin …. For an Outcome market pass its instrument_id as both. Each push is a full snapshot, sent even when nothing changed; fields are empty strings until the instrument has traded.