# 獲取事件合約里程碑列表

get_event_contract_milestone_list(category=None, competition=None, related_event=None, next_page=None, count=None)

  • 介紹

    獲取事件合約里程碑列表。里程碑是賽事類事件合約的重要時間節點(如某場比賽),支援按分類、賽事、關聯事件過濾與分頁。

  • 參數

    參數 類型 說明
    category str 一級分類,例如 'Sports'
    competition str 賽事名稱,來自 filter_competition
    related_event str 關聯事件代碼
    next_page str 翻頁標記,首頁傳 None
    count int 返回數量上限
  • 返回

    參數 類型 說明
    ret RET_CODE 介面調用結果
    data pd.DataFrame 當 ret == RET_OK,返回里程碑列表
    str 當 ret != RET_OK,返回錯誤描述
    next_page str 下一頁翻頁標記,為空表示沒有下一頁

    返回的 DataFrame 欄位如下:

    欄位 類型 說明
    milestone_code str 里程碑代碼
    title str 里程碑名稱(多語言)
    category str 一級分類標識
    type str 里程碑類型,參見 ECMilestoneType
    start_date str 開始時間
    end_date str 結束時間
    primary_event_code str 主事件代碼
    related_events list 關聯事件代碼列表
    notification_message str 通知訊息(多語言)
  • Example

from moomoo import *

quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)
ret, data, next_page = quote_ctx.get_event_contract_milestone_list(
    category='Sports', count=5
)
if ret == RET_OK:
    print(data)
    print('next_page:', next_page)
else:
    print('error:', data)
quote_ctx.close()
1
2
3
4
5
6
7
8
9
10
11
12
  • Output
                                       milestone_code             title category                         type  start_date end_date                  primary_event_code                                  related_events notification_message
0  EC.d8a4c769-6d6b-45b0-90c0-aaa40ffefbbe.MILESTONE     France vs Spain   Sports  SOCCER_TOURNAMENT_MULTI_LEG  2026-07-14      N/A  EC.KXWCADVANCE-26JUL14FRAESP.EVENT  [EC.KXWCADVANCE-26JUL14FRAESP.EVENT, EC.KXWCGAME-26JUL14FRAESP.EVENT, ...]  The game is about to begin.
1  EC.9ed9d180-9fa6-4a26-9b75-36e9bfb1081a.MILESTONE  England vs Argentina   Sports  SOCCER_TOURNAMENT_MULTI_LEG  2026-07-15      N/A  EC.KXWCADVANCE-26JUL15ENGARG.EVENT  [EC.KXWCADVANCE-26JUL15ENGARG.EVENT, EC.KXWCGAME-26JUL15ENGARG.EVENT, ...]  The game is about to begin.
next_page: 5
1
2
3
4

介面限制

  • 每 30 秒內最多請求 10 次獲取事件合約里程碑列表介面