# イベントコントラクト Event リスト取得
- Python
- Proto
- C#
- Java
- C++
- JavaScript
get_event_contract_event_list(series_code, status=None, next_page=None, count=None)
説明
Series コードに基づきイベントコントラクト Event リストを取得し、ステータスフィルターとページネーションをサポートします。1 つの Event は 1 つの取引可能なイベント銘柄(例:ある選挙)に対応し、その下に複数の Contract(YES/NO コントラクト)が紐付きます。
パラメータ
パラメータ 型 説明 series_code str Series コード、例: 'EC.KXUFCVICROUND.SERIES'status ECStatus イベントステータスフィルター、未指定は全件返却 next_page str ページネーションマーカー、先頭ページは None、以降は前回返却されたnext_pageを指定count int 返却件数の上限 戻り値
パラメータ 型 説明 ret RET_CODE API呼出結果 data pd.DataFrame ret == RET_OK の場合、イベントリストを返却 str ret != RET_OK の場合、エラー説明を返却 next_page str 次ページのページネーションマーカー、空はデータ終了を示す 返却される DataFrame のフィールドは以下の通りです:
フィールド 型 説明 event_code str Event コード(例: EC.KXUFCVICROUND-26JUL11SAIPIM.EVENT)event_name str イベント名(多言語) event_sub_name str イベントサブタイトル(多言語) status str イベントステータス、ECStatus 参照 series_code str 所属 Series コード start_date str 開始時間(例: 2026-07-11 23:10:00)end_date str 終了時間 category str 1级カテゴリ識別子 tags list 2级カテゴリ識別子リスト mutually_exclusive bool コントラクト結果が相互排他か competition str 競技名(多言語) competition_scope str 競技タイプ/プレイ(多言語) Example
from futu import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)
ret, data, next_page = quote_ctx.get_event_contract_event_list(
'EC.KXUFCVICROUND.SERIES', count=5
)
if ret == RET_OK:
print(data)
print('next_page:', next_page)
else:
print('error:', data)
quote_ctx.close()
2
3
4
5
6
7
8
9
10
11
12
- Output
event_code event_name event_sub_name status series_code start_date end_date category tags mutually_exclusive competition competition_scope
0 EC.KXUFCVICROUND-26JUL11SAIPIM.EVENT Benoit Saint-Denis vs. Paddy Pimblett: Round of Victory Benoit Saint-Denis vs Paddy Pimblett (Jul 11) EVENT_FINALIZED EC.KXUFCVICROUND.SERIES 2026-07-11 23:10:00 N/A Hot [] True 329 N/A
1 EC.KXUFCVICROUND-26JUL11ROYKAV.EVENT Brandon Royval vs. Loneer Kavanagh: Round of Victory Brandon Royval vs Loneer Kavanagh (Jul 11) EVENT_FINALIZED EC.KXUFCVICROUND.SERIES 2026-07-11 21:55:00 N/A Hot [] True 329 N/A
2 EC.KXUFCVICROUND-26JUL11STEELL.EVENT Gable Steveson vs. Elisha Ellison: Round of Victory Gable Steveson vs Elisha Ellison (Jul 11) EVENT_FINALIZED EC.KXUFCVICROUND.SERIES 2026-07-11 20:10:00 N/A Hot [] True 329 N/A
3 EC.KXUFCVICROUND-26JUL11MCGHOL.EVENT Conor McGregor vs. Max Holloway: Round of Victory Conor McGregor vs Max Holloway (Jul 11) EVENT_FINALIZED EC.KXUFCVICROUND.SERIES 2026-07-11 23:38:00 N/A Hot [] True 329 N/A
4 EC.KXUFCVICROUND-26JUL11ROYKAV.EVENT Leon Shahbazyan vs. Levan Chokheli: Round of Victory Leon Shahbazyan vs Levan Chokheli (Jun 20) EVENT_FINALIZED EC.KXUFCVICROUND.SERIES 2026-06-20 18:10:00 2026-06-20 18:15:31 Hot [] True UFC Fight Night N/A
next_page: 5
2
3
4
5
6
7
# Qot_GetEventContractEventList.proto
説明
Series コードに基づきイベントコントラクト Event リストを取得します。
パラメータ
// イベント項目
message EventItem {
required Qot_Common.Security eventSecurity = 1; // {market=101, code="EC.KXGDP-27JAN30"}
optional string eventName = 2; // イベント名(多言語)
optional string eventSubName = 3; // イベントサブタイトル(多言語)
optional Qot_Common.EC_Status status = 4; // イベントステータス
optional Qot_Common.Security seriesSecurity = 5; // 所属 Series
optional string startDate = 6; // 開始時間(UTC ISO8601、例 2025-09-26T18:30:00Z)
optional string endDate = 7; // 終了時間(UTC ISO8601、例 2025-09-26T18:30:00Z)
optional string category = 8; // 1级カテゴリ識別子
repeated string tags = 9; // 2级カテゴリ識別子リスト(1つの event は複数 tag に所属可能)
optional bool mutuallyExclusive = 10; // コントラクト結果が相互排他か
optional string competition = 11; // 競技名(多言語)
optional string competitionScope = 12; // 競技タイプ/プレイ(多言語)
}
message C2S {
required Qot_Common.Security series = 1; // Series 銘柄 {market=101, code="EC.KXEPLGAME"}
optional Qot_Common.EC_Status status = 2; // イベントステータスフィルター(未指定は全件)
optional string nextPage = 3; // ページネーションマーカー(先頭ページは省略)
optional int32 count = 4; // 1ページ最大返却数(デフォルト200)
}
message Request {
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
- 戻り値
message S2C {
repeated EventItem eventList = 1; // イベントリスト
optional string nextPage = 2; // 空は次ページなしを示す
}
message Response {
required int32 retType = 1 [default = -400]; //RetType,結果
optional string retMsg = 2;
optional int32 errCode = 3;
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
- API呼出結果、構造は RetType 参照
uint GetEventContractEventList(GetEventContractEventList.Request req);
virtual void OnReply_GetEventContractEventList(FTAPI_Conn client, uint nSerialNo, GetEventContractEventList.Response rsp);
説明
Series コードに基づきイベントコントラクト Event リストを取得します。
パラメータ
message EventItem {
required Qot_Common.Security eventSecurity = 1;
optional string eventName = 2;
optional string eventSubName = 3;
optional Qot_Common.EC_Status status = 4;
optional Qot_Common.Security seriesSecurity = 5;
optional string startDate = 6;
optional string endDate = 7;
optional string category = 8;
repeated string tags = 9;
optional bool mutuallyExclusive = 10;
optional string competition = 11;
optional string competitionScope = 12;
}
message C2S {
required Qot_Common.Security series = 1;
optional Qot_Common.EC_Status status = 2;
optional string nextPage = 3;
optional int32 count = 4;
}
message Request {
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
- 銘柄構造は Security 参照
- 戻り値
message S2C {
repeated EventItem eventList = 1;
optional string nextPage = 2;
}
message Response {
required int32 retType = 1 [default = -400];
optional string retMsg = 2;
optional int32 errCode = 3;
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
- API呼出結果、構造は RetType 参照
- Example
public class Program : FTSPI_Qot, FTSPI_Conn
{
FTAPI_Qot qot = new FTAPI_Qot();
public Program()
{
qot.SetClientInfo("csharp", 1);
qot.SetConnCallback(this);
qot.SetQotCallback(this);
}
public void Start()
{
qot.InitConnect("127.0.0.1", (ushort)11111, false);
}
public void OnInitConnect(FTAPI_Conn client, long errCode, String desc)
{
if (errCode != 0) return;
QotCommon.Security series = QotCommon.Security.CreateBuilder()
.SetMarket((int)QotCommon.QotMarket.QotMarket_EventContract)
.SetCode("EC.KXUFCVICROUND.SERIES").Build();
var c2s = GetEventContractEventList.C2S.CreateBuilder()
.SetSeries(series).SetCount(5).Build();
var req = GetEventContractEventList.Request.CreateBuilder().SetC2S(c2s).Build();
uint seqNo = qot.GetEventContractEventList(req);
Console.Write("Send GetEventContractEventList: {0}\n", seqNo);
}
public void OnReply_GetEventContractEventList(FTAPI_Conn client, uint nSerialNo, GetEventContractEventList.Response rsp)
{
Console.Write("Reply: {0} {1}\n", nSerialNo, rsp.ToString());
}
public static void Main(String[] args)
{
FTAPI.Init();
new Program().Start();
while (true) Thread.Sleep(1000 * 600);
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
int getEventContractEventList(QotGetEventContractEventList.Request req);
void onReply_GetEventContractEventList(FTAPI_Conn client, int nSerialNo, QotGetEventContractEventList.Response rsp);
説明
Series コードに基づきイベントコントラクト Event リストを取得します。
パラメータ
message C2S {
required Qot_Common.Security series = 1;
optional Qot_Common.EC_Status status = 2;
optional string nextPage = 3;
optional int32 count = 4;
}
message Request {
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
- 銘柄構造は Security 参照
- 戻り値
message S2C {
repeated EventItem eventList = 1;
optional string nextPage = 2;
}
message Response {
required int32 retType = 1 [default = -400];
optional string retMsg = 2;
optional int32 errCode = 3;
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
- API呼出結果、構造は RetType 参照
- Example
public class Program implements FTSPI_Qot, FTSPI_Conn {
private FTAPI_Conn_Qot qot = new FTAPI_Conn_Qot();
public Program() {
qot.setClientInfo("java", 1);
qot.setConnCallback(this);
qot.setQotCallback(this);
}
public void start() {
qot.initConnect("127.0.0.1", (short) 11111, false);
}
@Override
public void onInitConnect(FTAPI_Conn client, long errCode, String desc) {
if (errCode != 0) return;
QotCommon.Security series = QotCommon.Security.newBuilder()
.setMarket(QotCommon.QotMarket.QotMarket_EventContract_VALUE)
.setCode("EC.KXUFCVICROUND.SERIES").build();
QotGetEventContractEventList.C2S c2s = QotGetEventContractEventList.C2S.newBuilder()
.setSeries(series).setCount(5).build();
QotGetEventContractEventList.Request req = QotGetEventContractEventList.Request.newBuilder()
.setC2S(c2s).build();
int seqNo = qot.getEventContractEventList(req);
System.out.println("Send GetEventContractEventList: " + seqNo);
}
@Override
public void onReply_GetEventContractEventList(FTAPI_Conn client, int nSerialNo, QotGetEventContractEventList.Response rsp) {
System.out.println("Reply: " + nSerialNo + " " + rsp.toString());
}
public static void main(String[] args) {
FTAPI.init();
new Program().start();
while (true) {
try { Thread.sleep(1000 * 600); } catch (InterruptedException e) {}
}
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Futu::u32_t GetEventContractEventList(const Qot_GetEventContractEventList::Request &stReq);
virtual void OnReply_GetEventContractEventList(Futu::u32_t nSerialNo, const Qot_GetEventContractEventList::Response &stRsp) = 0;
説明
Series コードに基づきイベントコントラクト Event リストを取得します。
パラメータ
// イベント項目
message EventItem {
required Qot_Common.Security eventSecurity = 1; // {market=101, code="EC.KXGDP-27JAN30"}
optional string eventName = 2; // イベント名(多言語)
optional string eventSubName = 3; // イベントサブタイトル(多言語)
optional Qot_Common.EC_Status status = 4; // イベントステータス
optional Qot_Common.Security seriesSecurity = 5; // 所属 Series
optional string startDate = 6; // 開始時間(UTC ISO8601、例 2025-09-26T18:30:00Z)
optional string endDate = 7; // 終了時間(UTC ISO8601、例 2025-09-26T18:30:00Z)
optional string category = 8; // 1级カテゴリ識別子
repeated string tags = 9; // 2级カテゴリ識別子リスト(1つの event は複数 tag に所属可能)
optional bool mutuallyExclusive = 10; // コントラクト結果が相互排他か
optional string competition = 11; // 競技名(多言語)
optional string competitionScope = 12; // 競技タイプ/プレイ(多言語)
}
message C2S {
required Qot_Common.Security series = 1; // Series 銘柄 {market=101, code="EC.KXEPLGAME"}
optional Qot_Common.EC_Status status = 2; // イベントステータスフィルター(未指定は全件)
optional string nextPage = 3; // ページネーションマーカー(先頭ページは省略)
optional int32 count = 4; // 1ページ最大返却数(デフォルト200)
}
message Request {
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
- 戻り値
message S2C {
repeated EventItem eventList = 1; // イベントリスト
optional string nextPage = 2; // 空は次ページなしを示す
}
message Response {
required int32 retType = 1 [default = -400]; //RetType,結果
optional string retMsg = 2;
optional int32 errCode = 3;
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
- API呼出結果、構造は RetType 参照
- Example
class Program : public FTSPI_Qot, public FTSPI_Trd, public FTSPI_Conn
{
public:
Program() {
m_pQotApi = FTAPI::CreateQotApi();
m_pQotApi->RegisterQotSpi(this);
m_pQotApi->RegisterConnSpi(this);
}
~Program() {
if (m_pQotApi != nullptr)
{
m_pQotApi->UnregisterQotSpi();
m_pQotApi->UnregisterConnSpi();
FTAPI::ReleaseQotApi(m_pQotApi);
m_pQotApi = nullptr;
}
}
void Start() {
m_pQotApi->InitConnect("127.0.0.1", 11111, false);
}
virtual void OnInitConnect(FTAPI_Conn* pConn, Futu::i64_t nErrCode, const char* strDesc) {
cout << "connect" << endl;
// 組包
Qot_GetEventContractEventList::Request req;
Qot_GetEventContractEventList::C2S *c2s = req.mutable_c2s();
Qot_Common::Security *series = c2s->mutable_series();
series->set_code("EC.KXUFCVICROUND.SERIES");
series->set_market(Qot_Common::QotMarket::QotMarket_EventContract);
c2s->set_count(5);
m_GetEventContractEventListSerialNo = m_pQotApi->GetEventContractEventList(req);
cout << "Request GetEventContractEventList SerialNo: " << m_GetEventContractEventListSerialNo << endl;
}
virtual void OnReply_GetEventContractEventList(Futu::u32_t nSerialNo, const Qot_GetEventContractEventList::Response &stRsp) {
if (nSerialNo == m_GetEventContractEventListSerialNo)
{
cout << "OnReply_GetEventContractEventList SerialNo: " << nSerialNo << endl;
// 内部構造を解析して出力
// ProtoBufToBodyData と UTF8ToLocal の定義は Sample 中の tool.h ファイルを参照
string resp_str;
ProtoBufToBodyData(stRsp, resp_str);
cout << UTF8ToLocal(resp_str) << endl;
}
}
protected:
FTAPI_Qot *m_pQotApi;
Futu::u32_t m_GetEventContractEventListSerialNo;
};
int32_t main(int32_t argc, char** argv)
{
FTAPI::Init();
{
Program program;
program.Start();
getchar();
}
protobuf::ShutdownProtobufLibrary();
FTAPI::UnInit();
return 0;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
- Output
connect
Request GetEventContractEventList SerialNo: 1
OnReply_GetEventContractEventList SerialNo: 1
{
"retType": 0,
"retMsg": "",
"errCode": 0,
"s2c": {
"eventList": [
{
"eventSecurity": {"market": 101, "code": "EC.KXUFCVICROUND-26JUL11SAIPIM.EVENT"},
"eventName": "Benoit Saint-Denis vs. Paddy Pimblett: Round of Victory",
"eventSubName": "Benoit Saint-Denis vs Paddy Pimblett (Jul 11)",
"status": 106,
"seriesSecurity": {"market": 101, "code": "EC.KXUFCVICROUND.SERIES"},
"startDate": "2026-07-11 23:10:00",
"endDate": "",
"category": "Hot",
"tags": [],
"mutuallyExclusive": true,
"competition": "329",
"competitionScope": ""
}
],
"nextPage": "5"
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
GetEventContractEventList(req);
説明
Series コードに基づきイベントコントラクト Event リストを取得し、ステータスフィルターとページネーションをサポートします。
パラメータ
// イベント項目
message EventItem {
required Qot_Common.Security eventSecurity = 1; // イベント銘柄 {market=101, code="EC.KXGDP-27JAN30"}
optional string eventName = 2; // イベント名(多言語)
optional string eventSubName = 3; // イベントサブタイトル(多言語)
optional Qot_Common.EC_Status status = 4; // イベントステータス
optional Qot_Common.Security seriesSecurity = 5; // 所属 Series
optional string startDate = 6; // 開始時間(UTC ISO8601、例 2025-09-26T18:30:00Z)
optional string endDate = 7; // 終了時間(UTC ISO8601、例 2025-09-26T18:30:00Z)
optional string category = 8; // 1级カテゴリ識別子
repeated string tags = 9; // 2级カテゴリ識別子リスト
optional bool mutuallyExclusive = 10; // コントラクト結果が相互排他か
optional string competition = 11; // 競技名(多言語)
optional string competitionScope = 12; // 競技タイプ/プレイ(多言語)
}
message C2S {
required Qot_Common.Security series = 1; // Series 銘柄 {market=101, code="EC.KXEPLGAME"}
optional Qot_Common.EC_Status status = 2; // イベントステータスフィルター(未指定は全件)
optional string nextPage = 3; // ページネーションマーカー(先頭ページは省略)
optional int32 count = 4; // 1ページ最大返却数(デフォルト200)
}
message Request {
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
- 戻り値
message S2C {
repeated EventItem eventList = 1; // イベントリスト
optional string nextPage = 2; // 空は次ページなしを示す
}
message Response {
required int32 retType = 1 [default = -400]; //RetType,結果
optional string retMsg = 2;
optional int32 errCode = 3;
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
- API呼出結果、構造は RetType 参照
- Example
import ftWebsocket from "futu-api";
import { Common, Qot_Common } from "futu-api/proto";
import beautify from "js-beautify";
function GetEventContractEventList() {
const { RetType } = Common;
let [addr, port, enable_ssl, key] = ["127.0.0.1", 11111, false, ""];
let websocket = new ftWebsocket();
websocket.onlogin = async (ret, msg) => {
if (!ret) { console.log("start error", msg); return; }
try {
const req = { c2s: { series: { market: QotMarket.QotMarket_EventContract, code: "EC.KXUFCVICROUND.SERIES" }, count: 5 } };
let { errCode, retMsg, retType, s2c } = await websocket.GetEventContractEventList(req);
console.log("GetEventContractEventList: errCode %d, retMsg %s, retType %d", errCode, retMsg, retType);
if (retType == RetType.RetType_Succeed) {
console.log(beautify(JSON.stringify(s2c), { indent_size: 2, space_in_empty_paren: true }));
}
} catch (error) {
console.log("error:", error);
}
};
websocket.start(addr, port, enable_ssl, key);
setTimeout(() => { websocket.stop(); console.log("stop"); }, 5000);
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
- Output
GetEventContractEventList: errCode 0, retMsg , retType 0
{
"eventList": [{
"eventSecurity": {
"market": 101,
"code": "EC.KXUFCVICROUND-26JUL11SAIPIM.EVENT"
},
"eventName": "Benoit Saint-Denis vs. Paddy Pimblett: Round of Victory",
"eventSubName": "Benoit Saint-Denis vs Paddy Pimblett (Jul 11)",
"status": 106,
"seriesSecurity": {
"market": 101,
"code": "EC.KXUFCVICROUND.SERIES"
},
"startDate": "2026-07-11 23:10:00",
"endDate": "",
"category": "Hot",
"tags": [],
"mutuallyExclusive": true,
"competition": "329",
"competitionScope": ""
}],
"nextPage": "5"
}
stop
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
APIレート制限
- 30 秒以内に最大 10 回までイベントコントラクト Event リスト取得インターフェースをリクエスト可能
- Python
- Proto
- C#
- Java
- C++
- JavaScript
get_event_contract_event_list(series_code, status=None, next_page=None, count=None)
説明
Series コードに基づきイベントコントラクト Event リストを取得し、ステータスフィルターとページネーションをサポートします。1 つの Event は 1 つの取引可能なイベント銘柄(例:ある選挙)に対応し、その下に複数の Contract(YES/NO コントラクト)が紐付きます。
パラメータ
パラメータ 型 説明 series_code str Series コード、例: 'EC.KXUFCVICROUND.SERIES'status ECStatus イベントステータスフィルター、未指定は全件返却 next_page str ページネーションマーカー、先頭ページは None、以降は前回返却されたnext_pageを指定count int 返却件数の上限 戻り値
パラメータ 型 説明 ret RET_CODE API呼出結果 data pd.DataFrame ret == RET_OK の場合、イベントリストを返却 str ret != RET_OK の場合、エラー説明を返却 next_page str 次ページのページネーションマーカー、空はデータ終了を示す 返却される DataFrame のフィールドは以下の通りです:
フィールド 型 説明 event_code str Event コード(例: EC.KXUFCVICROUND-26JUL11SAIPIM.EVENT)event_name str イベント名(多言語) event_sub_name str イベントサブタイトル(多言語) status str イベントステータス、ECStatus 参照 series_code str 所属 Series コード start_date str 開始時間(例: 2026-07-11 23:10:00)end_date str 終了時間 category str 1级カテゴリ識別子 tags list 2级カテゴリ識別子リスト mutually_exclusive bool コントラクト結果が相互排他か competition str 競技名(多言語) competition_scope str 競技タイプ/プレイ(多言語) Example
from moomoo import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)
ret, data, next_page = quote_ctx.get_event_contract_event_list(
'EC.KXUFCVICROUND.SERIES', count=5
)
if ret == RET_OK:
print(data)
print('next_page:', next_page)
else:
print('error:', data)
quote_ctx.close()
2
3
4
5
6
7
8
9
10
11
12
- Output
event_code event_name event_sub_name status series_code start_date end_date category tags mutually_exclusive competition competition_scope
0 EC.KXUFCVICROUND-26JUL11SAIPIM.EVENT Benoit Saint-Denis vs. Paddy Pimblett: Round of Victory Benoit Saint-Denis vs Paddy Pimblett (Jul 11) EVENT_FINALIZED EC.KXUFCVICROUND.SERIES 2026-07-11 23:10:00 N/A Hot [] True 329 N/A
1 EC.KXUFCVICROUND-26JUL11ROYKAV.EVENT Brandon Royval vs. Loneer Kavanagh: Round of Victory Brandon Royval vs Loneer Kavanagh (Jul 11) EVENT_FINALIZED EC.KXUFCVICROUND.SERIES 2026-07-11 21:55:00 N/A Hot [] True 329 N/A
2 EC.KXUFCVICROUND-26JUL11STEELL.EVENT Gable Steveson vs. Elisha Ellison: Round of Victory Gable Steveson vs Elisha Ellison (Jul 11) EVENT_FINALIZED EC.KXUFCVICROUND.SERIES 2026-07-11 20:10:00 N/A Hot [] True 329 N/A
3 EC.KXUFCVICROUND-26JUL11MCGHOL.EVENT Conor McGregor vs. Max Holloway: Round of Victory Conor McGregor vs Max Holloway (Jul 11) EVENT_FINALIZED EC.KXUFCVICROUND.SERIES 2026-07-11 23:38:00 N/A Hot [] True 329 N/A
4 EC.KXUFCVICROUND-26JUL11ROYKAV.EVENT Leon Shahbazyan vs. Levan Chokheli: Round of Victory Leon Shahbazyan vs Levan Chokheli (Jun 20) EVENT_FINALIZED EC.KXUFCVICROUND.SERIES 2026-06-20 18:10:00 2026-06-20 18:15:31 Hot [] True UFC Fight Night N/A
next_page: 5
2
3
4
5
6
7
# Qot_GetEventContractEventList.proto
説明
Series コードに基づきイベントコントラクト Event リストを取得します。
パラメータ
// イベント項目
message EventItem {
required Qot_Common.Security eventSecurity = 1; // {market=101, code="EC.KXGDP-27JAN30"}
optional string eventName = 2; // イベント名(多言語)
optional string eventSubName = 3; // イベントサブタイトル(多言語)
optional Qot_Common.EC_Status status = 4; // イベントステータス
optional Qot_Common.Security seriesSecurity = 5; // 所属 Series
optional string startDate = 6; // 開始時間(UTC ISO8601、例 2025-09-26T18:30:00Z)
optional string endDate = 7; // 終了時間(UTC ISO8601、例 2025-09-26T18:30:00Z)
optional string category = 8; // 1级カテゴリ識別子
repeated string tags = 9; // 2级カテゴリ識別子リスト(1つの event は複数 tag に所属可能)
optional bool mutuallyExclusive = 10; // コントラクト結果が相互排他か
optional string competition = 11; // 競技名(多言語)
optional string competitionScope = 12; // 競技タイプ/プレイ(多言語)
}
message C2S {
required Qot_Common.Security series = 1; // Series 銘柄 {market=101, code="EC.KXEPLGAME"}
optional Qot_Common.EC_Status status = 2; // イベントステータスフィルター(未指定は全件)
optional string nextPage = 3; // ページネーションマーカー(先頭ページは省略)
optional int32 count = 4; // 1ページ最大返却数(デフォルト200)
}
message Request {
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
- 戻り値
message S2C {
repeated EventItem eventList = 1; // イベントリスト
optional string nextPage = 2; // 空は次ページなしを示す
}
message Response {
required int32 retType = 1 [default = -400]; //RetType,結果
optional string retMsg = 2;
optional int32 errCode = 3;
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
- API呼出結果、構造は RetType 参照
uint GetEventContractEventList(GetEventContractEventList.Request req);
virtual void OnReply_GetEventContractEventList(MMAPI_Conn client, uint nSerialNo, GetEventContractEventList.Response rsp);
説明
Series コードに基づきイベントコントラクト Event リストを取得します。
パラメータ
message EventItem {
required Qot_Common.Security eventSecurity = 1;
optional string eventName = 2;
optional string eventSubName = 3;
optional Qot_Common.EC_Status status = 4;
optional Qot_Common.Security seriesSecurity = 5;
optional string startDate = 6;
optional string endDate = 7;
optional string category = 8;
repeated string tags = 9;
optional bool mutuallyExclusive = 10;
optional string competition = 11;
optional string competitionScope = 12;
}
message C2S {
required Qot_Common.Security series = 1;
optional Qot_Common.EC_Status status = 2;
optional string nextPage = 3;
optional int32 count = 4;
}
message Request {
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
- 銘柄構造は Security 参照
- 戻り値
message S2C {
repeated EventItem eventList = 1;
optional string nextPage = 2;
}
message Response {
required int32 retType = 1 [default = -400];
optional string retMsg = 2;
optional int32 errCode = 3;
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
- API呼出結果、構造は RetType 参照
- Example
public class Program : MMSPI_Qot, MMSPI_Conn
{
MMAPI_Qot qot = new MMAPI_Qot();
public Program()
{
qot.SetClientInfo("csharp", 1);
qot.SetConnCallback(this);
qot.SetQotCallback(this);
}
public void Start()
{
qot.InitConnect("127.0.0.1", (ushort)11111, false);
}
public void OnInitConnect(MMAPI_Conn client, long errCode, String desc)
{
if (errCode != 0) return;
QotCommon.Security series = QotCommon.Security.CreateBuilder()
.SetMarket((int)QotCommon.QotMarket.QotMarket_EventContract)
.SetCode("EC.KXUFCVICROUND.SERIES").Build();
var c2s = GetEventContractEventList.C2S.CreateBuilder()
.SetSeries(series).SetCount(5).Build();
var req = GetEventContractEventList.Request.CreateBuilder().SetC2S(c2s).Build();
uint seqNo = qot.GetEventContractEventList(req);
Console.Write("Send GetEventContractEventList: {0}\n", seqNo);
}
public void OnReply_GetEventContractEventList(MMAPI_Conn client, uint nSerialNo, GetEventContractEventList.Response rsp)
{
Console.Write("Reply: {0} {1}\n", nSerialNo, rsp.ToString());
}
public static void Main(String[] args)
{
MMAPI.Init();
new Program().Start();
while (true) Thread.Sleep(1000 * 600);
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
int getEventContractEventList(QotGetEventContractEventList.Request req);
void onReply_GetEventContractEventList(MMAPI_Conn client, int nSerialNo, QotGetEventContractEventList.Response rsp);
説明
Series コードに基づきイベントコントラクト Event リストを取得します。
パラメータ
message C2S {
required Qot_Common.Security series = 1;
optional Qot_Common.EC_Status status = 2;
optional string nextPage = 3;
optional int32 count = 4;
}
message Request {
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
- 銘柄構造は Security 参照
- 戻り値
message S2C {
repeated EventItem eventList = 1;
optional string nextPage = 2;
}
message Response {
required int32 retType = 1 [default = -400];
optional string retMsg = 2;
optional int32 errCode = 3;
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
- API呼出結果、構造は RetType 参照
- Example
public class Program implements MMSPI_Qot, MMSPI_Conn {
private MMAPI_Conn_Qot qot = new MMAPI_Conn_Qot();
public Program() {
qot.setClientInfo("java", 1);
qot.setConnCallback(this);
qot.setQotCallback(this);
}
public void start() {
qot.initConnect("127.0.0.1", (short) 11111, false);
}
@Override
public void onInitConnect(MMAPI_Conn client, long errCode, String desc) {
if (errCode != 0) return;
QotCommon.Security series = QotCommon.Security.newBuilder()
.setMarket(QotCommon.QotMarket.QotMarket_EventContract_VALUE)
.setCode("EC.KXUFCVICROUND.SERIES").build();
QotGetEventContractEventList.C2S c2s = QotGetEventContractEventList.C2S.newBuilder()
.setSeries(series).setCount(5).build();
QotGetEventContractEventList.Request req = QotGetEventContractEventList.Request.newBuilder()
.setC2S(c2s).build();
int seqNo = qot.getEventContractEventList(req);
System.out.println("Send GetEventContractEventList: " + seqNo);
}
@Override
public void onReply_GetEventContractEventList(MMAPI_Conn client, int nSerialNo, QotGetEventContractEventList.Response rsp) {
System.out.println("Reply: " + nSerialNo + " " + rsp.toString());
}
public static void main(String[] args) {
MMAPI.init();
new Program().start();
while (true) {
try { Thread.sleep(1000 * 600); } catch (InterruptedException e) {}
}
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
moomoo::u32_t GetEventContractEventList(const Qot_GetEventContractEventList::Request &stReq);
virtual void OnReply_GetEventContractEventList(moomoo::u32_t nSerialNo, const Qot_GetEventContractEventList::Response &stRsp) = 0;
説明
Series コードに基づきイベントコントラクト Event リストを取得します。
パラメータ
// イベント項目
message EventItem {
required Qot_Common.Security eventSecurity = 1; // {market=101, code="EC.KXGDP-27JAN30"}
optional string eventName = 2; // イベント名(多言語)
optional string eventSubName = 3; // イベントサブタイトル(多言語)
optional Qot_Common.EC_Status status = 4; // イベントステータス
optional Qot_Common.Security seriesSecurity = 5; // 所属 Series
optional string startDate = 6; // 開始時間(UTC ISO8601、例 2025-09-26T18:30:00Z)
optional string endDate = 7; // 終了時間(UTC ISO8601、例 2025-09-26T18:30:00Z)
optional string category = 8; // 1级カテゴリ識別子
repeated string tags = 9; // 2级カテゴリ識別子リスト(1つの event は複数 tag に所属可能)
optional bool mutuallyExclusive = 10; // コントラクト結果が相互排他か
optional string competition = 11; // 競技名(多言語)
optional string competitionScope = 12; // 競技タイプ/プレイ(多言語)
}
message C2S {
required Qot_Common.Security series = 1; // Series 銘柄 {market=101, code="EC.KXEPLGAME"}
optional Qot_Common.EC_Status status = 2; // イベントステータスフィルター(未指定は全件)
optional string nextPage = 3; // ページネーションマーカー(先頭ページは省略)
optional int32 count = 4; // 1ページ最大返却数(デフォルト200)
}
message Request {
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
- 戻り値
message S2C {
repeated EventItem eventList = 1; // イベントリスト
optional string nextPage = 2; // 空は次ページなしを示す
}
message Response {
required int32 retType = 1 [default = -400]; //RetType,結果
optional string retMsg = 2;
optional int32 errCode = 3;
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
- API呼出結果、構造は RetType 参照
- Example
class Program : public MMSPI_Qot, public MMSPI_Trd, public MMSPI_Conn
{
public:
Program() {
m_pQotApi = MMAPI::CreateQotApi();
m_pQotApi->RegisterQotSpi(this);
m_pQotApi->RegisterConnSpi(this);
}
~Program() {
if (m_pQotApi != nullptr)
{
m_pQotApi->UnregisterQotSpi();
m_pQotApi->UnregisterConnSpi();
MMAPI::ReleaseQotApi(m_pQotApi);
m_pQotApi = nullptr;
}
}
void Start() {
m_pQotApi->InitConnect("127.0.0.1", 11111, false);
}
virtual void OnInitConnect(MMAPI_Conn* pConn, moomoo::i64_t nErrCode, const char* strDesc) {
cout << "connect" << endl;
// 組包
Qot_GetEventContractEventList::Request req;
Qot_GetEventContractEventList::C2S *c2s = req.mutable_c2s();
Qot_Common::Security *series = c2s->mutable_series();
series->set_code("EC.KXUFCVICROUND.SERIES");
series->set_market(Qot_Common::QotMarket::QotMarket_EventContract);
c2s->set_count(5);
m_GetEventContractEventListSerialNo = m_pQotApi->GetEventContractEventList(req);
cout << "Request GetEventContractEventList SerialNo: " << m_GetEventContractEventListSerialNo << endl;
}
virtual void OnReply_GetEventContractEventList(moomoo::u32_t nSerialNo, const Qot_GetEventContractEventList::Response &stRsp) {
if (nSerialNo == m_GetEventContractEventListSerialNo)
{
cout << "OnReply_GetEventContractEventList SerialNo: " << nSerialNo << endl;
// 内部構造を解析して出力
// ProtoBufToBodyData と UTF8ToLocal の定義は Sample 中の tool.h ファイルを参照
string resp_str;
ProtoBufToBodyData(stRsp, resp_str);
cout << UTF8ToLocal(resp_str) << endl;
}
}
protected:
MMAPI_Qot *m_pQotApi;
moomoo::u32_t m_GetEventContractEventListSerialNo;
};
int32_t main(int32_t argc, char** argv)
{
MMAPI::Init();
{
Program program;
program.Start();
getchar();
}
protobuf::ShutdownProtobufLibrary();
MMAPI::UnInit();
return 0;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
- Output
connect
Request GetEventContractEventList SerialNo: 1
OnReply_GetEventContractEventList SerialNo: 1
{
"retType": 0,
"retMsg": "",
"errCode": 0,
"s2c": {
"eventList": [
{
"eventSecurity": {"market": 101, "code": "EC.KXUFCVICROUND-26JUL11SAIPIM.EVENT"},
"eventName": "Benoit Saint-Denis vs. Paddy Pimblett: Round of Victory",
"eventSubName": "Benoit Saint-Denis vs Paddy Pimblett (Jul 11)",
"status": 106,
"seriesSecurity": {"market": 101, "code": "EC.KXUFCVICROUND.SERIES"},
"startDate": "2026-07-11 23:10:00",
"endDate": "",
"category": "Hot",
"tags": [],
"mutuallyExclusive": true,
"competition": "329",
"competitionScope": ""
}
],
"nextPage": "5"
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
GetEventContractEventList(req);
説明
Series コードに基づきイベントコントラクト Event リストを取得し、ステータスフィルターとページネーションをサポートします。
パラメータ
// イベント項目
message EventItem {
required Qot_Common.Security eventSecurity = 1; // イベント銘柄 {market=101, code="EC.KXGDP-27JAN30"}
optional string eventName = 2; // イベント名(多言語)
optional string eventSubName = 3; // イベントサブタイトル(多言語)
optional Qot_Common.EC_Status status = 4; // イベントステータス
optional Qot_Common.Security seriesSecurity = 5; // 所属 Series
optional string startDate = 6; // 開始時間(UTC ISO8601、例 2025-09-26T18:30:00Z)
optional string endDate = 7; // 終了時間(UTC ISO8601、例 2025-09-26T18:30:00Z)
optional string category = 8; // 1级カテゴリ識別子
repeated string tags = 9; // 2级カテゴリ識別子リスト
optional bool mutuallyExclusive = 10; // コントラクト結果が相互排他か
optional string competition = 11; // 競技名(多言語)
optional string competitionScope = 12; // 競技タイプ/プレイ(多言語)
}
message C2S {
required Qot_Common.Security series = 1; // Series 銘柄 {market=101, code="EC.KXEPLGAME"}
optional Qot_Common.EC_Status status = 2; // イベントステータスフィルター(未指定は全件)
optional string nextPage = 3; // ページネーションマーカー(先頭ページは省略)
optional int32 count = 4; // 1ページ最大返却数(デフォルト200)
}
message Request {
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
- 戻り値
message S2C {
repeated EventItem eventList = 1; // イベントリスト
optional string nextPage = 2; // 空は次ページなしを示す
}
message Response {
required int32 retType = 1 [default = -400]; //RetType,結果
optional string retMsg = 2;
optional int32 errCode = 3;
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
- API呼出結果、構造は RetType 参照
- Example
import mmWebsocket from "moomoo-api";
import { Common, Qot_Common } from "moomoo-api/proto";
import beautify from "js-beautify";
function GetEventContractEventList() {
const { RetType } = Common;
let [addr, port, enable_ssl, key] = ["127.0.0.1", 11111, false, ""];
let websocket = new mmWebsocket();
websocket.onlogin = async (ret, msg) => {
if (!ret) { console.log("start error", msg); return; }
try {
const req = { c2s: { series: { market: QotMarket.QotMarket_EventContract, code: "EC.KXUFCVICROUND.SERIES" }, count: 5 } };
let { errCode, retMsg, retType, s2c } = await websocket.GetEventContractEventList(req);
console.log("GetEventContractEventList: errCode %d, retMsg %s, retType %d", errCode, retMsg, retType);
if (retType == RetType.RetType_Succeed) {
console.log(beautify(JSON.stringify(s2c), { indent_size: 2, space_in_empty_paren: true }));
}
} catch (error) {
console.log("error:", error);
}
};
websocket.start(addr, port, enable_ssl, key);
setTimeout(() => { websocket.stop(); console.log("stop"); }, 5000);
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
- Output
GetEventContractEventList: errCode 0, retMsg , retType 0
{
"eventList": [{
"eventSecurity": {
"market": 101,
"code": "EC.KXUFCVICROUND-26JUL11SAIPIM.EVENT"
},
"eventName": "Benoit Saint-Denis vs. Paddy Pimblett: Round of Victory",
"eventSubName": "Benoit Saint-Denis vs Paddy Pimblett (Jul 11)",
"status": 106,
"seriesSecurity": {
"market": 101,
"code": "EC.KXUFCVICROUND.SERIES"
},
"startDate": "2026-07-11 23:10:00",
"endDate": "",
"category": "Hot",
"tags": [],
"mutuallyExclusive": true,
"competition": "329",
"competitionScope": ""
}],
"nextPage": "5"
}
stop
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
APIレート制限
- 30 秒以内に最大 10 回までイベントコントラクト Event リスト取得インターフェースをリクエスト可能