> For the complete documentation index, see [llms.txt](https://docs.outpoll.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.outpoll.com/api/futures-api/websockets/futures-market-data/ticker.md).

# Ticker

Real-time rolling 24-hour statistics and market-open status for futures pairs.

Use this stream for pair lists and headers: last price, 24h open, high, low, volume, change, and whether the pair's market is open right now.

## Endpoint

```
wss://futures-marketdata-service.outpoll.com/ws/ticker/24h
```

## Authentication

No authentication required.

## Message Envelope

| Field | Type    | Description                        |
| ----- | ------- | ---------------------------------- |
| `pi`  | integer | Pair ID                            |
| `o`   | number  | Price 24 hours ago                 |
| `h`   | number  | Highest price in the last 24 hours |
| `lo`  | number  | Lowest price in the last 24 hours  |
| `c`   | number  | Last price                         |
| `v`   | number  | Volume over the last 24 hours      |
| `cp`  | number  | Change over 24 hours, percent      |
| `mon` | boolean | Market open now                    |

## Message Types

| Type                        | Direction       | Description                                                                                    |
| --------------------------- | --------------- | ---------------------------------------------------------------------------------------------- |
| `subscribe` / `unsubscribe` | Client → Server | Start or stop pairs                                                                            |
| Ticker                      | Server → Client | Complete 24h ticker of one pair                                                                |
| Error                       | Server → Client | `{"er", "msg"}` — see [Errors](broken://pages/7b60c6363e2dcb27a5c7d2ef03222a2bd85342c5#errors) |
| `ping` / `pong`             | Both            | Plain-text keep-alive                                                                          |

## Subscribe

```json
{"act": "subscribe", "ps": [1, 2, 3]}
```

Every pair:

```json
{"act": "subscribe", "all": true}
```

Server confirmation: there is no confirmation frame. Right after subscribing you receive the current ticker of each subscribed pair. With `all: true` you receive the current ticker of **every** pair at once, then updates for all pairs.

## When Frames Are Sent

* When the pair's price or 24h statistics change.
* When the pair's trading session opens or closes. The frame repeats the last values with the new `mon`, so you learn about a closed market even when no trade happens.

Each frame is the complete ticker of one pair — replace the previous value.

## Market Open Now (`mon`)

* `true` — the pair's market is open and trading.
* `false` — the pair is outside its trading session (for example, tokenized stocks and commodities outside exchange hours).
* Pairs that trade around the clock are always `true`.

## Ticker Payload

```json
{
  "pi": 1,
  "o": 63488.1,
  "h": 64612.0,
  "lo": 63102.4,
  "c": 64250.5,
  "v": 18452.913,
  "cp": 1.2000,
  "mon": true
}
```

| Field | Type    | Description                                                                                 |
| ----- | ------- | ------------------------------------------------------------------------------------------- |
| `pi`  | integer | Pair ID                                                                                     |
| `o`   | number  | Price 24 hours ago                                                                          |
| `h`   | number  | 24h high                                                                                    |
| `lo`  | number  | 24h low                                                                                     |
| `c`   | number  | Last price                                                                                  |
| `v`   | number  | 24h volume in the base coin                                                                 |
| `cp`  | number  | 24h change in percent, `(c − o) / o × 100`; `1.2000` = +1.2 %, negative when the price fell |
| `mon` | boolean | `true` = market open now, `false` = session closed                                          |

{% hint style="info" %}
This is a rolling 24-hour window, not the daily candle. Do not mix it with `1d` candles.
{% endhint %}

## Python Example

{% code title="ticker.py" %}

```python
import asyncio
import json
from decimal import Decimal

import websockets

URL = "wss://futures-marketdata-service.outpoll.com/ws/ticker/24h"


async def main():
    tickers = {}
    async with websockets.connect(URL) as ws:
        await ws.send(json.dumps({"act": "subscribe", "all": True}))
        async for raw in ws:
            if raw == "pong":
                continue
            msg = json.loads(raw, parse_float=Decimal)
            if "er" in msg:
                print("error:", msg)
                continue
            tickers[msg["pi"]] = msg
            status = "open" if msg["mon"] else "closed"
            print(f"pair {msg['pi']}: {msg['c']} ({msg['cp']:+}%) market {status}")


asyncio.run(main())
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.outpoll.com/api/futures-api/websockets/futures-market-data/ticker.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
