> For the complete documentation index, see [llms.txt](https://docs.ticko.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ticko.xyz/api-documentation/market/rest-api/get-klines.md).

# Get Klines

## Get Klines

> Returns candlestick data. Supports full available kline history. If \`start\_time\` and \`end\_time\` are omitted, the default window is the last 7 days. The maximum single query window is 365 days.\
> \
> \*\*Time filter:\*\* \`start\_time <= start < end\_time\`.\
> \
> \*\*Rate-limit weight\*\*\
> \
> \- \*\*By IP:\*\* \`2\`

```json
{"openapi":"3.1.0","info":{"title":"Ticko API","version":"1.0"},"tags":[{"name":"Market","description":"Public market data: symbols, coins, tickers, order book, trades, klines, funding rates, and reference data."}],"servers":[{"url":"https://api.testnet.ticko.xyz/v1","description":"Testnet"}],"paths":{"/market/klines":{"get":{"operationId":"getKlines","summary":"Get Klines","tags":["Market"],"description":"Returns candlestick data. Supports full available kline history. If `start_time` and `end_time` are omitted, the default window is the last 7 days. The maximum single query window is 365 days.\n\n**Time filter:** `start_time <= start < end_time`.\n\n**Rate-limit weight**\n\n- **By IP:** `2`","parameters":[{"name":"symbol_id","in":"query","required":true,"description":"Trading pair ID.","schema":{"type":"integer"}},{"name":"interval","in":"query","required":true,"description":"`1m`, `5m`, `15m`, `30m`, `1h`, `2h`, `4h`, `6h`, `8h`, `12h`, `1d`, `1w`, or `1M`.","schema":{"type":"string","enum":["1m","5m","15m","30m","1h","2h","4h","6h","8h","12h","1d","1w","1M"]}},{"name":"start_time","in":"query","required":false,"description":"Start timestamp in Unix milliseconds.","schema":{"type":"integer"}},{"name":"end_time","in":"query","required":false,"description":"End timestamp in Unix milliseconds.","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Default `1000`, maximum `5000`.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"data":{"type":"object","properties":{"list":{"type":"array","description":"Kline objects sorted by `start` ascending.","items":{"type":"object","properties":{"start":{"type":"integer","description":"Candle open timestamp."},"interval":{"type":"string","description":"Candle interval."},"open":{"type":"string","description":"Open price."},"close":{"type":"string","description":"Close price."},"high":{"type":"string","description":"High price."},"low":{"type":"string","description":"Low price."},"volume":{"type":"string","description":"Base volume."},"turnover":{"type":"string","description":"Quote turnover."}}}}}}}}]}}}}}}}},"components":{"schemas":{"Envelope":{"type":"object","description":"Standard success response envelope. `data` is defined per endpoint.","properties":{"code":{"type":"string","description":"`\"0\"` on success."},"msg":{"type":"string","description":"Empty on success."},"trace_code":{"type":"string","description":"Backend trace identifier. Empty on success."}}}}}}
```


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.ticko.xyz/api-documentation/market/rest-api/get-klines.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
