Quote
This API is used to obtain the history candlestick data of security.
message SecurityHistoryCandlestickRequest {
string symbol = 1;
Period period = 2;
AdjustType adjust_type = 3;
HistoryCandlestickQueryType query_type = 4;
OffsetQuery offset_request = 5;
DateQuery date_request = 6;
}
message SecurityCandlestickResponse {
string symbol = 1;
repeated Candlestick candlesticks = 2;
}
Quote Permission RequiredFree
- Quota-based access: 100–3,000 unique symbols per calendar month depending on account tier (resets monthly; see quota table in the docs).
- US stocks: US LV1 included free by default (pre-market, regular, after-hours, and overnight sessions).
- HK stocks: LV1 included by default.
- US options: no permission by default — purchase "OPRA US Options Quotes (OpenAPI)".
Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
symbol | string | Required | Security code, in ticker.region format, e.g. 700.HK |
period | int32 | Required | Candlestick period |
adjust_type | int32 | Required | Adjustment type |
query_type | int32 | Required | Type of query (1-by offset, 2-by date) |
date_request | object | Optional | Required when querying by date |
└ start_date | string | Optional | Date of query begin, in YYYYMMDD format |
└ end_date | string | Optional | Date of query end, in YYYYMMDD format |
offset_request | object | Optional | Required when querying by offset |
└ direction | int32 | Required | Query direction (0-historical, 1-latest) |
└ date | string | Optional | Query date, in YYYYMMDD format; default latest trading day |
└ minute | string | Optional | Query time, in HHMM format; only valid for minute-level data |
└ count | int32 | Optional | Count of candlestick, range [1,1000]; default 10 |
trade_session | int32 | Optional | Trading session, 0: intraday, 100: All (pre, intraday, post, overnight) |
Response fields
| Name | Type | Required | Description |
|---|---|---|---|
symbol | string | Optional | Security code, e.g. AAPL.US |
candlesticks | object[] | Optional | Candlestick data |
└ close | string | Optional | Close price |
└ open | string | Optional | Open price |
└ low | string | Optional | Low price |
└ high | string | Optional | High price |
└ volume | int64 | Optional | Volume |
└ turnover | string | Optional | Turnover |
└ timestamp | int64 | Optional | Timestamp |
└ trade_session | int32 | Optional | Trade session |
Response JSON example
{
"symbol": "700.HK",
"candlesticks": [
{
"close": "362.000",
"open": "364.600",
"low": "361.600",
"high": "368.800",
"volume": 10853604,
"turnover": "3954556819.000",
"timestamp": 1650384000
}
]
}