Contracts under an event
GET/api/v1.0/quote/event-contract/contractsContracts under an event, plus recommended contracts. event is required, e.g. KS.KXNFLGAME-26SEP12PITNE. offset+count, count default 100 (max 1000). Returns contract_code / volume / status / is_tie; data.recommend_contracts are recommended KS symbols.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
event | string | query | yes | Event symbol, e.g. KS.KXNFLGAME-26SEP12PITNE |
page_flag | string | query | no | Page cursor. Omit or pass empty on the first page; pass back pagination.page_flag. Stop only when pagination.completed is true |
page_size | int | query | no | Page size, default 100, max 1000 |
milestone | string | query | no | Optional milestone symbol; when set, returns contracts related to that milestone |
Example
bash
curl -X GET 'https://webapi.moomoo.com/api/v1.0/quote/event-contract/contracts?event=value' \
-H 'Authorization: Bearer <AccessToken>' | jqResponse parameters
| Name | Type | Description |
|---|---|---|
data.contracts | object[] | |
data.contracts[].contract_code | string | Contract symbol, e.g. KS.KXNFLGAME-26SEP12PITNE-PIT |
data.contracts[].title | string | Contract title |
data.contracts[].volume | string | Contract volume (high-precision string) |
data.contracts[].status | int | Contract status code |
data.contracts[].is_tie | bool | Whether this is a tie contract |
data.recommend_contracts | string[] | Recommended KS contract symbols, up to about 3 |
pagination.total | int | |
pagination.completed | bool | True when this is the last page. Stop paging only when completed is true |
pagination.page_flag | string | Next page cursor. Pass it back as page_flag while completed is false; empty on the last page |
Errors
| ret_code | error.code | Description |
|---|---|---|
| 0 | — | Success |
| -3 | invalid_parameter | Missing or invalid parameter |
| -8 | unsupported | Not supported |
| -10 | no_data | No data |
Response example
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"contracts": [
{
"contract_code": "example",
"title": "example",
"volume": "example",
"status": 0,
"is_tie": false
}
],
"recommend_contracts": ["KS.example.CONTRACT"]
},
"pagination": {
"page_flag": "",
"completed": true,
"total": 0
}
}