# 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']; a single str is automatically wrapped into a list
  • 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

    The returned DataFrame fields are as follows:

    Field Type Description
    code str Contract code
    name str Contract name (localized)
    event_code str Owning Event code
    yes_sub_title str YES sub-title (localized)
    no_sub_title str NO sub-title (localized)
    status str Contract status, see ECStatus
    price float Latest price
    cumulative_volume float Cumulative volume
    yes_bid float YES best bid
    yes_bid_size float YES best bid size
    yes_ask float YES best ask
    yes_ask_size float YES best ask size
    no_bid float NO best bid
    no_bid_size float NO best bid size
    no_ask float NO best ask
    no_ask_size float NO best ask size
    last_trade_time str Latest trade time (yyyy-MM-dd HH:mm:ss)
    volume_24h float 24h volume
    open_interest float Open interest
  • Example

from futu 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
10
11
  • 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