Options

GetOptionExpiration

Purpose

Retrieves option expiration data and decodes it into the published Go return model.

Signature

func (c *QuoteClient) GetOptionExpiration(symbols []string, market ...string) ([]model.OptionExpiration, error)

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

Parameters

ParameterTypeRequiredSDK defaultConstraints
symbols[]stringYesNoneInstrument symbols; the SDK does not enforce a batch limit
market...stringNoUSUS or HK; only the first value is used

Returns

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

FieldTypeJSON field
Symbolstringsymbol
OptionSymbols[]stringoptionSymbols
Dates[]stringdates
Timestamps[]int64timestamps
Periods[]stringperiods
Counts[]intcounts

Invocation example

result, err := qc.GetOptionExpiration([]string{"AAPL"})
if err != nil {
	log.Fatal(err)
}
fmt.Printf("%#v\n", result)
[
  {
    "symbol": "AAPL",
    "optionSymbols": ["AAPL"],
    "dates": ["2025-08-08", "2025-08-15", "2025-08-22", "2025-09-19", "2025-10-17"],
    "timestamps": [1786392000000, 1786996800000, 1787601600000, 1789988400000, 1792407600000],
    "periods": ["weekly", "weekly", "weekly", "monthly", "monthly"],
    "counts": [120, 150, 80, 200, 180]
  }
]

Special option symbols for indices

  • S&P 500 (.SPX): monthly options use SPX; weekly and quarterly options use SPXW.
  • Nasdaq-100: monthly options use NDX; weekly options use NDXP.
  • VIX: monthly options use VIX; weekly options use VIXW.

Rate limit

The base rate limit is 60 requests/min.


GetOptionChain

Purpose

Retrieves option chain data and decodes it into the published Go return model. The client uses API version 3.0.

Signature

func (c *QuoteClient) GetOptionChain(items [][2]string, timezone ...string) ([]model.OptionChain, error)

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

Parameters

ParameterTypeRequiredSDK defaultConstraints
items[][2]stringYesNoneEach item is [underlying, YYYY-MM-DD]
timezone...stringNoAmerica/New_York for US; Asia/Hong_Kong for .HKIANA timezone; only the first value is used to convert expiry dates to millisecond timestamps

Use the full request entry point for chain filters or Greek values:

func (c *QuoteClient) GetOptionChainByReq(req model.OptionChainRequest) ([]model.OptionChain, error)
OptionChainRequest fieldTypeRequiredSerializationDescription
OptionBasic[]model.OptionQueryItemNoOmitted if emptyOption contracts
ReturnGreekValueboolNoOmitted when falseWhether to return Greeks
OptionFilter*model.OptionChainFilterNoOmitted when nilOption-chain filters
MarketstringNoOmitted if emptyMarket
LangstringNoOmitted if emptyLanguage
OptionChainFilter fieldTypeDescription
InTheMoney*boolWhether the option is in the money
ImpliedVolatility*RangeFloat64Implied-volatility range
OpenInterest*RangeIntOpen-interest range
Greeks*OptionChainFilterGreeksDelta, Gamma, Vega, Theta, and Rho ranges

RangeFloat64 and RangeInt use nullable Min and Max values for range boundaries.

Returns

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

FieldTypeJSON field
Symbolstringsymbol
Expiryint64expiry
Items[]OptionChainRowitems
OptionChainRow fieldTypeJSON field
Put*OptionLegput
Call*OptionLegcall
OptionLeg fieldTypeJSON field
Identifierstringidentifier
Strikestringstrike
Rightstringright
BidPricefloat64bidPrice
BidSizeint64bidSize
AskPricefloat64askPrice
AskSizeint64askSize
Volumeint64volume
LatestPricefloat64latestPrice
PreClosefloat64preClose
OpenInterestint64openInterest
Multiplierintmultiplier
LastTimestampint64lastTimestamp
ImpliedVolfloat64impliedVol
Deltafloat64delta
Gammafloat64gamma
Thetafloat64theta
Vegafloat64vega
Rhofloat64rho

Deprecated: The option-chain Greek return flag, Greek range filters, and the Delta, Gamma, Theta, Vega, and Rho response fields are deprecated. These values update daily and are not suitable for intraday decisions; new integrations should not request or filter by them.

Invocation example

result, err := qc.GetOptionChain([][2]string{{"AAPL", "2026-06-19"}})
if err != nil {
	log.Fatal(err)
}
fmt.Printf("%#v\n", result)
[
  {
    "symbol": "AAPL",
    "expiry": 1786996800000,
    "items": [
      {
        "call": {
          "identifier": "AAPL  250815C00300000",
          "strike": "300",
          "right": "CALL",
          "bidPrice": 13.15,
          "bidSize": 80,
          "askPrice": 13.35,
          "askSize": 50,
          "volume": 5432,
          "latestPrice": 13.25,
          "openInterest": 12345
        },
        "put": {
          "identifier": "AAPL  250815P00300000",
          "strike": "300",
          "right": "PUT",
          "bidPrice": 4.40,
          "bidSize": 60,
          "askPrice": 4.60,
          "askSize": 45,
          "volume": 3210,
          "latestPrice": 4.50,
          "openInterest": 8765
        }
      }
    ]
  }
]

Rate limit

The base rate limit is 60 requests/min.


GetOptionQuote

Purpose

Retrieves option quote data and decodes it into the published Go return model. The client uses API version 2.0.

Signature

func (c *QuoteClient) GetOptionQuote(identifiers []string, timezone ...string) ([]model.Brief, error)

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

Parameters

ParameterTypeRequiredSDK defaultConstraints
identifiers[]stringYesNoneOCC option identifiers; malformed values fail before transport
timezone...stringNoAmerica/New_York for US; Asia/Hong_Kong for .HKIANA timezone; only the first value is used

Returns

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

FieldTypeJSON field
Symbolstringsymbol
Openfloat64open
Highfloat64high
Lowfloat64low
Closefloat64close
PreClosefloat64preClose
LatestPricefloat64latestPrice
LatestTimeint64latestTime
AskPricefloat64askPrice
AskSizeint64askSize
BidPricefloat64bidPrice
BidSizeint64bidSize
Volumeint64volume
Statusstringstatus
AdjPreClosefloat64adjPreClose
Changefloat64change
ChangeRatefloat64changeRate
Amplitudefloat64amplitude
Expiryint64expiry
Strikestringstrike
Rightstringright
Multiplierintmultiplier
OpenInterestint64openInterest

Invocation example

result, err := qc.GetOptionQuote([]string{"AAPL 260619C00200000"})
if err != nil {
	log.Fatal(err)
}
fmt.Printf("%#v\n", result)
[
  {
    "symbol": "AAPL",
    "open": 12.50,
    "high": 14.80,
    "low": 11.90,
    "close": 13.25,
    "preClose": 11.80,
    "latestPrice": 13.25,
    "latestTime": 1785528000000,
    "askPrice": 13.35,
    "askSize": 50,
    "bidPrice": 13.15,
    "bidSize": 80,
    "volume": 5432,
    "status": "NORMAL",
    "expiry": 1786996800000,
    "strike": "300",
    "right": "CALL",
    "multiplier": 100,
    "openInterest": 12345
  }
]

Rate limit

The base rate limit is 120 requests/min.


GetOptionKline

Purpose

Retrieves option candlestick bars (K-line data) and decodes them into the published Go return model. The client uses API version 2.0.

Signature

func (c *QuoteClient) GetOptionKline(identifiers []string, period string, beginTime, endTime int64, timezone ...string) ([]model.Kline, error)

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

Parameters

ParameterTypeRequiredSDK defaultConstraints
identifiers[]stringYesNoneOCC option identifiers; malformed values fail before transport
periodstringYesNoneBar period; see the BarPeriod enum
beginTimeint64Yes0 is sent as -113-digit millisecond timestamp; -1 leaves this bound open
endTimeint64Yes0 is sent as -113-digit millisecond timestamp; -1 leaves this bound open
timezone...stringNoAmerica/New_York for US; Asia/Hong_Kong for .HKIANA timezone; only the first value is used

Use this overload to set the result limit and sort direction:

func (c *QuoteClient) GetOptionKlineWithOpts(identifiers []string, period string, beginTime, endTime int64, limit int, sortDir string, timezone ...string) ([]model.Kline, error)

The SDK omits limit when it is not positive and omits an empty sortDir.

Returns

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

FieldTypeJSON field
Symbolstringsymbol
Periodstringperiod
NextPageTokenstringnextPageToken
Items[]KlineItemitems

KlineItem fields

FieldTypeDescription
Timeint64Timestamp
Volumeint64Volume
Openfloat64Open price
Closefloat64Close price
Highfloat64High price
Lowfloat64Low price
Amountfloat64Amount

Invocation example

result, err := qc.GetOptionKline([]string{"AAPL 260619C00200000"}, "day", -1, -1)
if err != nil {
	log.Fatal(err)
}
fmt.Printf("%#v\n", result)
[
  {
    "symbol": "AAPL  250815C00300000",
    "period": "day",
    "nextPageToken": null,
    "items": [
      {"time": 1785384000000, "volume": 3200, "open": 11.80, "close": 12.50, "high": 12.90, "low": 11.50, "amount": 0},
      {"time": 1785470400000, "volume": 5432, "open": 12.50, "close": 13.25, "high": 14.80, "low": 11.90, "amount": 0}
    ]
  }
]

Rate limit

The base rate limit is 60 requests/min.


GetOptionTradeTicks

Purpose

Retrieves option trade ticks data and decodes it into the published Go return model.

Signature

func (c *QuoteClient) GetOptionTradeTicks(req model.OptionTradeTicksRequest) ([]model.TradeTick, error)

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

Parameters

model.OptionTradeTicksRequest

SDK fieldTypeRequiredSerializationSDK default and constraints
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
Contracts[]model.OptionQueryItemYesOmitted if emptyContract query entries; each supports Symbol, Expiry, Strike, Right, Period, BeginTime, EndTime, Limit, BeginIndex, EndIndex, and PageToken

OptionQueryItem fields

FieldTypeRequiredDefault/omissionDescription
SymbolstringNoOmitted when emptySymbol
Expiryint64NoOmitted when zeroExpiry value
StrikestringNoOmitted when emptyStrike value
RightstringNoOmitted when emptyRight value
PeriodstringNoOmitted when emptyPeriod
BeginTimeint64NoOmitted when zeroStart time in milliseconds
EndTimeint64NoOmitted when zeroEnd time in milliseconds
LimitintNoOmitted when zeroMaximum number of results
BeginIndexintNoOmitted when zeroStart index
EndIndexintNoOmitted when zeroEnd index
PageTokenstringNoOmitted when emptyPagination token

Returns

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

FieldTypeJSON field
Symbolstringsymbol
BeginIndexint64beginIndex
EndIndexint64endIndex
Items[]TradeTickItemitems

TradeTickItem fields

FieldTypeDescription
Timeint64Timestamp
Volumeint64Volume
Pricefloat64Price
TypestringOperation or product type

Invocation example

result, err := qc.GetOptionTradeTicks(model.OptionTradeTicksRequest{
	Contracts: []model.OptionQueryItem{{Symbol: "AAPL", Expiry: 1781827200000, Strike: "200", Right: "CALL"}},
	Lang: "en_US",
})
if err != nil {
	log.Fatal(err)
}
fmt.Printf("%#v\n", result)
[
  {
    "symbol": "AAPL  250815C00300000",
    "beginIndex": 1200,
    "endIndex": 1202,
    "items": [
      {"time": 1785527980000, "volume": 10, "price": 13.20, "type": "+"},
      {"time": 1785527985000, "volume": 5, "price": 13.25, "type": "-"}
    ]
  }
]

Rate limit

The base rate limit is 120 requests/min.


GetOptionTimeline

Purpose

Retrieves option timeline (intraday data) and decodes it into the published Go return model.

Signature

func (c *QuoteClient) GetOptionTimeline(req model.OptionTimelineRequest) ([]model.Timeline, error)

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

Parameters

model.OptionTimelineRequest

SDK fieldTypeRequiredSerializationSDK default and constraints
MarketstringNoOmitted if emptyAllowed values: ALL, US, HK, CN, SG
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
OptionQuery[]model.OptionQueryItemYesOmitted if emptyOption contract query entries; fields are listed above

OptionQueryItem fields

FieldTypeRequiredDefault/omissionDescription
SymbolstringNoOmitted when emptySymbol
Expiryint64NoOmitted when zeroExpiry value
StrikestringNoOmitted when emptyStrike value
RightstringNoOmitted when emptyRight value
PeriodstringNoOmitted when emptyPeriod
BeginTimeint64NoOmitted when zeroStart time in milliseconds
EndTimeint64NoOmitted when zeroEnd time in milliseconds
LimitintNoOmitted when zeroMaximum number of results
BeginIndexintNoOmitted when zeroStart index
EndIndexintNoOmitted when zeroEnd index
PageTokenstringNoOmitted when emptyPagination token

Returns

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

FieldTypeJSON field
Symbolstringsymbol
Periodstringperiod
PreClosefloat64preClose
Intraday*TimelineBucketintraday
PreHours*TimelineBucketpreHours
AfterHours*TimelineBucketafterHours

TimelineBucket fields

FieldTypeDescription
Items[]TimelineItemResult items

TimelineItem fields

FieldTypeDescription
Timeint64Timestamp
Volumeint64Volume
Pricefloat64Price
AvgPricefloat64Avg price value

Invocation example

result, err := qc.GetOptionTimeline(model.OptionTimelineRequest{
	OptionQuery: []model.OptionQueryItem{{Symbol: "AAPL", Expiry: 1781827200000, Strike: "200", Right: "CALL"}},
	Market: "US",
	Lang: "en_US",
})
if err != nil {
	log.Fatal(err)
}
fmt.Printf("%#v\n", result)
[
  {
    "symbol": "AAPL  250815C00300000",
    "period": "day",
    "preClose": 11.80,
    "intraday": {
      "items": [
        {"time": 1785504600000, "price": 12.50, "avgPrice": 12.50, "volume": 120},
        {"time": 1785504660000, "price": 12.65, "avgPrice": 12.57, "volume": 85},
        {"time": 1785504720000, "price": 12.45, "avgPrice": 12.53, "volume": 200}
      ]
    },
    "preHours": null,
    "afterHours": null
  }
]

GetOptionDepth

Purpose

Retrieves the option order book and decodes it into the published Go return model.

Signature

func (c *QuoteClient) GetOptionDepth(req model.OptionDepthRequest) ([]model.Depth, error)

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

Parameters

model.OptionDepthRequest

SDK fieldTypeRequiredSerializationSDK default and constraints
MarketstringNoOmitted if emptyAllowed values: ALL, US, HK, CN, SG
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
OptionBasic[]model.OptionQueryItemYesOmitted if emptyOption contract entries; fields are listed above

OptionQueryItem fields

FieldTypeRequiredDefault/omissionDescription
SymbolstringNoOmitted when emptySymbol
Expiryint64NoOmitted when zeroExpiry value
StrikestringNoOmitted when emptyStrike value
RightstringNoOmitted when emptyRight value
PeriodstringNoOmitted when emptyPeriod
BeginTimeint64NoOmitted when zeroStart time in milliseconds
EndTimeint64NoOmitted when zeroEnd time in milliseconds
LimitintNoOmitted when zeroMaximum number of results
BeginIndexintNoOmitted when zeroStart index
EndIndexintNoOmitted when zeroEnd index
PageTokenstringNoOmitted when emptyPagination token

Returns

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

FieldTypeJSON field
Symbolstringsymbol
Asks[]DepthLevelasks
Bids[]DepthLevelbids

DepthLevel fields

FieldTypeDescription
Pricefloat64Price
CountintCount value
Volumeint64Volume

Invocation example

result, err := qc.GetOptionDepth(model.OptionDepthRequest{
	OptionBasic: []model.OptionQueryItem{{Symbol: "AAPL", Expiry: 1781827200000, Strike: "200", Right: "CALL"}},
	Market: "US",
	Lang: "en_US",
})
if err != nil {
	log.Fatal(err)
}
fmt.Printf("%#v\n", result)
[
  {
    "symbol": "AAPL  250815C00300000",
    "asks": [
      {"price": 13.35, "volume": 50, "count": 0},
      {"price": 13.40, "volume": 120, "count": 0}
    ],
    "bids": [
      {"price": 13.15, "volume": 80, "count": 0},
      {"price": 13.10, "volume": 150, "count": 0}
    ]
  }
]

GetOptionSymbols

Purpose

Retrieves option symbols data and decodes it into the published Go return model.

Signature

func (c *QuoteClient) GetOptionSymbols(req model.OptionSymbolsRequest) ([]model.OptionSymbol, error)

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

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

Parameters

model.OptionSymbolsRequest

SDK fieldTypeRequiredSerializationSDK default and constraints
MarketstringNoOmitted if emptyAllowed values: ALL, US, HK, CN, SG
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US

Returns

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

FieldTypeJSON field
Symbolstringsymbol
Marketstringmarket
NameCNstringnameCN
NameENstringnameEN

Invocation example

result, err := qc.GetOptionSymbols(model.OptionSymbolsRequest{
	Market: "US",
	Lang: "en_US",
})
if err != nil {
	log.Fatal(err)
}
fmt.Printf("%#v\n", result)
[
  {"symbol": "AAPL", "market": "US", "nameCN": "苹果", "nameEN": "Apple Inc"},
  {"symbol": "MSFT", "market": "US", "nameCN": "微软", "nameEN": "Microsoft Corp"},
  {"symbol": "GOOGL", "market": "US", "nameCN": "谷歌", "nameEN": "Alphabet Inc"}
]

GetOptionAnalysis

Purpose

Retrieves option analysis data and decodes it into the published Go return model.

Signature

func (c *QuoteClient) GetOptionAnalysis(req model.OptionAnalysisRequest) ([]model.OptionAnalysis, error)

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

Parameters

model.OptionAnalysisRequest

SDK fieldTypeRequiredSerializationSDK default and constraints
MarketstringNoOmitted if emptyAllowed values: ALL, US, HK, CN, SG
Symbols[]model.OptionAnalysisSymbolYesOmitted if emptyEach entry contains Symbol and can independently set Period and RequireVolatilityList
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US

OptionAnalysisSymbol fields

FieldTypeRequiredDefault/omissionDescription
SymbolstringYesNone; zero values are serializedSymbol
PeriodstringNoOmitted when emptyPeriod
RequireVolatilityList*boolNoOmitted when nilRequire volatility list value

Returns

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

FieldTypeJSON field
Symbolstringsymbol
ImpliedVol30Daysfloat64impliedVol30Days
HisVolatilityfloat64hisVolatility
IvHisVRatiofloat64ivHisVRatio
CallPutRatiofloat64callPutRatio
ImpliedVolMetric*ImpliedVolMetricimpliedVolMetric
VolatilityList[]OptionVolatilityPointvolatilityList
ImpliedVolMetric fieldTypeJSON field
Periodstringperiod
Percentilefloat64percentile
Rankfloat64rank
OptionVolatilityPoint fieldTypeJSON field
ImpliedVolfloat64impliedVol
Percentilefloat64percentile
Rankfloat64rank
HisVolatilityfloat64hisVolatility
Timestampint64timestamp

Invocation example

withList := true
result, err := qc.GetOptionAnalysis(model.OptionAnalysisRequest{
	Symbols: []model.OptionAnalysisSymbol{{Symbol: "AAPL", Period: "52week", RequireVolatilityList: &withList}},
	Market: "US",
	Lang: "en_US",
})
if err != nil {
	log.Fatal(err)
}
fmt.Printf("%#v\n", result)
[
  {
    "symbol": "AAPL",
    "impliedVol30Days": 0.32,
    "hisVolatility": 0.28,
    "ivHisVRatio": 1.14,
    "callPutRatio": 1.85,
    "impliedVolMetric": {
      "period": "year",
      "percentile": 0.45,
      "rank": 0.52
    },
    "volatilityList": [
      {"timestamp": 1785384000000, "impliedVol": 0.31, "hisVolatility": 0.27, "percentile": 0.42, "rank": 0.50},
      {"timestamp": 1785470400000, "impliedVol": 0.32, "hisVolatility": 0.28, "percentile": 0.45, "rank": 0.52}
    ]
  }
]

Rate limit

The base rate limit is 60 requests/min.



Did this page help you?