Options
GetOptionExpiration
GetOptionExpirationPurpose
Retrieves option expiration data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetOptionExpiration(symbols []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 |
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",
"dates": ["2025-08-08", "2025-08-15", "2025-08-22", "2025-09-19", "2025-10-17"],
"timestamp": [1786392000000, 1786996800000, 1787601600000, 1789988400000, 1792407600000]
}
]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.
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) ([]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] |
Returns
([]model.OptionChain, error). Key fields from model.OptionChain:
| Field | Type | JSON field |
|---|---|---|
Symbol | string | symbol |
Expiry | int64 | expiry |
Items | []OptionChainRow | items |
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": "2025-08-15",
"items": [
{
"identifier": "AAPL 250815C00300000",
"symbol": "AAPL",
"expiry": "2025-08-15",
"strike": 300.0,
"putCall": "CALL",
"open": 12.50,
"high": 14.80,
"low": 11.90,
"close": 13.25,
"volume": 5432,
"openInterest": 12345,
"latestPrice": 13.25
},
{
"identifier": "AAPL 250815P00300000",
"symbol": "AAPL",
"expiry": "2025-08-15",
"strike": 300.0,
"putCall": "PUT",
"open": 4.10,
"high": 5.20,
"low": 3.80,
"close": 4.50,
"volume": 3210,
"openInterest": 8765,
"latestPrice": 4.50
}
]
}
]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) ([]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 |
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 |
Invocation example
result, err := qc.GetOptionQuote([]string{"AAPL 260619C00200000"})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"identifier": "AAPL 250815C00300000",
"symbol": "AAPL",
"expiry": "2025-08-15",
"strike": 300.0,
"putCall": "CALL",
"open": 12.50,
"high": 14.80,
"low": 11.90,
"close": 13.25,
"preClose": 11.80,
"latestPrice": 13.25,
"volume": 5432,
"openInterest": 12345,
"askPrice": 13.35,
"askSize": 50,
"bidPrice": 13.15,
"bidSize": 80
}
]GetOptionKline
GetOptionKlinePurpose
Retrieves option kline data and decodes it into the published Go return model. The client uses API version 2.0.
Signature
func (c *QuoteClient) GetOptionKline(identifiers []string, period 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 |
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 |
Invocation example
result, err := qc.GetOptionKline([]string{"AAPL 260619C00200000"}, "day")
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}
]
}
]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 |
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 |
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": "-"}
]
}
]GetOptionTimeline
GetOptionTimelinePurpose
Retrieves option timeline 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 |
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 |
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 option depth data 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 |
Returns
([]model.Depth, error). Key fields from model.Depth:
| Field | Type | JSON field |
|---|---|---|
Symbol | string | symbol |
Asks | []DepthLevel | asks |
Bids | []DepthLevel | bids |
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)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)[
"AAPL",
"MSFT",
"GOOGL",
"AMZN",
"TSLA"
]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 |
Period | string | No | Omitted if empty | None; OptionAnalysisPeriod; 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.OptionAnalysis, error). Key fields from model.OptionAnalysis:
| Field | Type | JSON field |
|---|---|---|
Symbol | string | symbol |
HistoricalVol30D | float64 | historicalVolatility30Day |
HistoricalVol60D | float64 | historicalVolatility60Day |
HistoricalVol90D | float64 | historicalVolatility90Day |
ImpliedVol | float64 | impliedVolatility |
VolatilityList | []OptionVolatilityPoint | volatilityList |
Invocation example
result, err := qc.GetOptionAnalysis(model.OptionAnalysisRequest{
Symbols: []string{"AAPL"},
Market: "US",
Period: "day",
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"identifier": "AAPL 250815C00300000",
"symbol": "AAPL",
"expiry": "2025-08-15",
"strike": 300.0,
"putCall": "CALL",
"delta": 0.72,
"gamma": 0.015,
"theta": -0.35,
"vega": 0.48,
"rho": 0.12,
"impliedVol": 0.42,
"openInterest": 12345,
"volume": 5432
}
]Updated about 13 hours ago
