期權全市場每日成交量或持倉量統計
GET/api/v1.0/quote/option-market-statistic期權全市場每日成交量或持倉量統計。option_market:US_SECURITY / US_INDEX / HK_SECURITY / HK_INDEX;data_type:VOLUME / OPEN_INTEREST。 時間範圍 begin_time / end_time(YYYY-MM-DD)不超過 365 天。返回每日 call/put/total 及 put/call 比,按交易日降序。 單標的歷史請用 quote.option_underlying_his_statistic。
請求參數
| 參數 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
option_market | string | 查詢 | 是 | 期權市場。US_SECURITY=美股股票 / US_INDEX=美股指數 / HK_SECURITY=港股股票 / HK_INDEX=港股指數 |
data_type | string | 查詢 | 是 | 統計類型。VOLUME=成交量 / OPEN_INTEREST=持倉量(延遲披露) |
begin_time | string | 查詢 | 是 | 開始日期 YYYY-MM-DD。日期格式 YYYY-MM-DD,時區隨標的市場 |
end_time | string | 查詢 | 是 | 結束日期 YYYY-MM-DD,與 begin_time 間隔不超過 365 天。日期格式 YYYY-MM-DD,時區隨標的市場 |
請求示例
bash
curl -X GET 'https://webapi.moomoo.com/api/v1.0/quote/option-market-statistic?option_market=US_SECURITY&data_type=VOLUME' \
-H 'Authorization: Bearer <AccessToken>' | jq響應參數
| 參數 | 類型 | 說明 |
|---|---|---|
data.statistics | object[] | |
data.statistics[].time | string | 交易日 YYYY-MM-DD。日期格式 YYYY-MM-DD,時區隨標的市場 |
data.statistics[].timestamp | int | 交易日時間戳,Unix 微秒 |
data.statistics[].call_value | string | Call 合計(成交量或持倉量,由 data_type 決定) |
data.statistics[].put_value | string | Put 合計 |
data.statistics[].total_value | string | Call+Put 合計 |
data.statistics[].ratio | string | Put/Call 比值,call 為 0 時為 0 |
錯誤碼
| ret_code | error.code | 說明 |
|---|---|---|
| 0 | — | 成功 |
| -3 | invalid_parameter | 參數不合法 |
| -8 | unsupported | 不支持 |
| -10 | no_data | 沒有數據 |
響應示例
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"statistics": [
{
"time": "example",
"timestamp": 1710000000000000,
"call_value": "example",
"put_value": "example",
"total_value": "example",
"ratio": "example"
}
]
}
}