Futures

GetFutureExchange

Purpose

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:

FieldTypeJSON fieldDescription
CodestringcodeExchange code.
NamestringnameExchange name.
ZoneIDstringzoneIdExchange time-zone ID.

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"
  }
]

Rate limit

The base rate limit is 10 requests/min.


GetFutureContracts

Purpose

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

ParameterTypeRequiredSDK defaultConstraints
exchangestringYesNoneSee the exact signature; the SDK provides no additional default

Returns

([]model.FutureContractInfo, error). Key fields from model.FutureContractInfo:

FieldTypeJSON fieldDescription
ContinuousboolcontinuousWhether this is a continuous contract.
TradebooltradeWhether the contract is tradable.
TypestringtypeContract type.
ContractCodestringcontractCodeFutures contract code.
IbCodestringibCodeIB contract code.
NamestringnameContract name.
ContractMonthstringcontractMonthContract month.
LastTradingDatestringlastTradingDateLast trading date.
FirstNoticeDatestringfirstNoticeDateFirst notice date.
LastBiddingCloseTimeint64lastBiddingCloseTimeLast bidding close timestamp.
CurrencystringcurrencyContract currency.
ExchangeCodestringexchangeCodeExchange code.
Multiplierfloat64multiplierContract multiplier.
MinTickfloat64minTickMinimum price increment.
DisplayMultiplierfloat64displayMultiplierPrice display multiplier.
ExchangestringexchangeExchange name.
ProductWorthstringproductWorthContract value description.
DeliveryModestringdeliveryModeContract delivery mode.
ProductTypestringproductTypeFutures product type.
ProductScalestringproductScaleProduct scale.
LastTradingTimestampint64lastTradingTimestampLast trading timestamp.

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
  }
]

Rate limit

The base rate limit is 120 requests/min.


GetFutureContract

Purpose

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 fieldTypeRequiredSerializationSDK default and constraints
TypestringNoOmitted if emptyNot used by GetFutureContract
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
ContractCodestringYesOmitted when emptyFutures contract code

Returns

([]model.FutureContractInfo, error). Key fields from model.FutureContractInfo:

FieldTypeJSON fieldDescription
ContinuousboolcontinuousWhether this is a continuous contract.
TradebooltradeWhether the contract is tradable.
TypestringtypeContract type.
ContractCodestringcontractCodeFutures contract code.
IbCodestringibCodeIB contract code.
NamestringnameContract name.
ContractMonthstringcontractMonthContract month.
LastTradingDatestringlastTradingDateLast trading date.
FirstNoticeDatestringfirstNoticeDateFirst notice date.
LastBiddingCloseTimeint64lastBiddingCloseTimeLast bidding close timestamp.
CurrencystringcurrencyContract currency.
ExchangeCodestringexchangeCodeExchange code.
Multiplierfloat64multiplierContract multiplier.
MinTickfloat64minTickMinimum price increment.
DisplayMultiplierfloat64displayMultiplierPrice display multiplier.
ExchangestringexchangeExchange name.
ProductWorthstringproductWorthContract value description.
DeliveryModestringdeliveryModeContract delivery mode.
ProductTypestringproductTypeFutures product type.
ProductScalestringproductScaleProduct scale.
LastTradingTimestampint64lastTradingTimestampLast trading timestamp.

Invocation example

result, err := qc.GetFutureContract(model.FutureContractSingleRequest{
	ContractCode: "ES2609",
	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
}

Rate limit

The base rate limit is 120 requests/min.


GetAllFutureContracts

Purpose

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 fieldTypeRequiredSerializationSDK default and constraints
TypestringYesOmitted if emptyFutures product code, such as ES
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
ContractCodestringNoOmitted when emptyNot used by GetCurrentFutureContract
ExchangestringNoOmitted when emptyExchange code

Returns

([]model.FutureContractInfo, error). Key fields from model.FutureContractInfo:

FieldTypeJSON fieldDescription
ContinuousboolcontinuousWhether this is a continuous contract.
TradebooltradeWhether the contract is tradable.
TypestringtypeContract type.
ContractCodestringcontractCodeFutures contract code.
IbCodestringibCodeIB contract code.
NamestringnameContract name.
ContractMonthstringcontractMonthContract month.
LastTradingDatestringlastTradingDateLast trading date.
FirstNoticeDatestringfirstNoticeDateFirst notice date.
LastBiddingCloseTimeint64lastBiddingCloseTimeLast bidding close timestamp.
CurrencystringcurrencyContract currency.
ExchangeCodestringexchangeCodeExchange code.
Multiplierfloat64multiplierContract multiplier.
MinTickfloat64minTickMinimum price increment.
DisplayMultiplierfloat64displayMultiplierPrice display multiplier.
ExchangestringexchangeExchange name.
ProductWorthstringproductWorthContract value description.
DeliveryModestringdeliveryModeContract delivery mode.
ProductTypestringproductTypeFutures product type.
ProductScalestringproductScaleProduct scale.
LastTradingTimestampint64lastTradingTimestampLast trading timestamp.

Invocation example

result, err := qc.GetAllFutureContracts(model.AllFutureContractsRequest{
	Type: "ES",
	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

Purpose

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 fieldTypeRequiredSerializationSDK default and constraints
TypestringYesOmitted if emptyFutures product code, such as ES
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
ContractCodestringNoOmitted when emptyNot used by GetCurrentFutureContract

Returns

(*model.FutureContractInfo, error). Key fields from model.FutureContractInfo:

FieldTypeJSON fieldDescription
ContinuousboolcontinuousWhether this is a continuous contract.
TradebooltradeWhether the contract is tradable.
TypestringtypeContract type.
ContractCodestringcontractCodeFutures contract code.
IbCodestringibCodeIB contract code.
NamestringnameContract name.
ContractMonthstringcontractMonthContract month.
LastTradingDatestringlastTradingDateLast trading date.
FirstNoticeDatestringfirstNoticeDateFirst notice date.
LastBiddingCloseTimeint64lastBiddingCloseTimeLast bidding close timestamp.
CurrencystringcurrencyContract currency.
ExchangeCodestringexchangeCodeExchange code.
Multiplierfloat64multiplierContract multiplier.
MinTickfloat64minTickMinimum price increment.
DisplayMultiplierfloat64displayMultiplierPrice display multiplier.
ExchangestringexchangeExchange name.
ProductWorthstringproductWorthContract value description.
DeliveryModestringdeliveryModeContract delivery mode.
ProductTypestringproductTypeFutures product type.
ProductScalestringproductScaleProduct scale.
LastTradingTimestampint64lastTradingTimestampLast trading timestamp.

Invocation example

result, err := qc.GetCurrentFutureContract(model.FutureContractSingleRequest{
	Type: "ES",
	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
}

Rate limit

The base rate limit is 120 requests/min.


GetFutureContinuousContracts

Purpose

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 fieldTypeRequiredSerializationSDK default and constraints
TypestringYesOmitted if emptyFutures product code, such as ES
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US

Returns

([]model.FutureContractInfo, error). Key fields from model.FutureContractInfo:

FieldTypeJSON fieldDescription
ContinuousboolcontinuousWhether this is a continuous contract.
TradebooltradeWhether the contract is tradable.
TypestringtypeContract type.
ContractCodestringcontractCodeFutures contract code.
IbCodestringibCodeIB contract code.
NamestringnameContract name.
ContractMonthstringcontractMonthContract month.
LastTradingDatestringlastTradingDateLast trading date.
FirstNoticeDatestringfirstNoticeDateFirst notice date.
LastBiddingCloseTimeint64lastBiddingCloseTimeLast bidding close timestamp.
CurrencystringcurrencyContract currency.
ExchangeCodestringexchangeCodeExchange code.
Multiplierfloat64multiplierContract multiplier.
MinTickfloat64minTickMinimum price increment.
DisplayMultiplierfloat64displayMultiplierPrice display multiplier.
ExchangestringexchangeExchange name.
ProductWorthstringproductWorthContract value description.
DeliveryModestringdeliveryModeContract delivery mode.
ProductTypestringproductTypeFutures product type.
ProductScalestringproductScaleProduct scale.
LastTradingTimestampint64lastTradingTimestampLast trading timestamp.

Invocation example

result, err := qc.GetFutureContinuousContracts(model.FutureContinuousContractsRequest{
	Type: "ES",
	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"
  }
]

Rate limit

The base rate limit is 120 requests/min.


GetFutureHistoryMainContract

Purpose

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)

The current server does not support the future_main_contract endpoint used by the Go SDK.

Availability depends on market, instrument, and enabled data access.

Parameters

model.FutureHistoryMainContractRequest

SDK fieldTypeRequiredSerializationSDK default and constraints
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
ContractCodes[]stringNoOmitted when emptyFutures contract codes
BeginTimeint64NoOmitted when zeroStart time in milliseconds
EndTimeint64NoOmitted when zeroEnd time in milliseconds

Returns

([]model.FutureMainContractHistory, error). Key fields from model.FutureMainContractHistory:

FieldTypeJSON fieldDescription
ContractCodestringcontractCodeMain futures contract code.
SymbolstringsymbolFutures product symbol.
BeginDatestringbeginDateStart date of the main-contract period.
EndDatestringendDateEnd date of the main-contract period.

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

Purpose

Retrieves real-time futures quotes and decodes them 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 fieldTypeRequiredSerializationSDK default and constraints
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
ContractCodes[]stringNoOmitted when emptyFutures contract codes

Returns

([]model.FutureQuote, error). Key fields from model.FutureQuote:

FieldTypeJSON fieldDescription
ContractCodestringcontractCodeFutures contract code.
LatestPricefloat64latestPriceLatest traded price.
LatestSizeint64latestSizeLatest trade size.
LatestTimeint64latestTimeLatest quote timestamp.
BidPricefloat64bidPriceBest bid price.
AskPricefloat64askPriceBest ask price.
BidSizeint64bidSizeBest bid size.
AskSizeint64askSizeBest ask size.
OpenInterestint64openInterestOpen contracts outstanding.
OpenInterestChangeint64openInterestChangeChange in open interest.
Volumeint64volumeTrading volume.
Openfloat64openSession opening price.
Highfloat64highSession high price.
Lowfloat64lowSession low price.
LimitUpfloat64limitUpUpper daily price limit.
LimitDownfloat64limitDownLower daily price limit.
AvgPricefloat64avgPriceAverage traded price.
Settlementfloat64settlementSettlement price.

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"
  }
]

Rate limit

The base rate limit is 120 requests/min.


GetFutureKline

Purpose

Retrieves futures candlestick bars (K-line data) and decodes them 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 fieldTypeRequiredSerializationSDK default and constraints
PeriodstringNoOmitted if emptyAllowed values: day, week, month, year, 1min, 5min, 15min, 30min, 60min
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
ContractCodes[]stringNoOmitted when emptyFutures contract codes
ContractCodestringNoOmitted when emptyFutures contract code
BeginTimeint64NoOmitted when zeroStart time in milliseconds
EndTimeint64NoOmitted when zeroEnd time in milliseconds
BeginIndexintNoOmitted when zeroStart index
EndIndexintNoOmitted when zeroEnd index
LimitintNoOmitted when zeroMaximum number of results
PageTokenstringNoOmitted when emptyPagination token

Returns

([]model.FutureKline, error). Key fields from model.FutureKline:

FieldTypeJSON fieldDescription
NextPageTokenstringnextPageTokenCursor for the next page.
Items[]FutureKlineItemitemsFutures candlestick bars.

FutureKlineItem fields

FieldTypeDescription
Timeint64Timestamp
Volumeint64Volume
Openfloat64Open price
Closefloat64Close price
Highfloat64High price
Lowfloat64Low price
LastTimeint64Latest trade time
OpenInterestint64Open interest
Settlementfloat64Settlement price

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
      }
    ]
  }
]

Rate limit

The base rate limit is 60 requests/min.


GetFutureKlineByPage

Purpose

Retrieves futures bars by page and decodes them 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 fieldTypeRequiredSerializationSDK default and constraints
PeriodstringNoOmitted if emptyAllowed values: day, week, month, year, 1min, 5min, 15min, 30min, 60min
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
ContractCodestringNoOmitted when emptyFutures contract code
BeginTimeint64No0 is treated as -1Start time in milliseconds; -1 means unbounded
EndTimeint64No0 is treated as -1End time in milliseconds; -1 means unbounded
TotalSizeintNoDefaults to 1000 when less than or equal to 0Target total result count
PageSizeintNoDefaults to 200 when less than or equal to 0Page size

Returns

([]model.FutureKlineItem, error). Key fields from model.FutureKlineItem:

FieldTypeJSON fieldDescription
Timeint64timeBar timestamp.
Volumeint64volumeTrading volume.
Openfloat64openBar opening price.
Closefloat64closeBar closing price.
Highfloat64highBar high price.
Lowfloat64lowBar low price.
LastTimeint64lastTimeLast trade timestamp in the bar.
OpenInterestint64openInterestOpen contracts outstanding.
Settlementfloat64settlementSettlement price.

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

Purpose

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 fieldTypeRequiredSerializationSDK default and constraints
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
ContractCodestringNoOmitted when emptyFutures contract code
BeginIndexintYesNone; zero values are serializedStart index
EndIndexintYesNone; zero values are serializedEnd index
LimitintNoOmitted when zeroMaximum number of results

Returns

([]model.FutureTradeTickItem, error). Key fields from model.FutureTradeTickItem:

FieldTypeJSON fieldDescription
ContractCodestringcontractCodeFutures contract code.
Indexint64indexTrade-tick index.
Timeint64timeTrade timestamp.
Pricefloat64priceTrade price.
Volumeint64volumeTrade volume.
DirectionstringdirectionTrade 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": "-"}
    ]
  }
]

Rate limit

The base rate limit is 120 requests/min.


GetFutureDepth

Purpose

Retrieves futures order book 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 fieldTypeRequiredSerializationSDK default and constraints
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
ContractCodes[]stringNoOmitted when emptyFutures contract codes

Returns

([]model.FutureDepth, error). Key fields from model.FutureDepth:

FieldTypeJSON fieldDescription
ContractCodestringcontractCodeFutures contract code.
Timestampint64timestampOrder-book timestamp.
Asks[]DepthLevelasksAsk-side order-book levels.
Bids[]DepthLevelbidsBid-side order-book levels.

DepthLevel fields

FieldTypeDescription
Pricefloat64Price
CountintCount value
Volumeint64Volume

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

Purpose

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 fieldTypeRequiredSerializationSDK default and constraints
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
ContractCodestringNoOmitted when emptyFutures contract code
TradingDatestringNoOmitted when emptyTrading date value

Returns

(*model.FutureTradingTime, error). Key fields from model.FutureTradingTime:

FieldTypeJSON fieldDescription
ContractCodestringcontractCodeFutures contract code.
BizDatestringbizDateTrading business date.
ZonestringzoneTrading time zone.
TradingTimes[]FutureTradingSegmenttradingTimesTrading-session segments.
FutureTradingSegment fieldTypeJSON field
Startint64start
Endint64end
Typestringtype

Start and End are millisecond timestamps.

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"}
    ]
  }
]

Rate limit

The base rate limit is 60 requests/min.



Did this page help you?