Skip to main content
GET
/
v1
/
market
/
kline
K-line (Candlestick) Data
curl --request GET \
  --url https://api.tickdb.ai/v1/market/kline \
  --header 'X-API-Key: <api-key>'
{
  "code": 0,
  "message": "success",
  "data": {
    "symbol": "700.HK",
    "interval": "1h",
    "klines": [
      {
        "time": 1773291600000,
        "open": "545.5",
        "high": "546.5",
        "low": "541.5",
        "close": "543.5",
        "volume": "1549300",
        "quote_volume": "842560983.33"
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.tickdb.ai/llms.txt

Use this file to discover all available pages before exploring further.

Notes

  • This endpoint returns historical K-line data for completed periods, data is fixed and will not change
  • Suitable for strategy backtesting, technical indicator calculation, and data archiving
  • For real-time K-line data in the current period, use Real-time K-Line: /v1/market/kline/latest

Supported Markets

Forex, Metals, Indices, US Stocks, HK Stocks, A-Shares, Crypto Examples:
  • Forex: EURUSD, GBPUSD, USDJPY
  • Metals: XAUUSD, XAGUSD
  • Indices: SPX, NDX, DJI
  • US Stocks: AAPL.US, TSLA.US, MSFT.US
  • HK Stocks: 700.HK, 9988.HK, 3690.HK
  • A-Shares: 000001.SH, 000001.SZ
  • Crypto: BTCUSDT, ETHUSDT, ADAUSDT

Request Parameters

ParameterRequiredDescription
symbolYesTrading symbol code
intervalYesK-line period, options: 1m, 5m, 15m, 30m, 1h, 2h, 4h, 1d, 1w, 1M
limitNoNumber of records, default 100, max 1000
start_timeNoStart timestamp (milliseconds)
end_timeNoEnd timestamp (milliseconds)

Response Fields

FieldDescription
symbolTrading Symbol
intervalK-line period
klinesK-line data array
└─ timeK-line timestamp (milliseconds)
└─ openOpening price
└─ highHighest price
└─ lowLowest price
└─ closeClosing price
└─ volumeTrading volume
└─ quote_volumeTrading amount

Authorizations

X-API-Key
string
header
required

Query Parameters

symbol
string
default:700.HK
required

Trading symbol

Example:

"700.HK"

interval
enum<string>
default:1h
required

K-line interval

Available options:
1m,
5m,
15m,
30m,
1h,
2h,
4h,
1d,
1w,
1M
Example:

"1h"

limit
integer

Number of records (default 100, max 1000)

Required range: 1 <= x <= 1000
Example:

100

start_time
integer

Start timestamp in milliseconds

Example:

1703123456789

end_time
integer

End timestamp in milliseconds

Example:

1703209856789

Response

200 - application/json

Successful response

code
integer
Example:

0

message
string
Example:

"success"

data
object