Futures
GetFutureExchange
GetFutureExchangePurpose
Retrieves future exchange data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetFutureExchange() ([]model.FutureExchange, error)Availability depends on market, instrument, and enabled data access.
Parameters
No parameters.
Returns
([]model.FutureExchange, error). Key fields from model.FutureExchange:
| Field | Type | JSON field |
|---|---|---|
Code | string | code |
Name | string | name |
ZoneID | string | zoneId |
Invocation example
result, err := qc.GetFutureExchange()
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"code": "CME",
"name": "Chicago Mercantile Exchange",
"market": "US",
"zone": "America/Chicago"
},
{
"code": "NYMEX",
"name": "New York Mercantile Exchange",
"market": "US",
"zone": "America/New_York"
},
{
"code": "HKEX",
"name": "Hong Kong Exchanges",
"market": "HK",
"zone": "Asia/Hong_Kong"
}
]GetFutureContracts
GetFutureContractsPurpose
Retrieves future contracts data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetFutureContracts(exchange string) ([]model.FutureContractInfo, error)Availability depends on market, instrument, and enabled data access.
Parameters
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
exchange | string | Yes | None | See the exact signature; the SDK provides no additional default |
Returns
([]model.FutureContractInfo, error). Key fields from model.FutureContractInfo:
| Field | Type | JSON field |
|---|---|---|
Continuous | bool | continuous |
Trade | bool | trade |
Type | string | type |
ContractCode | string | contractCode |
IbCode | string | ibCode |
Name | string | name |
ContractMonth | string | contractMonth |
LastTradingDate | string | lastTradingDate |
FirstNoticeDate | string | firstNoticeDate |
LastBiddingCloseTime | int64 | lastBiddingCloseTime |
Currency | string | currency |
ExchangeCode | string | exchangeCode |
Multiplier | float64 | multiplier |
MinTick | float64 | minTick |
Invocation example
result, err := qc.GetFutureContracts("value")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"contractCode": "ES2609",
"symbol": "ES",
"name": "E-mini S&P 500",
"exchange": "CME",
"exchangeCode": "CME",
"market": "US",
"currency": "USD",
"multiplier": 50.0,
"lastTradingDate": "2025-09-19",
"firstNoticeDate": "",
"lastBiddingCloseTime": 0
},
{
"contractCode": "ES2612",
"symbol": "ES",
"name": "E-mini S&P 500",
"exchange": "CME",
"exchangeCode": "CME",
"market": "US",
"currency": "USD",
"multiplier": 50.0,
"lastTradingDate": "2025-12-19",
"firstNoticeDate": "",
"lastBiddingCloseTime": 0
}
]GetFutureContract
GetFutureContractPurpose
Retrieves future contract data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetFutureContract(req model.FutureContractSingleRequest) ([]model.FutureContractInfo, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.FutureContractSingleRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Type | string | No | Omitted if empty | Allowed values: Exercise or Expire for option exercise requests; product type for futures requests |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Returns
([]model.FutureContractInfo, error). Key fields from model.FutureContractInfo:
| Field | Type | JSON field |
|---|---|---|
Continuous | bool | continuous |
Trade | bool | trade |
Type | string | type |
ContractCode | string | contractCode |
IbCode | string | ibCode |
Name | string | name |
ContractMonth | string | contractMonth |
LastTradingDate | string | lastTradingDate |
FirstNoticeDate | string | firstNoticeDate |
LastBiddingCloseTime | int64 | lastBiddingCloseTime |
Currency | string | currency |
ExchangeCode | string | exchangeCode |
Multiplier | float64 | multiplier |
MinTick | float64 | minTick |
Invocation example
result, err := qc.GetFutureContract(model.FutureContractSingleRequest{
ContractCode: "ES2609",
Type: "Exercise",
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result){
"contractCode": "ES2609",
"symbol": "ES",
"name": "E-mini S&P 500",
"exchange": "CME",
"exchangeCode": "CME",
"market": "US",
"currency": "USD",
"multiplier": 50.0,
"lastTradingDate": "2025-09-19",
"firstNoticeDate": "",
"lastBiddingCloseTime": 0
}GetAllFutureContracts
GetAllFutureContractsPurpose
Retrieves all future contracts data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetAllFutureContracts(req model.AllFutureContractsRequest) ([]model.FutureContractInfo, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.AllFutureContractsRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Type | string | No | Omitted if empty | Allowed values: Exercise or Expire for option exercise requests; product type for futures requests |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Returns
([]model.FutureContractInfo, error). Key fields from model.FutureContractInfo:
| Field | Type | JSON field |
|---|---|---|
Continuous | bool | continuous |
Trade | bool | trade |
Type | string | type |
ContractCode | string | contractCode |
IbCode | string | ibCode |
Name | string | name |
ContractMonth | string | contractMonth |
LastTradingDate | string | lastTradingDate |
FirstNoticeDate | string | firstNoticeDate |
LastBiddingCloseTime | int64 | lastBiddingCloseTime |
Currency | string | currency |
ExchangeCode | string | exchangeCode |
Multiplier | float64 | multiplier |
MinTick | float64 | minTick |
Invocation example
result, err := qc.GetAllFutureContracts(model.AllFutureContractsRequest{
Type: "Exercise",
Exchange: "CME",
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"contractCode": "ES2609",
"symbol": "ES",
"name": "E-mini S&P 500",
"exchange": "CME",
"exchangeCode": "CME",
"market": "US",
"currency": "USD",
"multiplier": 50.0,
"lastTradingDate": "2025-09-19",
"firstNoticeDate": "",
"lastBiddingCloseTime": 0
},
{
"contractCode": "ES2612",
"symbol": "ES",
"name": "E-mini S&P 500",
"exchange": "CME",
"exchangeCode": "CME",
"market": "US",
"currency": "USD",
"multiplier": 50.0,
"lastTradingDate": "2025-12-19",
"firstNoticeDate": "",
"lastBiddingCloseTime": 0
}
]GetCurrentFutureContract
GetCurrentFutureContractPurpose
Retrieves current future contract data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetCurrentFutureContract(req model.FutureContractSingleRequest) (*model.FutureContractInfo, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.FutureContractSingleRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Type | string | No | Omitted if empty | Allowed values: Exercise or Expire for option exercise requests; product type for futures requests |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Returns
(*model.FutureContractInfo, error). Key fields from model.FutureContractInfo:
| Field | Type | JSON field |
|---|---|---|
Continuous | bool | continuous |
Trade | bool | trade |
Type | string | type |
ContractCode | string | contractCode |
IbCode | string | ibCode |
Name | string | name |
ContractMonth | string | contractMonth |
LastTradingDate | string | lastTradingDate |
FirstNoticeDate | string | firstNoticeDate |
LastBiddingCloseTime | int64 | lastBiddingCloseTime |
Currency | string | currency |
ExchangeCode | string | exchangeCode |
Multiplier | float64 | multiplier |
MinTick | float64 | minTick |
Invocation example
result, err := qc.GetCurrentFutureContract(model.FutureContractSingleRequest{
ContractCode: "ES2609",
Type: "Exercise",
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result){
"contractCode": "ES2609",
"symbol": "ES",
"name": "E-mini S&P 500",
"exchange": "CME",
"exchangeCode": "CME",
"market": "US",
"currency": "USD",
"multiplier": 50.0,
"lastTradingDate": "2025-09-19",
"firstNoticeDate": "",
"lastBiddingCloseTime": 0
}GetFutureContinuousContracts
GetFutureContinuousContractsPurpose
Retrieves future continuous contracts data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetFutureContinuousContracts(req model.FutureContinuousContractsRequest) ([]model.FutureContractInfo, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.FutureContinuousContractsRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Type | string | No | Omitted if empty | Allowed values: Exercise or Expire for option exercise requests; product type for futures requests |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Returns
([]model.FutureContractInfo, error). Key fields from model.FutureContractInfo:
| Field | Type | JSON field |
|---|---|---|
Continuous | bool | continuous |
Trade | bool | trade |
Type | string | type |
ContractCode | string | contractCode |
IbCode | string | ibCode |
Name | string | name |
ContractMonth | string | contractMonth |
LastTradingDate | string | lastTradingDate |
FirstNoticeDate | string | firstNoticeDate |
LastBiddingCloseTime | int64 | lastBiddingCloseTime |
Currency | string | currency |
ExchangeCode | string | exchangeCode |
Multiplier | float64 | multiplier |
MinTick | float64 | minTick |
Invocation example
result, err := qc.GetFutureContinuousContracts(model.FutureContinuousContractsRequest{
Type: "Exercise",
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"contractCode": "ESmain",
"symbol": "ES",
"name": "E-mini S&P 500 Continuous",
"exchange": "CME",
"exchangeCode": "CME",
"market": "US",
"currency": "USD",
"multiplier": 50.0,
"type": "main"
}
]GetFutureHistoryMainContract
GetFutureHistoryMainContractPurpose
Retrieves future history main contract data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetFutureHistoryMainContract(req model.FutureHistoryMainContractRequest) ([]model.FutureMainContractHistory, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.FutureHistoryMainContractRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Returns
([]model.FutureMainContractHistory, error). Key fields from model.FutureMainContractHistory:
| Field | Type | JSON field |
|---|---|---|
ContractCode | string | contractCode |
Symbol | string | symbol |
BeginDate | string | beginDate |
EndDate | string | endDate |
Invocation example
result, err := qc.GetFutureHistoryMainContract(model.FutureHistoryMainContractRequest{
ContractCodes: []string{"ES2609"},
BeginTime: 1735689600000,
EndTime: 1738281600000,
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"contractCode": "ES2609",
"symbol": "ES",
"beginDate": "2025-06-20",
"endDate": "2025-09-19"
},
{
"contractCode": "ES2606",
"symbol": "ES",
"beginDate": "2025-03-21",
"endDate": "2025-06-19"
}
]GetFutureRealTimeQuote
GetFutureRealTimeQuotePurpose
Retrieves future real time quote data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetFutureRealTimeQuote(req model.FutureBriefRequest) ([]model.FutureQuote, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.FutureBriefRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Returns
([]model.FutureQuote, error). Key fields from model.FutureQuote:
| Field | Type | JSON field |
|---|---|---|
ContractCode | string | contractCode |
LatestPrice | float64 | latestPrice |
LatestSize | int64 | latestSize |
LatestTime | int64 | latestTime |
BidPrice | float64 | bidPrice |
AskPrice | float64 | askPrice |
BidSize | int64 | bidSize |
AskSize | int64 | askSize |
OpenInterest | int64 | openInterest |
OpenInterestChange | int64 | openInterestChange |
Volume | int64 | volume |
Open | float64 | open |
High | float64 | high |
Low | float64 | low |
Invocation example
result, err := qc.GetFutureRealTimeQuote(model.FutureBriefRequest{
ContractCodes: []string{"ES2609"},
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"symbol": "ES2609",
"open": 5620.25,
"high": 5658.50,
"low": 5605.00,
"close": 5645.75,
"preClose": 5618.00,
"latestPrice": 5645.75,
"latestTime": 1785528000000,
"askPrice": 5646.00,
"askSize": 125,
"bidPrice": 5645.75,
"bidSize": 98,
"volume": 1523400,
"status": "NORMAL"
}
]GetFutureKline
GetFutureKlinePurpose
Retrieves future kline data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetFutureKline(req model.FutureKlineRequest) ([]model.FutureKline, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.FutureKlineRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Period | string | No | Omitted if empty | Allowed values: day, week, month, year, 1min, 5min, 15min, 30min, 60min |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Returns
([]model.FutureKline, error). Key fields from model.FutureKline:
| Field | Type | JSON field |
|---|---|---|
NextPageToken | string | nextPageToken |
Items | []FutureKlineItem | items |
Invocation example
result, err := qc.GetFutureKline(model.FutureKlineRequest{
ContractCodes: []string{"ES2609"},
ContractCode: "ES2609",
Period: "day",
BeginTime: 1735689600000,
EndTime: 1738281600000,
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"symbol": "ES2609",
"period": "day",
"nextPageToken": null,
"items": [
{
"time": 1785384000000,
"volume": 1234567,
"open": 5618.00,
"close": 5620.25,
"high": 5635.50,
"low": 5598.75,
"amount": 0
},
{
"time": 1785470400000,
"volume": 1523400,
"open": 5620.25,
"close": 5645.75,
"high": 5658.50,
"low": 5605.00,
"amount": 0
}
]
}
]GetFutureKlineByPage
GetFutureKlineByPagePurpose
Retrieves future kline by page data and decodes it into the published Go return model. The client performs client-side pagination and merges pages.
Signature
func (c *QuoteClient) GetFutureKlineByPage(req model.FutureKlineByPageRequest) ([]model.FutureKlineItem, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.FutureKlineByPageRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Period | string | No | Omitted if empty | Allowed values: day, week, month, year, 1min, 5min, 15min, 30min, 60min |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Returns
([]model.FutureKlineItem, error). Key fields from model.FutureKlineItem:
| Field | Type | JSON field |
|---|---|---|
Time | int64 | time |
Volume | int64 | volume |
Open | float64 | open |
Close | float64 | close |
High | float64 | high |
Low | float64 | low |
LastTime | int64 | lastTime |
OpenInterest | int64 | openInterest |
Settlement | float64 | settlement |
Invocation example
result, err := qc.GetFutureKlineByPage(model.FutureKlineByPageRequest{
ContractCode: "ES2609",
Period: "day",
BeginTime: 1735689600000,
EndTime: 1738281600000,
TotalSize: 100,
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"time": 1785384000000,
"volume": 1234567,
"open": 5618.00,
"close": 5620.25,
"high": 5635.50,
"low": 5598.75,
"amount": 0
},
{
"time": 1785470400000,
"volume": 1523400,
"open": 5620.25,
"close": 5645.75,
"high": 5658.50,
"low": 5605.00,
"amount": 0
}
]GetFutureTradeTicks
GetFutureTradeTicksPurpose
Retrieves future trade ticks data and decodes it into the published Go return model. The client uses API version 3.0.
Signature
func (c *QuoteClient) GetFutureTradeTicks(req model.FutureTradeTicksRequest) ([]model.FutureTradeTickItem, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.FutureTradeTicksRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Returns
([]model.FutureTradeTickItem, error). Key fields from model.FutureTradeTickItem:
| Field | Type | JSON field |
|---|---|---|
ContractCode | string | contractCode |
Index | int64 | index |
Time | int64 | time |
Price | float64 | price |
Volume | int64 | volume |
Direction | string | direction |
Invocation example
result, err := qc.GetFutureTradeTicks(model.FutureTradeTicksRequest{
ContractCode: "ES2609",
Limit: 20,
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"symbol": "ES2609",
"beginIndex": 98200,
"endIndex": 98202,
"items": [
{"time": 1785527990000, "volume": 5, "price": 5645.50, "type": "+"},
{"time": 1785527995000, "volume": 12, "price": 5645.75, "type": "-"}
]
}
]GetFutureDepth
GetFutureDepthPurpose
Retrieves future depth data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetFutureDepth(req model.FutureDepthRequest) ([]model.FutureDepth, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.FutureDepthRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Returns
([]model.FutureDepth, error). Key fields from model.FutureDepth:
| Field | Type | JSON field |
|---|---|---|
ContractCode | string | contractCode |
Timestamp | int64 | timestamp |
Asks | []DepthLevel | asks |
Bids | []DepthLevel | bids |
Invocation example
result, err := qc.GetFutureDepth(model.FutureDepthRequest{
ContractCodes: []string{"ES2609"},
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"symbol": "ES2609",
"asks": [
{"price": 5646.00, "volume": 125, "count": 0},
{"price": 5646.25, "volume": 200, "count": 0},
{"price": 5646.50, "volume": 350, "count": 0}
],
"bids": [
{"price": 5645.75, "volume": 98, "count": 0},
{"price": 5645.50, "volume": 180, "count": 0},
{"price": 5645.25, "volume": 275, "count": 0}
]
}
]GetFutureTradingTimes
GetFutureTradingTimesPurpose
Retrieves future trading times data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetFutureTradingTimes(req model.FutureTradingTimesRequest) (*model.FutureTradingTime, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.FutureTradingTimesRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Returns
(*model.FutureTradingTime, error). Key fields from model.FutureTradingTime:
| Field | Type | JSON field |
|---|---|---|
ContractCode | string | contractCode |
BizDate | string | bizDate |
Zone | string | zone |
TradingTimes | []FutureTradingSegment | tradingTimes |
Invocation example
result, err := qc.GetFutureTradingTimes(model.FutureTradingTimesRequest{
ContractCode: "ES2609",
TradingDate: "2025-01-15",
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"symbol": "ES",
"tradingTimes": [
{"start": "18:00:00", "end": "17:00:00", "zone": "America/Chicago", "tradingSession": "Electronic"}
]
}
]Updated about 13 hours ago
