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

# Ticker

Real-time ticker snapshots for a symbol.

* Topic: `ticker.<symbol>` (e.g., `ticker.BTC-USDC`)
* Stream: Public (`wss://api.ekiden.fi/ws/public`)

## Subscribe

```json theme={null}
{ "op": "subscribe", "args": ["ticker.BTC-USDC"], "req_id": "101001" }
```

Ack:

```json theme={null}
{ "op": "subscribed", "args": ["ticker.BTC-USDC"], "req_id": "101001" }
```

## Event shape

`data` is a `TickerSnapshot`.

```json theme={null}
{
  "op": "event",
  "topic": "ticker.BTC-USDC",
  "server_ts_ms": 1731541800000,
  "data": {
    "symbol": "BTC-USDC",
    "addr": "0xmarket...",
    "last_price": "100000",
    "index_price": "99900",
    "mark_price": "100050",
    "prev_price_24h": "99000",
    "high_price_24h": "101000",
    "low_price_24h": "98000",
    "prev_price_1h": "99800",
    "volume_24h": "123456",
    "turnover_24h": "987654321",
    "open_interest": "12345",
    "open_interest_value": "987654321",
    "funding_rate": "0.0001",
    "next_funding_time": "1718003600000",
    "best_ask_size": "3",
    "best_ask_price": "100100",
    "best_bid_size": "5",
    "best_bid_price": "100000"
  }
}
```

Notes:

* `next_funding_time` and `server_ts_ms` are in milliseconds (encoded as strings).
* Prices and other numeric values are strings to preserve precision.

### Fields

| Field                 | Type   | Notes                                |
| --------------------- | ------ | ------------------------------------ |
| symbol                | string | Market symbol                        |
| addr                  | string | Market address                       |
| last\_price           | string | Last traded price                    |
| mark\_price           | string | Mark price                           |
| index\_price          | string | Oracle/index price                   |
| prev\_price\_24h      | string | Market price 24 hours ago            |
| high\_price\_24h      | string | Highest price in the last 24 hours   |
| low\_price\_24h       | string | Lowest price in the last 24 hours    |
| prev\_price\_1h       | string | Market price 1 hour ago              |
| open\_interest        | string | Open interest size (base units)      |
| open\_interest\_value | string | Open interest value (quote units)    |
| funding\_rate         | string | Funding rate (e.g. "0.0001" = 1 bps) |
| next\_funding\_time   | string | Next funding time (ms)               |
| volume\_24h           | string | 24h base volume                      |
| turnover\_24h         | string | 24h quote turnover                   |
| best\_ask\_size       | string | Best ask size                        |
| best\_ask\_price      | string | Best ask price                       |
| best\_bid\_size       | string | Best bid size                        |
| best\_bid\_price      | string | Best bid price                       |
