# オプション原資産履歴統計

get_option_underlying_his_statistic(code, index_option_type=IndexOptionType.NORMAL, begin_time=None, end_time=None, page_req_key=None)

  • 説明

    オプション原資産の履歴統計データを取得します。取引日単位で該当原資産に対応するオプションの出来高、建玉および Put/Call 比率の時系列を返します。ページネーション対応。

  • パラメータ

    パラメータ 説明
    code str 原資産銘柄コード
    index_option_type IndexOptionType 指数オプションタイプ
    begin_time str 開始日付、フォーマット 'YYYY-MM-DD'
    end_time str 終了日付、フォーマット 'YYYY-MM-DD'
    page_req_key bytes ページングリクエストキー
  • 戻り値

    パラメータ 説明
    ret RET_CODE インターフェース呼び出し結果
    data pandas.DataFrame ret == RET_OK の場合、統計データを返す
    str ret != RET_OK の場合、エラー説明を返す
    page_req_key bytes 次ページキー、None はデータなし
    • 戻り DataFrame フィールド:

      フィールド 説明
      code str 銘柄コード
      name str 銘柄名称
      time str 取引日時間文字列
      timestamp float 取引日タイムスタンプ(Unix 秒)
      option_volume int オプション総出来高(call_volume + put_volume)
      call_volume int コールオプション出来高
      put_volume int プットオプション出来高
      put_call_volume_ratio float Put/Call 出来高比率
      option_open_interest int オプション総建玉
      call_open_interest int コールオプション建玉(T-1 遅延)
      put_open_interest int プットオプション建玉(T-1 遅延)
      put_call_open_interest_ratio float Put/Call 建玉比率
      underlying_price float 原資産価格
  • Example

from moomoo import *

quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)

ret, data, page_req_key = quote_ctx.get_option_underlying_his_statistic(
    'US.AAPL',
    begin_time='2026-06-01',
    end_time='2026-06-15'
)
if ret == RET_OK:
    print(data)
else:
    print('error:', data)

quote_ctx.close()
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  • Output
      code  name        time     timestamp  option_volume  call_volume  put_volume  put_call_volume_ratio  option_open_interest  call_open_interest  put_open_interest put_call_open_interest_ratio  underlying_price
0  US.AAPL  Apple  2026-06-12  1.781237e+09        1273240       782941      490299               0.626227                     0                   0                  0                          N/A            291.13
1  US.AAPL  Apple  2026-06-11  1.781150e+09         950737       580535      370202               0.637691               5403058             3165108            2237950                     0.707069            295.63
2  US.AAPL  Apple  2026-06-10  1.781064e+09        1734799      1039630      695169               0.668670               5522747             3270454            2252293                     0.688679            291.58
3  US.AAPL  Apple  2026-06-09  1.780978e+09        1715749      1024046      691703               0.675461               5405022             3209586            2195436                     0.684025            290.55
4  US.AAPL  Apple  2026-06-08  1.780891e+09        2179789      1293656      886133               0.684983               5350402             3142828            2207574                     0.702416            301.54
...
1
2
3
4
5
6
7

インターフェース制限

  • 30秒以内に最大60回のオプション原資産履歴統計インターフェースリクエスト(ページング対応のインターフェースは初回呼び出しのみカウント)