> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upsidemax.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# WebSocket Ticker

> Subscribe to ticker for a contract's 24-hour rolling statistics pushed roughly once a second — price change, high, low, volume, funding rate, mark and oracle price.

The `ticker` channel pushes a contract's **24-hour rolling statistics** about once per second. Each frame carries the same fields as one entry of the REST [`ticker`](/info/ticker) response, so you can drive a market header or watchlist row from the stream alone. This is a public channel and requires no authentication.

To track every contract at once with a lighter payload, use the [`allMarkets`](/websocket/all-markets) channel instead.

## Subscribing

```json theme={null}
{"method": "subscribe", "subscription": {"type": "ticker", "asset": "1"}}
```

<ParamField body="asset" type="string" required>
  The contract ID to track, as a decimal string. Subscribe once per contract.
</ParamField>

## Push message format

```json theme={null}
{
  "msg": "Ticker",
  "channel": "ticker.1",
  "data": {
    "asset": "1",
    "lastPx": "1010",
    "openPx": "1000",
    "priceChange": "10",
    "priceChangePct": "1.0000",
    "highPx": "1010",
    "lowPx": "990",
    "volume": "30000",
    "count": 3,
    "windowStartMs": 1754367200000,
    "fundingRate": "125",
    "fundingTime": 1754450000000,
    "markPx": "1010",
    "oraclePx": "1012"
  },
  "ts": 1754453600000
}
```

## Field reference

<ResponseField name="asset" type="string">
  The contract ID this frame describes.
</ResponseField>

<ResponseField name="lastPx" type="string">
  Most recent trade price (raw integer string).
</ResponseField>

<ResponseField name="openPx" type="string">
  Baseline price 24 hours ago — the earliest trade inside the window.
</ResponseField>

<ResponseField name="priceChange" type="string">
  `lastPx − openPx`, signed (raw integer string).
</ResponseField>

<ResponseField name="priceChangePct" type="string">
  Percentage change over the window, signed, to four decimal places. Already a percentage — do not rescale it. Returns `"0"` when `openPx` is `0`.
</ResponseField>

<ResponseField name="highPx" type="string">
  Highest trade price within the window.
</ResponseField>

<ResponseField name="lowPx" type="string">
  Lowest trade price within the window.
</ResponseField>

<ResponseField name="volume" type="string">
  Traded volume over the window in base units (raw integer string).
</ResponseField>

<ResponseField name="count" type="int64">
  Number of trades within the window.
</ResponseField>

<ResponseField name="windowStartMs" type="int64">
  Start of the window in Unix milliseconds, or the earliest trade for a contract listed less than 24 hours ago.
</ResponseField>

<ResponseField name="fundingRate" type="string">
  Current funding rate per funding interval, signed, as a raw fixed-point integer with a scale of **1e8** (`1e8` = `100%`). The true rate is `fundingRate / 1e8`; display percent is `fundingRate / 1e6`. Returns `"0"` if never published.

  <Warning>
    The scale is `1e8` — **not** basis points (`1e4`) and not `1e6`.
  </Warning>
</ResponseField>

<ResponseField name="fundingTime" type="int64">
  Unix millisecond timestamp at which the current funding rate was set. `0` if never set.
</ResponseField>

<ResponseField name="markPx" type="string">
  Current mark price (raw integer string), from the same source as [`marketState`](/info/market-state). `"0"` if never published.
</ResponseField>

<ResponseField name="oraclePx" type="string">
  Current oracle (index) price (raw integer string), from the same source as [`marketState`](/info/market-state). `"0"` if never published.
</ResponseField>

<ResponseField name="ts" type="int64">
  Frame send time in Unix milliseconds.
</ResponseField>

## Consuming the stream

<Steps>
  <Step title="Replace, do not accumulate">
    Every frame is a full snapshot of the rolling window, not a delta. Overwrite your local ticker state on each frame.
  </Step>

  <Step title="Expect roughly one frame per second">
    Within a single push cycle, all contracts share the same window endpoints, so values across contracts are directly comparable.
  </Step>

  <Step title="Convert raw values">
    Apply the contract's `priceScale` and `qtyScale` from [`configs`](/info/configs) before display. `priceChangePct` is already a percentage.
  </Step>
</Steps>

<Tip>
  `markPx` and `oraclePx` follow price publication rather than trading activity, so a quiet contract still streams live prices with `volume` at `"0"`.
</Tip>
