Options
GetOptionExpiration
GetOptionExpirationPurpose
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
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
symbols | []string | Yes | None | Instrument symbols; the SDK does not enforce a batch limit |
market | ...string | No | US | US or HK; only the first value is used |
Returns
([]model.OptionExpiration, error). Key fields from model.OptionExpiration:
| Field | Type | JSON field |
|---|---|---|
Symbol | string | symbol |
OptionSymbols | []string | optionSymbols |
Dates | []string | dates |
Timestamps | []int64 | timestamps |
Periods | []string | periods |
Counts | []int | counts |
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 useSPX; weekly and quarterly options useSPXW. - Nasdaq-100: monthly options use
NDX; weekly options useNDXP. - VIX: monthly options use
VIX; weekly options useVIXW.
Rate limit
The base rate limit is 60 requests/min.
GetOptionChain
GetOptionChainPurpose
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
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
items | [][2]string | Yes | None | Each item is [underlying, YYYY-MM-DD] |
timezone | ...string | No | America/New_York for US; Asia/Hong_Kong for .HK | IANA 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 field | Type | Required | Serialization | Description |
|---|---|---|---|---|
OptionBasic | []model.OptionQueryItem | No | Omitted if empty | Option contracts |
ReturnGreekValue | bool | No | Omitted when false | Whether to return Greeks |
OptionFilter | *model.OptionChainFilter | No | Omitted when nil | Option-chain filters |
Market | string | No | Omitted if empty | Market |
Lang | string | No | Omitted if empty | Language |
OptionChainFilter field | Type | Description |
|---|---|---|
InTheMoney | *bool | Whether the option is in the money |
ImpliedVolatility | *RangeFloat64 | Implied-volatility range |
OpenInterest | *RangeInt | Open-interest range |
Greeks | *OptionChainFilterGreeks | Delta, 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:
| Field | Type | JSON field |
|---|---|---|
Symbol | string | symbol |
Expiry | int64 | expiry |
Items | []OptionChainRow | items |
OptionChainRow field | Type | JSON field |
|---|---|---|
Put | *OptionLeg | put |
Call | *OptionLeg | call |
OptionLeg field | Type | JSON field |
|---|---|---|
Identifier | string | identifier |
Strike | string | strike |
Right | string | right |
BidPrice | float64 | bidPrice |
BidSize | int64 | bidSize |
AskPrice | float64 | askPrice |
AskSize | int64 | askSize |
Volume | int64 | volume |
LatestPrice | float64 | latestPrice |
PreClose | float64 | preClose |
OpenInterest | int64 | openInterest |
Multiplier | int | multiplier |
LastTimestamp | int64 | lastTimestamp |
ImpliedVol | float64 | impliedVol |
Delta | float64 | delta |
Gamma | float64 | gamma |
Theta | float64 | theta |
Vega | float64 | vega |
Rho | float64 | rho |
Deprecated: The option-chain Greek return flag, Greek range filters, and the
Delta,Gamma,Theta,Vega, andRhoresponse 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
GetOptionQuotePurpose
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
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
identifiers | []string | Yes | None | OCC option identifiers; malformed values fail before transport |
timezone | ...string | No | America/New_York for US; Asia/Hong_Kong for .HK | IANA timezone; only the first value is used |
Returns
([]model.Brief, error). Key fields from model.Brief:
| Field | Type | JSON field |
|---|---|---|
Symbol | string | symbol |
Open | float64 | open |
High | float64 | high |
Low | float64 | low |
Close | float64 | close |
PreClose | float64 | preClose |
LatestPrice | float64 | latestPrice |
LatestTime | int64 | latestTime |
AskPrice | float64 | askPrice |
AskSize | int64 | askSize |
BidPrice | float64 | bidPrice |
BidSize | int64 | bidSize |
Volume | int64 | volume |
Status | string | status |
AdjPreClose | float64 | adjPreClose |
Change | float64 | change |
ChangeRate | float64 | changeRate |
Amplitude | float64 | amplitude |
Expiry | int64 | expiry |
Strike | string | strike |
Right | string | right |
Multiplier | int | multiplier |
OpenInterest | int64 | openInterest |
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
GetOptionKlinePurpose
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
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
identifiers | []string | Yes | None | OCC option identifiers; malformed values fail before transport |
period | string | Yes | None | Bar period; see the BarPeriod enum |
beginTime | int64 | Yes | 0 is sent as -1 | 13-digit millisecond timestamp; -1 leaves this bound open |
endTime | int64 | Yes | 0 is sent as -1 | 13-digit millisecond timestamp; -1 leaves this bound open |
timezone | ...string | No | America/New_York for US; Asia/Hong_Kong for .HK | IANA 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:
| Field | Type | JSON field |
|---|---|---|
Symbol | string | symbol |
Period | string | period |
NextPageToken | string | nextPageToken |
Items | []KlineItem | items |
KlineItem fields
| Field | Type | Description |
|---|---|---|
Time | int64 | Timestamp |
Volume | int64 | Volume |
Open | float64 | Open price |
Close | float64 | Close price |
High | float64 | High price |
Low | float64 | Low price |
Amount | float64 | Amount |
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
GetOptionTradeTicksPurpose
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 field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Contracts | []model.OptionQueryItem | Yes | Omitted if empty | Contract query entries; each supports Symbol, Expiry, Strike, Right, Period, BeginTime, EndTime, Limit, BeginIndex, EndIndex, and PageToken |
OptionQueryItem fields
| Field | Type | Required | Default/omission | Description |
|---|---|---|---|---|
Symbol | string | No | Omitted when empty | Symbol |
Expiry | int64 | No | Omitted when zero | Expiry value |
Strike | string | No | Omitted when empty | Strike value |
Right | string | No | Omitted when empty | Right value |
Period | string | No | Omitted when empty | Period |
BeginTime | int64 | No | Omitted when zero | Start time in milliseconds |
EndTime | int64 | No | Omitted when zero | End time in milliseconds |
Limit | int | No | Omitted when zero | Maximum number of results |
BeginIndex | int | No | Omitted when zero | Start index |
EndIndex | int | No | Omitted when zero | End index |
PageToken | string | No | Omitted when empty | Pagination token |
Returns
([]model.TradeTick, error). Key fields from model.TradeTick:
| Field | Type | JSON field |
|---|---|---|
Symbol | string | symbol |
BeginIndex | int64 | beginIndex |
EndIndex | int64 | endIndex |
Items | []TradeTickItem | items |
TradeTickItem fields
| Field | Type | Description |
|---|---|---|
Time | int64 | Timestamp |
Volume | int64 | Volume |
Price | float64 | Price |
Type | string | Operation 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
GetOptionTimelinePurpose
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 field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Market | string | No | Omitted if empty | Allowed values: ALL, US, HK, CN, SG |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
OptionQuery | []model.OptionQueryItem | Yes | Omitted if empty | Option contract query entries; fields are listed above |
OptionQueryItem fields
| Field | Type | Required | Default/omission | Description |
|---|---|---|---|---|
Symbol | string | No | Omitted when empty | Symbol |
Expiry | int64 | No | Omitted when zero | Expiry value |
Strike | string | No | Omitted when empty | Strike value |
Right | string | No | Omitted when empty | Right value |
Period | string | No | Omitted when empty | Period |
BeginTime | int64 | No | Omitted when zero | Start time in milliseconds |
EndTime | int64 | No | Omitted when zero | End time in milliseconds |
Limit | int | No | Omitted when zero | Maximum number of results |
BeginIndex | int | No | Omitted when zero | Start index |
EndIndex | int | No | Omitted when zero | End index |
PageToken | string | No | Omitted when empty | Pagination token |
Returns
([]model.Timeline, error). Key fields from model.Timeline:
| Field | Type | JSON field |
|---|---|---|
Symbol | string | symbol |
Period | string | period |
PreClose | float64 | preClose |
Intraday | *TimelineBucket | intraday |
PreHours | *TimelineBucket | preHours |
AfterHours | *TimelineBucket | afterHours |
TimelineBucket fields
| Field | Type | Description |
|---|---|---|
Items | []TimelineItem | Result items |
TimelineItem fields
| Field | Type | Description |
|---|---|---|
Time | int64 | Timestamp |
Volume | int64 | Volume |
Price | float64 | Price |
AvgPrice | float64 | Avg 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
GetOptionDepthPurpose
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 field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Market | string | No | Omitted if empty | Allowed values: ALL, US, HK, CN, SG |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
OptionBasic | []model.OptionQueryItem | Yes | Omitted if empty | Option contract entries; fields are listed above |
OptionQueryItem fields
| Field | Type | Required | Default/omission | Description |
|---|---|---|---|---|
Symbol | string | No | Omitted when empty | Symbol |
Expiry | int64 | No | Omitted when zero | Expiry value |
Strike | string | No | Omitted when empty | Strike value |
Right | string | No | Omitted when empty | Right value |
Period | string | No | Omitted when empty | Period |
BeginTime | int64 | No | Omitted when zero | Start time in milliseconds |
EndTime | int64 | No | Omitted when zero | End time in milliseconds |
Limit | int | No | Omitted when zero | Maximum number of results |
BeginIndex | int | No | Omitted when zero | Start index |
EndIndex | int | No | Omitted when zero | End index |
PageToken | string | No | Omitted when empty | Pagination token |
Returns
([]model.Depth, error). Key fields from model.Depth:
| Field | Type | JSON field |
|---|---|---|
Symbol | string | symbol |
Asks | []DepthLevel | asks |
Bids | []DepthLevel | bids |
DepthLevel fields
| Field | Type | Description |
|---|---|---|
Price | float64 | Price |
Count | int | Count value |
Volume | int64 | Volume |
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
GetOptionSymbolsPurpose
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 field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Market | string | No | Omitted if empty | Allowed values: ALL, US, HK, CN, SG |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Returns
([]model.OptionSymbol, error). Key fields from model.OptionSymbol:
| Field | Type | JSON field |
|---|---|---|
Symbol | string | symbol |
Market | string | market |
NameCN | string | nameCN |
NameEN | string | nameEN |
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
GetOptionAnalysisPurpose
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 field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Market | string | No | Omitted if empty | Allowed values: ALL, US, HK, CN, SG |
Symbols | []model.OptionAnalysisSymbol | Yes | Omitted if empty | Each entry contains Symbol and can independently set Period and RequireVolatilityList |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
OptionAnalysisSymbol fields
| Field | Type | Required | Default/omission | Description |
|---|---|---|---|---|
Symbol | string | Yes | None; zero values are serialized | Symbol |
Period | string | No | Omitted when empty | Period |
RequireVolatilityList | *bool | No | Omitted when nil | Require volatility list value |
Returns
([]model.OptionAnalysis, error). Key fields from model.OptionAnalysis:
| Field | Type | JSON field |
|---|---|---|
Symbol | string | symbol |
ImpliedVol30Days | float64 | impliedVol30Days |
HisVolatility | float64 | hisVolatility |
IvHisVRatio | float64 | ivHisVRatio |
CallPutRatio | float64 | callPutRatio |
ImpliedVolMetric | *ImpliedVolMetric | impliedVolMetric |
VolatilityList | []OptionVolatilityPoint | volatilityList |
ImpliedVolMetric field | Type | JSON field |
|---|---|---|
Period | string | period |
Percentile | float64 | percentile |
Rank | float64 | rank |
OptionVolatilityPoint field | Type | JSON field |
|---|---|---|
ImpliedVol | float64 | impliedVol |
Percentile | float64 | percentile |
Rank | float64 | rank |
HisVolatility | float64 | hisVolatility |
Timestamp | int64 | timestamp |
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.
Updated about 7 hours ago
