# Get Event Contract Snapshot

get_event_contract_snapshot(code_list)

  • Description

    Get the snapshot data of event contracts, including real-time quote fields such as latest price, cumulative volume, YES/NO best bid and ask, etc.

  • Parameters

    Parameter Type Description
    code_list list List of event contract codes, e.g. ['EC.KXODIMATCH-26JUL140600INDENG-IND']
  • Return

    Parameter Type Description
    ret RET_CODE API call result
    data pd.DataFrame When ret == RET_OK, returns the event contract snapshot data
    str When ret != RET_OK, returns the error description
  • Example

from moomoo import *

quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)
ret, data = quote_ctx.get_event_contract_snapshot(code_list=['EC.KXODIMATCH-26JUL140600INDENG-IND'])
if ret == RET_OK:
    print(data)
else:
    print('error:', data)
quote_ctx.close()
1
2
3
4
5
6
7
8
9
  • Output
                                  code                     name                             event_code yes_sub_title no_sub_title  status  price  cumulative_volume  yes_bid  yes_bid_size  yes_ask  yes_ask_size  no_bid  no_bid_size  no_ask  no_ask_size      last_trade_time  volume_24h  open_interest
0  EC.KXODIMATCH-26JUL140600INDENG-IND  England vs India Winner?  EC.KXODIMATCH-26JUL140600INDENG.EVENT         India        India  ACTIVE    0.5          18746.7      0.5        1030.0     0.51        2650.6    0.49       2650.6     0.5       1030.0  2026-07-13 04:34:55    17744.76       16983.43
1
2

Interface Limitations

  • A maximum of 10 requests per 30 seconds for the event contract snapshot interface