---
title: "Ticker delta stream"
description: "Stream ticker changes for one instrument; a full ticker first, then only the fields that changed."
---

Payload: Prices, 24-hour statistics, open interest and funding for one instrument.

Figures that can be worked out from these fields are not sent. For example the 24-hour volume is `buy_volume_24h_b + sell_volume_24h_b`.

| | |
|---|---|
| SDK | `client.ticker_delta_stream(...)` |
| Channel | `v1.ticker.d` on `wss://market-data.<domain>/ws/full`, or `/ws/lite` for [lite names](../../guides/environments.md#encoding-full-or-lite) (the SDKs' default) |
| Selector | `<instrument>[@<rate>]` |
| Auth | None (public) |
| Kind | `delta`. The first frame after subscribing is a full snapshot (`sequence_number` `"0"`); later frames carry only what changed. |
| Sequenced | Yes: the first update's `prev_sequence_number` is at or below the subscribe reply's `latest_sequence_number`, then each one equals the last `sequence_number` ([rules](../../guides/websocket.md#sequence-numbers-and-gaps)). On a gap, re-subscribe; the next frame is a fresh snapshot. |
| Contract id | `ticker.ticker_delta` (`StreamTickerDeltaV1`) |

## Selector

Grammar `<instrument>[@<rate>]`, e.g. `BTC_USDT_Perp@500`. Parts:

- `instrument` · asset — The instrument name, e.g. `BTC_USDT_Perp` (perpetual), `BTC_USDT_SFP` (stable funding perp) or `BTC_USDT_SpotSwap` (spot swap).
- `rate` · uint32 — The minimal rate at which we publish feeds (in milliseconds)
  Delta (100, 200, 500, 1000, 5000)
  Snapshot (500, 1000, 5000)

## Frame

Type `WSTickerFeedDataV1`.

- `stream` · lite `s` · string · required — The stream this frame belongs to, e.g. `v1.ticker.s`.
- `selector` · lite `s1` · string · required — The selector this frame is for, as you subscribed with it.
- `sequence_number` · lite `sn` · string (uint64) · required — This frame's number, an unsigned 64-bit integer sent as a decimal string: compare it as an integer. `"0"` on the snapshot sent right after subscribing.
  - With `use_global_sequence_number: true` (recommended), the number is unique across the exchange. One exchange event can produce several frames, so the number is `event number × 10^5 + a counter` that tells them apart.
  - With `false`, it counts up by one per frame of this stream and starts again when the server you are connected to restarts.
- `feed` · lite `f` · object Ticker · required — A ticker matching the request filter
- `feed.event_time` · lite `et` · string (int64 unix ns) · optional — Time at which the event was emitted in unix nanoseconds
- `feed.instrument` · lite `i` · string (instrument name) · optional — The instrument name, e.g. `BTC_USDT_Perp` (perpetual), `BTC_USDT_SFP` (stable funding perp) or `BTC_USDT_SpotSwap` (spot swap).
- `feed.mark_price` · lite `mp` · string · optional — The mark price of the instrument. Decimal string, e.g. "65000.5"; up to 9 decimals.
- `feed.index_price` · lite `ip` · string · optional — The index price of the instrument. Decimal string, e.g. "65000.5"; up to 9 decimals.
- `feed.last_price` · lite `lp` · string · optional — The price of the last trade (the close price). Decimal string, e.g. "65000.5"; up to 9 decimals.
- `feed.last_size` · lite `ls` · string · optional — The number of assets traded in the last trade. Decimal string, e.g. "0.01"; up to the instrument's base_decimals.
- `feed.mid_price` · lite `mp1` · string · optional — The mid price of the instrument. Decimal string, e.g. "65000.5"; up to 9 decimals.
- `feed.best_bid_price` · lite `bb` · string · optional — The best bid price of the instrument. Decimal string, e.g. "65000.5"; up to 9 decimals.
- `feed.best_bid_size` · lite `bb1` · string · optional — The number of assets offered on the best bid price of the instrument. Decimal string, e.g. "0.01"; up to the instrument's base_decimals.
- `feed.best_ask_price` · lite `ba` · string · optional — The best ask price of the instrument. Decimal string, e.g. "65000.5"; up to 9 decimals.
- `feed.best_ask_size` · lite `ba1` · string · optional — The number of assets offered on the best ask price of the instrument. Decimal string, e.g. "0.01"; up to the instrument's base_decimals.
- `feed.funding_rate_8h_curr` · lite `fr` · string · optional — Deprecated and will be removed. Use `funding_rate`.
- `feed.funding_rate_8h_avg` · lite `fr1` · string · optional — Deprecated and will be removed. Use `funding_rate`.
- `feed.interest_rate` · lite `ir` · string · optional — The interest rate of the underlying, in percent (`"0.01"` = 0.01%).
- `feed.forward_price` · lite `fp` · string · optional — [Options] The forward price of the option. Decimal string, e.g. "65000.5"; up to 9 decimals.
- `feed.buy_volume_24h_b` · lite `bv` · string · optional — Taker buy volume over the last 24 hours, in the base asset. Decimal string, e.g. "0.01"; up to the instrument's base_decimals.
- `feed.sell_volume_24h_b` · lite `sv` · string · optional — Taker sell volume over the last 24 hours, in the base asset. Decimal string, e.g. "0.01"; up to the instrument's base_decimals.
- `feed.buy_volume_24h_q` · lite `bv1` · string · optional — Taker buy volume over the last 24 hours, in the quote asset. Decimal string, e.g. "12.5".
- `feed.sell_volume_24h_q` · lite `sv1` · string · optional — Taker sell volume over the last 24 hours, in the quote asset. Decimal string, e.g. "12.5".
- `feed.high_price` · lite `hp` · string · optional — The highest trade price of the last 24 hours. Decimal string, e.g. "65000.5"; up to 9 decimals.
- `feed.low_price` · lite `lp1` · string · optional — The lowest trade price of the last 24 hours. Decimal string, e.g. "65000.5"; up to 9 decimals.
- `feed.open_price` · lite `op` · string · optional — The first trade price of the last 24 hours. Decimal string, e.g. "65000.5"; up to 9 decimals.
- `feed.open_interest` · lite `oi` · string · optional — The open interest in the instrument. Decimal string, e.g. "0.01"; up to the instrument's base_decimals.
- `feed.long_short_ratio` · lite `ls1` · string · optional — The ratio of accounts that are net long to accounts that are net short on this instrument.
- `feed.funding_rate` · lite `fr2` · string · optional — The indicative funding rate for the current funding interval, in percent (`"0.01"` = 0.01%). Absent for stable funding perps, which have `funding_rate_long_apr_pct` and `funding_rate_short_apr_pct` instead.
- `feed.next_funding_time` · lite `nf` · string (int64 unix ns) · optional — When the current funding interval ends, in unix nanoseconds.
- `feed.status` · lite `s` · enum InstrumentStatus · optional — The current status of the instrument
  Values: `ACTIVE`, `REDUCE_ONLY`, `MAINTENANCE`, `HALTED`, `CLOSED`, `PENDING`, `DELISTED` ([details](../enums.md#instrumentstatus)).
- `feed.session` · lite `s1` · enum TradingSessionType · optional — The current trading session of the instrument's underlying market
  Values: `REGULAR`, `PRE_MARKET`, `AFTER_MARKET`, `OVERNIGHT`, `CLOSE` ([details](../enums.md#tradingsessiontype)).
- `feed.long_open_interest` · lite `lo` · string · optional — The long open interest in the instrument. Decimal string, e.g. "0.01"; up to the instrument's base_decimals. Excludes qualified-maker and DMM open interest.
- `feed.short_open_interest` · lite `so` · string · optional — The short open interest in the instrument. Decimal string, e.g. "0.01"; up to the instrument's base_decimals. Excludes qualified-maker and DMM open interest.
- `feed.funding_rate_long_apr_pct` · lite `fr3` · string · optional — Stable perps only: the indicative annual rate for retail longs at the next charge, in percent a year (`'-5.5'` = retail longs pay 5.5%; positive = retail receives, negative = retail pays). Updated when the rates change. Absent for other kinds.
- `feed.funding_rate_short_apr_pct` · lite `fr4` · string · optional — Stable perps only: the indicative annual rate for retail shorts at the next charge, in percent a year (`'-5'` = retail shorts pay 5%; positive = retail receives, negative = retail pays). Updated when the rates change. Absent for other kinds.
- `prev_sequence_number` · lite `ps` · string (uint64) · required — The `sequence_number` of the frame before this one on this selector. If it doesn't match the last frame you accepted, you missed frames.

## Errors

Subscribe errors arrive as a JSON-RPC `error` object `{code, message}` (lite `{c, m}`). Codes this stream can return ([all error codes](../errors.md)):

`1002` InternalServer (500) · `1004` NotFound (404) · `1101` InvalidFeedFormat (400) · `1102` PrimarySelectorParts (400) · `1103` SecondarySelectorParts (400) · `3000` InvalidInstrument (400) · `3030` InvalidFeedRate (400)

## Example

```python
import asyncio

from grvt import AsyncGrvt


async def main():
    async with AsyncGrvt(env="testnet") as client:
        async with client.ticker_delta_stream(instrument="BTC_USDT_Perp", rate=500) as sub:
            async for frame in sub:
                print(frame.sequence_number, frame.feed)


asyncio.run(main())
```

Raw WebSocket: connect to `wss://market-data.$GRVT_DOMAIN/ws/full` (`/ws/lite` for lite names) and send:

With full field names:

```json
{
  "jsonrpc": "2.0",
  "method": "subscribe",
  "params": {
    "stream": "v1.ticker.d",
    "selectors": ["BTC_USDT_Perp@500"],
    "use_global_sequence_number": true
  },
  "id": 1
}
```

With lite field names:

```json
{
  "j": "2.0",
  "m": "subscribe",
  "p": {
    "s": "v1.ticker.d",
    "s1": ["BTC_USDT_Perp@500"],
    "ug": true
  },
  "i": 1
}
```

The reply's `result` is a `WSSubscribeResult` (`subs`, `num_snapshots`, `latest_sequence_number`); then frames arrive in the shape under Frame above, with no JSON-RPC envelope.
