# Historical Candles

## `GET /kline/{symbol}`

**Description:** Retrieve candlestick (K-line) data for a specific token, including price information and multiple technical indicators used for market analysis.

***

### **Request**

**HTTP Method:** `GET`\
**Endpoint:**

```
/kline/{symbol}
```

#### **Path Parameter**

| Name     | Type   | Description                        |
| -------- | ------ | ---------------------------------- |
| `symbol` | string | Token symbol / trading pair symbol |

#### **Query Parameters**

| Name        | Type   | Description                    |
| ----------- | ------ | ------------------------------ |
| `startTime` | number | Start timestamp **(required)** |
| `endTime`   | number | End timestamp **(required)**   |

***

### **Response**

**Content Type:** `application/json`

| Field   | Type          | Description                |
| ------- | ------------- | -------------------------- |
| `list`  | `KlineItem[]` | K-line & indicator records |
| `total` | number        | Total number of records    |

***

### **Type: `KlineItem`**

| Field           | Type   | Description                             |
| --------------- | ------ | --------------------------------------- |
| `symbol`        | string | Trading pair                            |
| `timestamp`     | number | Timestamp                               |
| `open`          | number | Open price                              |
| `high`          | number | Highest price                           |
| `low`           | number | Lowest price                            |
| `close`         | number | Close price                             |
| `volume`        | number | Trading volume                          |
| `macd`          | number | MACD value                              |
| `macdSignal`    | number | MACD signal line                        |
| `macdHistogram` | number | MACD histogram                          |
| `ma20`          | number | 20-period moving average                |
| `ma50`          | number | 50-period moving average                |
| `adx`           | number | Average Directional Index (ADX)         |
| `atr`           | number | Average True Range (ATR)                |
| `rsi14`         | number | 14-period Relative Strength Index (RSI) |

***

### **Functionality**

This endpoint provides historical candlestick data together with a range of technical indicators often used in market trading strategies. It supports charting, quantitative models, trend detection, and advanced technical analysis such as momentum, volatility, and trend strength evaluation.

***

### **Example Request**

```
GET https://openapi.wildmeta.ai/dataprovider/v1/kline/BTC?startTime=1636500000&endTime=1636540000
```

***

### **Example Response**

```json
{
  "list": [
    {
      "symbol": "BTC",
      "timestamp": 1636500000,
      "open": 62300.5,
      "high": 62540.0,
      "low": 62080.1,
      "close": 62410.7,
      "volume": 1832.45,
      "macd": 12.4,
      "macdSignal": 10.8,
      "macdHistogram": 1.6,
      "ma20": 62150.3,
      "ma50": 61044.7,
      "adx": 18.6,
      "atr": 210.4,
      "rsi14": 56.2
    }
  ],
  "total": 1440
}
```


---

# Agent Instructions: 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.wildmeta.ai/trading-terminal/x402-support-and-extension/data-provider/historical-candles.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.
