> For the complete documentation index, see [llms.txt](https://docs.unix.market/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unix.market/websocket/public-channels/kline.md).

# Kline

Push K-line updates after block finalization, only when the bar changes.

> **No auth.** Within a bar, you receive **at most one update per block** with the latest aggregated values. When the bar closes, the final values are pushed; the next bar then opens.

## Subscribe

```json
{ "channel": "kline", "symbol_id": 100001, "interval": "1m" }
```

`interval` ∈ `1m / 5m / 15m / 30m / 1h / 2h / 4h / 6h / 8h / 12h / 1d / 1w / 1M`.

## Payload

| Field | Type         | REST equivalent |
| :---: | ------------ | --------------- |
|  `s`  | integer (ms) | `start`         |
|  `i`  | string       | `interval`      |
|  `o`  | string       | `open`          |
|  `c`  | string       | `close`         |
|  `h`  | string       | `high`          |
|  `l`  | string       | `low`           |
|  `v`  | string       | `volume`        |
|  `u`  | string       | `turnover`      |

## Example Push

```json
{
  "channel": "kline",
  "symbol_id": 100001,
  "ts": 1719500060150,
  "finality": "final",
  "data": {
    "s": 1719500000000,
    "i": "1m",
    "o": "67400.00",
    "c": "67500.50",
    "h": "67520.00",
    "l": "67380.00",
    "v": "12.345",
    "u": "832487.65",
    "t": 1719500059900
  }
}
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.unix.market/websocket/public-channels/kline.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
