# 取得スナップショット

get_market_snapshot(code_list)

  • 概要

    スナップショットデータの取得

  • パラメータ

    パラメータ 説明
    code_list list 銘柄コードリスト
  • 戻り値

    パラメータ 説明
    ret RET_CODE API呼び出し結果
    data pd.DataFrame ret == RET_OK の場合、株式スナップショットデータ
    str ret != RET_OK の場合、エラーの説明を返す
    • 株式スナップショットデータフォーマットは以下の通りです:
      フィールド タイプ 説明
      code str 銘柄コード
      name str 銘柄名
      update_time str 現在値更新時間
      last_price float 最新価格
      open_price float 今日始値
      high_price float 高値
      low_price float 安値
      prev_close_price float 昨終値格
      volume int 出来高
      turnover float 売買代金
      turnover_rate float 売買回転率
      suspension bool かどうか売買停止
      listing_date str 上場日
      equity_valid bool 正株かどうか
      issued_shares int 総株式数
      total_market_val float 時価総額
      net_asset int 純資産
      net_profit int 純利益
      earning_per_share float EPS
      outstanding_shares int 流通株式数
      net_asset_per_share float 一株当たり純資産
      circular_market_val float 流通時価総額
      ey_ratio float 益回り
      pe_ratio float PER
      pb_ratio float PBR
      pe_ttm_ratio float PER TTM
      dividend_ttm float 配当金 TTM,配当
      dividend_ratio_ttm float 配当利回り TTM
      dividend_lfy float 配当金 LFY,上一年度配当
      dividend_lfy_ratio float 配当利回り LFY
      stock_owner str ワラントが属する正株のコード、またはオプションの原資産株コード
      wrt_valid bool ワラントかどうか
      wrt_conversion_ratio float 換株比率
      wrt_type WrtType ワラントタイプ
      wrt_strike_price float 行使価格
      wrt_maturity_date str フォーマット化ワラント到期時間
      wrt_end_trade str フォーマット化ワラント最后取引時間
      wrt_leverage float レバレッジ比率
      wrt_ipop float インザマネー/アウトオブザマネー
      wrt_break_even_point float 損益分岐点
      wrt_conversion_price float 換株価格
      wrt_price_recovery_ratio float 正株の回収価格までの距離
      wrt_score float ワラント総合スコア
      wrt_code str ワラントに対応する正株(このフィールドは廃止済みです。変更先: stock_owner)
      wrt_recovery_price float ワラント回収価格
      wrt_street_vol float ワラント街貨量
      wrt_issue_vol float ワラント発行量
      wrt_street_ratio float ワラント街貨比率
      wrt_delta float ワラントデルタ値
      wrt_implied_volatility float ワラントIV(インプライドボラティリティ)
      wrt_premium float ワラントプレミアム
      wrt_upper_strike_price float 上限価
      wrt_lower_strike_price float 下限価
      wrt_inline_price_status PriceType 界内/界外
      wrt_issuer_code str 発行体コード
      option_valid bool オプションかどうか
      option_type OptionType オプションタイプ
      strike_time str オプション行使日
      option_strike_price float 行使価格
      option_contract_size float 1 契約あたりの株数
      option_open_interest int 未決済建玉数
      option_implied_volatility float IV(インプライドボラティリティ)
      option_premium float プレミアム
      option_delta float グリークス Delta
      option_gamma float グリークス Gamma
      option_vega float グリークス Vega
      option_theta float グリークス Theta
      option_rho float グリークス Rho
      index_option_type IndexOptionType 指数オプションタイプ
      option_net_open_interest int ネット未決済建玉数
      option_expiry_date_distance int 距离満期日天数
      option_contract_nominal_value float 契約想定元本
      option_owner_lot_multiplier float 相等正株手数
      option_area_type OptionAreaType オプションタイプ(按行權時間)
      option_contract_multiplier float 契約乗数
      plate_valid bool セクタータイプかどうか
      plate_raise_count int セクタータイプ上涨支数
      plate_fall_count int セクタータイプ下跌支数
      plate_equal_count int セクタータイプ平盤支数
      index_valid bool 指数タイプかどうか
      index_raise_count int 指数タイプ上涨支数
      index_fall_count int 指数タイプ下跌支数
      index_equal_count int 指数タイプ平盤支数
      lot_size int 1手あたりの株数。株式オプションの場合は1枚あたりの株数
      、先物の場合は契約乗数
      price_spread float 現在の上方向の板情報スプレッド
      ask_price float 売値
      bid_price float 買値
      ask_vol float 売り数量
      bid_vol float 買い数量
      enable_margin bool 信用買い可能かどうか(廃止済み)
      mortgage_ratio float 株式担保率(廃止済み)
      long_margin_initial_ratio float 信用買い初期証拠金率(廃止済み)
      enable_short_sell bool 空売り可能かどうか(廃止済み)
      short_sell_rate float 空売り参考利率(廃止済み)
      short_available_volume int 残りの空売り可能数量(廃止済み)
      short_margin_initial_ratio float 空売り(信用売り)初期証拠金率(廃止済み)
      sec_status SecurityStatus 株式状態
      amplitude float 振幅
      avg_price float 平均価
      bid_ask_ratio float 委託比率
      volume_ratio float 出来高比率
      highest52weeks_price float 52 周高値
      lowest52weeks_price float 52 周安値
      highest_history_price float 過去高値
      lowest_history_price float 過去安値
      pre_price float プレマーケット価格
      pre_high_price float プレマーケット高値
      pre_low_price float プレマーケット安値
      pre_volume int プレマーケット出来高
      pre_turnover float プレマーケット売買代金
      pre_change_val float プレマーケット騰落額
      pre_change_rate float プレマーケット騰落率
      pre_amplitude float プレマーケット振幅
      after_price float アフターマーケット価格
      after_high_price float アフターマーケット高値
      after_low_price float アフターマーケット安値
      after_volume int アフターマーケット出来高
      after_turnover float アフターマーケット売買代金
      after_change_val float アフターマーケット騰落額
      after_change_rate float アフターマーケット騰落率
      after_amplitude float アフターマーケット振幅
      overnight_price float 夜間取引価格
      overnight_high_price float 夜間取引高値
      overnight_low_price float 夜間取引安値
      overnight_volume int 夜間取引出来高
      overnight_turnover float 夜間取引売買代金
      overnight_change_val float 夜間取引騰落額
      overnight_change_rate float 夜間取引騰落率
      overnight_amplitude float 夜間取引振幅
      future_valid bool かどうか先物
      future_last_settle_price float 前日決済値
      future_position float 建玉数
      future_position_change float 日次建玉変動
      future_main_contract bool かどうか主連契約
      future_last_trade_time str 最后取引時間
      trust_valid bool かどうか基金
      trust_dividend_yield float 配当利回り
      trust_aum float 資産規模
      trust_outstanding_units int 総発行口数
      trust_netAssetValue float 基準価額
      trust_premium float プレミアム
      trust_assetClass AssetClass 資産種別
  • Example

from futu import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)

ret, data = quote_ctx.get_market_snapshot(['HK.00700', 'US.AAPL'])
if ret == RET_OK:
    print(data)
    print(data['code'][0])    # 最初のレコードの銘柄コードを取得
    print(data['code'].values.tolist())   # list に変換
else:
    print('error:', data)
quote_ctx.close() # 使用後は接続をクローズしてください。接続数の枯渇を防止します。
1
2
3
4
5
6
7
8
9
10
11
  • Output
code  name              update_time  last_price  open_price  high_price  low_price  prev_close_price     volume      turnover  turnover_rate  suspension listing_date  lot_size  price_spread  stock_owner  ask_price  bid_price  ask_vol  bid_vol  enable_margin  mortgage_ratio  long_margin_initial_ratio  enable_short_sell  short_sell_rate  short_available_volume  short_margin_initial_ratio  amplitude  avg_price  bid_ask_ratio  volume_ratio  highest52weeks_price  lowest52weeks_price  highest_history_price  lowest_history_price  close_price_5min  after_volume  after_turnover sec_status  equity_valid  issued_shares  total_market_val     net_asset    net_profit  earning_per_share  outstanding_shares  circular_market_val  net_asset_per_share  ey_ratio  pe_ratio  pb_ratio  pe_ttm_ratio  dividend_ttm  dividend_ratio_ttm  dividend_lfy  dividend_lfy_ratio  wrt_valid  wrt_conversion_ratio wrt_type  wrt_strike_price  wrt_maturity_date  wrt_end_trade  wrt_recovery_price  wrt_street_vol  \
0  HK.00700  腾讯控股      2025-04-07 16:09:07      435.40      441.80      462.40     431.00            497.80  123364114  5.499476e+10          1.341       False   2004-06-16       100          0.20          NaN      435.4     435.20   281300    17300            NaN             NaN                        NaN                NaN              NaN                     NaN                         NaN      6.308    445.792        -68.499         5.627             547.00000           294.400000             706.100065            -13.202011            431.60             0    0.000000e+00     NORMAL          True     9202391012      4.006721e+12  1.051300e+12  2.095753e+11             22.774          9202391012         4.006721e+12              114.242     0.199    19.118     3.811        19.118          3.48                0.80          3.48               0.799      False                   NaN      N/A               NaN                NaN            NaN                 NaN             NaN   
1   US.AAPL    苹果  2025-04-07 05:30:43.301      188.38      193.89      199.88     187.34            203.19  125910913  2.424473e+10          0.838       False   1980-12-12         1          0.01          NaN      180.8     180.48       29      400            NaN             NaN                        NaN                NaN              NaN                     NaN                         NaN      6.172    192.554         86.480         2.226             259.81389           163.300566             259.813890              0.053580            188.93       3151311    5.930968e+08     NORMAL          True    15022073000      2.829858e+12  6.675809e+10  9.133420e+10              6.080         15016677308         2.828842e+12                4.444     1.417    30.983    42.389        29.901          0.99                0.53          0.98               0.520      False                   NaN      N/A               NaN                NaN            NaN                 NaN             NaN   

   wrt_issue_vol  wrt_street_ratio  wrt_delta  wrt_implied_volatility  wrt_premium  wrt_leverage  wrt_ipop  wrt_break_even_point  wrt_conversion_price  wrt_price_recovery_ratio  wrt_score  wrt_upper_strike_price  wrt_lower_strike_price wrt_inline_price_status  wrt_issuer_code  option_valid option_type  strike_time  option_strike_price  option_contract_size  option_open_interest  option_implied_volatility  option_premium  option_delta  option_gamma  option_vega  option_theta  option_rho  option_net_open_interest  option_expiry_date_distance  option_contract_nominal_value  option_owner_lot_multiplier option_area_type  option_contract_multiplier index_option_type  index_valid  index_raise_count  index_fall_count  index_equal_count  plate_valid  plate_raise_count  plate_fall_count  plate_equal_count  future_valid  future_last_settle_price  future_position  future_position_change  future_main_contract  future_last_trade_time  trust_valid  trust_dividend_yield  trust_aum  \
0            NaN               NaN        NaN                     NaN          NaN           NaN       NaN                   NaN                   NaN                       NaN        NaN                     NaN                     NaN                     N/A              NaN         False         N/A          NaN                  NaN                   NaN                   NaN                        NaN             NaN           NaN           NaN          NaN           NaN         NaN                       NaN                          NaN                            NaN                          NaN              N/A                         NaN               N/A        False                NaN               NaN                NaN        False                NaN               NaN                NaN         False                       NaN              NaN                     NaN                   NaN                     NaN        False                   NaN        NaN   
1            NaN               NaN        NaN                     NaN          NaN           NaN       NaN                   NaN                   NaN                       NaN        NaN                     NaN                     NaN                     N/A              NaN         False         N/A          NaN                  NaN                   NaN                   NaN                        NaN             NaN           NaN           NaN          NaN           NaN         NaN                       NaN                          NaN                            NaN                          NaN              N/A                         NaN               N/A        False                NaN               NaN                NaN        False                NaN               NaN                NaN         False                       NaN              NaN                     NaN                   NaN                     NaN        False                   NaN        NaN   

   trust_outstanding_units  trust_netAssetValue  trust_premium trust_assetClass pre_price pre_high_price pre_low_price pre_volume pre_turnover pre_change_val pre_change_rate pre_amplitude after_price after_high_price after_low_price after_change_val after_change_rate after_amplitude overnight_price overnight_high_price overnight_low_price overnight_volume overnight_turnover overnight_change_val overnight_change_rate overnight_amplitude  
0                      NaN                  NaN            NaN              N/A       N/A            N/A           N/A        N/A          N/A            N/A             N/A           N/A         N/A              N/A             N/A              N/A               N/A             N/A             N/A                  N/A                 N/A              N/A                N/A                  N/A                   N/A                 N/A  
1                      NaN                  NaN            NaN              N/A    180.68         181.98        177.47     276016  49809244.83           -7.7          -4.087         2.394       186.6          188.639          186.44            -1.78            -0.944          1.1673          176.94                186.5               174.4           533115        94944250.56               -11.44                -6.072              6.4231  
HK.00700
['HK.00700', 'US.AAPL']

1
2
3
4
5
6
7
8
9
10
11
12
13
14

APIレート制限

  • 30 秒以内に最大 60 次スナップショット。
  • 1回のリクエストにつき、APIパラメータ 銘柄コードリスト で指定できる原資産数の上限は 400 個です。
  • 香港株 BMP 権限では、1回のリクエストにおける香港証券(ワラント、CBBC、インラインワラントを含む)のスナップショット数の上限は 20 個です。
  • 香港株オプション先物 BMP 権限では、1回のリクエストにおける香港先物およびオプションのスナップショット数の上限は 20 個です。