Securities
GetSymbols
GetSymbolsPurpose
Retrieves symbols data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetSymbols(req model.SymbolsRequest) ([]string, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.SymbolsRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Market | string | No | Omitted if empty | Allowed values: ALL, US, HK, CN, SG |
SecType | string | No | Omitted if empty | Allowed values: ALL, STK, OPT, WAR, IOPT, FUT, FOP, CASH, MLEG, FUND |
IncludeOtc | bool | No | Omitted when false | Whether to include OTC instruments |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Returns
([]string, error)
Invocation example
result, err := qc.GetSymbols(model.SymbolsRequest{
Market: "US",
SecType: "STK",
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
"AAPL",
"MSFT",
"GOOGL",
"AMZN",
"TSLA"
]Rate limit
The base rate limit is 10 requests/min.
GetSymbolNames
GetSymbolNamesPurpose
Retrieves symbol names data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetSymbolNames(req model.SymbolsRequest) ([]model.SymbolName, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.SymbolsRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Market | string | No | Omitted if empty | Allowed values: ALL, US, HK, CN, SG |
SecType | string | No | Omitted if empty | Allowed values: ALL, STK, OPT, WAR, IOPT, FUT, FOP, CASH, MLEG, FUND |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
IncludeOtc | bool | No | Omitted when false | Include otc value |
Returns
([]model.SymbolName, error). Key fields from model.SymbolName:
| Field | Type | JSON field | Description |
|---|---|---|---|
Symbol | string | symbol | Instrument symbol. |
Name | string | name | Instrument name. |
Market | string | market | Market code. |
Invocation example
result, err := qc.GetSymbolNames(model.SymbolsRequest{
Market: "US",
SecType: "STK",
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"symbol": "AAPL",
"name": "Apple Inc",
"market": "US"
},
{
"symbol": "MSFT",
"name": "Microsoft Corp",
"market": "US"
},
{
"symbol": "GOOGL",
"name": "Alphabet Inc",
"market": "US"
}
]Rate limit
The base rate limit is 10 requests/min.
GetTradeMetas
GetTradeMetasPurpose
Retrieves trade metas data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetTradeMetas(req model.TradeMetasRequest) ([]model.TradeMeta, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.TradeMetasRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Symbols | []string | No | Omitted when empty | Symbols |
Returns
([]model.TradeMeta, error). Key fields from model.TradeMeta:
| Field | Type | JSON field | Description |
|---|---|---|---|
Symbol | string | symbol | Instrument symbol. |
LotSize | int | lotSize | Minimum trading lot size. |
MinTick | float64 | minTick | Minimum price increment. |
SpreadScale | float64 | spreadScale | Price spread scale. |
ShortableFlag | string | shortableFlag | Short-selling eligibility flag. |
MarginableFlag | string | marginableFlag | Margin-trading eligibility flag. |
Invocation example
result, err := qc.GetTradeMetas(model.TradeMetasRequest{
Symbols: []string{"AAPL"},
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"symbol": "AAPL",
"lotSize": 1,
"minTick": 0.01,
"spreadScale": 0.01,
"shortableFlag": "Y",
"marginableFlag": "Y"
}
]Rate limit
The base rate limit is 60 requests/min.
GetRealTimeQuote
GetRealTimeQuotePurpose
Retrieves real-time quotes and decodes them into the published Go return model.
Signature
func (c *QuoteClient) GetRealTimeQuote(req model.BriefRequest) ([]model.Brief, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.BriefRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Symbols | []string | No | Omitted if empty | — |
IncludeHourTrading | *bool | No | Omitted when nil | Whether to include extended-hours quotes; a pointer distinguishes explicit false from omission |
SecType | string | No | Omitted if empty | Allowed values: ALL, STK, OPT, WAR, IOPT, FUT, FOP, CASH, MLEG, FUND |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Returns
([]model.Brief, error). Key fields from model.Brief:
| Field | Type | JSON field | Description |
|---|---|---|---|
Symbol | string | symbol | Instrument symbol. |
Open | float64 | open | Session opening price. |
High | float64 | high | Session high price. |
Low | float64 | low | Session low price. |
Close | float64 | close | Session closing price. |
PreClose | float64 | preClose | Previous closing price. |
LatestPrice | float64 | latestPrice | Latest traded price. |
LatestTime | int64 | latestTime | Latest quote timestamp. |
AskPrice | float64 | askPrice | Best ask price. |
AskSize | int64 | askSize | Best ask size. |
BidPrice | float64 | bidPrice | Best bid price. |
BidSize | int64 | bidSize | Best bid size. |
Volume | int64 | volume | Trading volume. |
Status | string | status | Quote status. |
AdjPreClose | float64 | adjPreClose | Adjusted previous closing price. |
Change | float64 | change | Price change from the previous close. |
ChangeRate | float64 | changeRate | Price change rate. |
Amplitude | float64 | amplitude | Session price range rate. |
Expiry | int64 | expiry | Option expiry timestamp. |
Strike | string | strike | Option strike price. |
Right | string | right | Option call or put right. |
Multiplier | int | multiplier | Contract multiplier. |
OpenInterest | int64 | openInterest | Open contracts outstanding. |
Invocation example
result, err := qc.GetRealTimeQuote(model.BriefRequest{
Symbols: []string{"AAPL"},
SecType: "STK",
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"symbol": "AAPL",
"open": 304.81,
"high": 310.69,
"low": 300.0,
"close": 308.91,
"preClose": 333.43,
"latestPrice": 308.91,
"latestTime": 1785528000000,
"askPrice": 310.97,
"askSize": 400,
"bidPrice": 310.89,
"bidSize": 80,
"volume": 176739024,
"status": "NORMAL"
}
]Rate limit
The base rate limit is 120 requests/min.
GetDelayedQuote
GetDelayedQuotePurpose
Retrieves delayed quote data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetDelayedQuote(req model.StockDelayBriefsRequest) ([]model.Brief, error)Retrieves delayed quotes.
Parameters
model.StockDelayBriefsRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
SecType | string | No | Omitted if empty | Allowed values: ALL, STK, OPT, WAR, IOPT, FUT, FOP, CASH, MLEG, FUND |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Symbols | []string | No | Omitted when empty | Symbols |
Returns
([]model.Brief, error). Key fields from model.Brief:
| Field | Type | JSON field | Description |
|---|---|---|---|
Symbol | string | symbol | Instrument symbol. |
Open | float64 | open | Session opening price. |
High | float64 | high | Session high price. |
Low | float64 | low | Session low price. |
Close | float64 | close | Session closing price. |
PreClose | float64 | preClose | Previous closing price. |
LatestPrice | float64 | latestPrice | Latest traded price. |
LatestTime | int64 | latestTime | Latest quote timestamp. |
AskPrice | float64 | askPrice | Best ask price. |
AskSize | int64 | askSize | Best ask size. |
BidPrice | float64 | bidPrice | Best bid price. |
BidSize | int64 | bidSize | Best bid size. |
Volume | int64 | volume | Trading volume. |
Status | string | status | Quote status. |
AdjPreClose | float64 | adjPreClose | Adjusted previous closing price. |
Change | float64 | change | Price change from the previous close. |
ChangeRate | float64 | changeRate | Price change rate. |
Amplitude | float64 | amplitude | Session price range rate. |
Expiry | int64 | expiry | Option expiry timestamp. |
Strike | string | strike | Option strike price. |
Right | string | right | Option call or put right. |
Multiplier | int | multiplier | Contract multiplier. |
OpenInterest | int64 | openInterest | Open contracts outstanding. |
Invocation example
result, err := qc.GetDelayedQuote(model.StockDelayBriefsRequest{
Symbols: []string{"AAPL"},
SecType: "STK",
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"symbol": "AAPL",
"open": 304.81,
"high": 310.69,
"low": 300.0,
"close": 308.91,
"preClose": 333.43,
"latestPrice": 308.91,
"latestTime": 1785528000000,
"askPrice": 310.97,
"askSize": 400,
"bidPrice": 310.89,
"bidSize": 80,
"volume": 176739024,
"status": "NORMAL"
}
]Rate limit
The base rate limit is 10 requests/min.
GetKline
GetKlinePurpose
Retrieves stock candlestick bars.
Signature
func (c *QuoteClient) GetKline(req model.KlineRequest) ([]model.Kline, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.KlineRequest
| 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 |
Right | string | No | Omitted if empty | Allowed values: PUT, CALL (option side); br, nr when used as quote adjustment |
BeginTime | int64 | No | Omitted if empty | None; mutually exclusive with BeginIndex/EndIndex; millisecond timestamp |
EndTime | int64 | No | Omitted if empty | None; mutually exclusive with BeginIndex/EndIndex; millisecond timestamp |
Limit | int | No | Omitted when zero | Result count |
BeginIndex | int | No | Omitted when zero | Start index; mutually exclusive with the time range |
EndIndex | int | No | Omitted when zero | End index; mutually exclusive with the time range |
PageToken | string | No | Omitted if empty | Pagination cursor |
TradeSession | string | No | Omitted if empty | Trading session: PreMarket, Regular, AfterHours, or OverNight |
Date | string | No | Omitted if empty | Query date |
WithFundamental | *bool | No | Omitted when nil | Whether to include fundamental data; a pointer distinguishes explicit false from omission |
SecType | string | No | Omitted if empty | Allowed values: ALL, STK, OPT, WAR, IOPT, FUT, FOP, CASH, MLEG, FUND |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Symbols | []string | No | Omitted when empty | Symbols |
Time and index ranges cannot be combined.
Returns
([]model.Kline, error). Key fields from model.Kline:
| Field | Type | JSON field | Description |
|---|---|---|---|
Symbol | string | symbol | Instrument symbol. |
Period | string | period | Candlestick period. |
NextPageToken | string | nextPageToken | Cursor for the next page. |
Items | []KlineItem | items | Candlestick bars. |
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.GetKline(model.KlineRequest{
Symbols: []string{"AAPL"},
Period: "day",
Right: "CALL",
BeginTime: 1735689600000,
EndTime: 1738281600000,
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"symbol": "AAPL",
"period": "day",
"nextPageToken": null,
"items": [
{
"time": 1785384000000,
"volume": 74817792,
"open": 333.10,
"close": 333.43,
"high": 334.75,
"low": 329.59,
"amount": 24701334239.0
},
{
"time": 1785470400000,
"volume": 132489137,
"open": 304.81,
"close": 308.91,
"high": 310.69,
"low": 300.0,
"amount": 40348574927.0
}
]
}
]Rate limit
The base rate limit is 60 requests/min.
GetKlineByPage
GetKlineByPagePurpose
Retrieves stock candlestick bars by page. The client merges the results.
Signature
func (c *QuoteClient) GetKlineByPage(req model.KlineByPageRequest) ([]model.KlineItem, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.KlineByPageRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Symbol | string | No | Omitted if empty | Instrument symbol |
SecType | string | No | Omitted if empty | Allowed values: ALL, STK, OPT, WAR, IOPT, FUT, FOP, CASH, MLEG, FUND |
Period | string | No | Omitted if empty | Allowed values: day, week, month, year, 1min, 5min, 15min, 30min, 60min |
BeginTime | int64 | No | Omitted when zero | Start time in milliseconds |
EndTime | int64 | No | Omitted when zero | End time in milliseconds |
TotalSize | int | No | 1000 when <= 0 | Total desired result count |
PageSize | int | No | 200 when <= 0 | Result count per page |
Right | string | No | Omitted if empty | Allowed values: PUT, CALL (option side); br, nr when used as quote adjustment |
TradeSession | string | No | Omitted if empty | Trading session: PreMarket, Regular, AfterHours, or OverNight |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
The SDK merges pages in ascending time order.
Returns
([]model.KlineItem, error). Key fields from model.KlineItem:
| Field | Type | JSON field | Description |
|---|---|---|---|
Time | int64 | time | Bar timestamp. |
Volume | int64 | volume | Trading volume. |
Open | float64 | open | Bar opening price. |
Close | float64 | close | Bar closing price. |
High | float64 | high | Bar high price. |
Low | float64 | low | Bar low price. |
Amount | float64 | amount | Trading turnover. |
Invocation example
result, err := qc.GetKlineByPage(model.KlineByPageRequest{
Symbol: "AAPL",
Period: "day",
BeginTime: 1735689600000,
EndTime: 1738281600000,
TotalSize: 100,
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"time": 1785384000000,
"volume": 74817792,
"open": 333.10,
"close": 333.43,
"high": 334.75,
"low": 329.59,
"amount": 24701334239.0
},
{
"time": 1785470400000,
"volume": 132489137,
"open": 304.81,
"close": 308.91,
"high": 310.69,
"low": 300.0,
"amount": 40348574927.0
}
]GetTimeline
GetTimelinePurpose
Retrieves current stock timeline data. This method has no SecType parameter.
Signature
func (c *QuoteClient) GetTimeline(symbols []string) ([]model.Timeline, 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.Timeline, error). Key fields from model.Timeline:
| Field | Type | JSON field | Description |
|---|---|---|---|
Symbol | string | symbol | Instrument symbol. |
Period | string | period | Timeline period. |
PreClose | float64 | preClose | Previous closing price. |
Intraday | *TimelineBucket | intraday | Regular-session timeline data. |
PreHours | *TimelineBucket | preHours | Pre-market timeline data. |
AfterHours | *TimelineBucket | afterHours | After-hours timeline data. |
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.GetTimeline([]string{"AAPL"})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"symbol": "AAPL",
"period": "day",
"preClose": 333.43,
"intraday": {
"items": [
{"time": 1785504600000, "price": 304.05, "avgPrice": 304.77, "volume": 3808851},
{"time": 1785504660000, "price": 301.93, "avgPrice": 304.60, "volume": 1704737},
{"time": 1785504720000, "price": 302.03, "avgPrice": 304.24, "volume": 2029081}
]
},
"preHours": null,
"afterHours": null
}
]Rate limit
The base rate limit is 120 requests/min.
GetTimelineByReq for Stocks
GetTimelineByReq for StocksPurpose
Retrieves current stock timeline data from a request object.
Signature
func (c *QuoteClient) GetTimelineByReq(req model.TimelineRequest) ([]model.Timeline, error)Parameters
| SDK field | Type | Required | Serialization | Constraints |
|---|---|---|---|---|
Symbols | []string | No | Omitted when empty | Instrument symbols |
SecType | string | No | Omitted if empty | Allowed values: ALL, STK, OPT, WAR, IOPT, FUT, FOP, CASH, MLEG, FUND |
Returns
([]model.Timeline, error).
| Field | Type | JSON field | Description |
|---|---|---|---|
Symbol | string | symbol | Instrument symbol. |
Period | string | period | Timeline period. |
PreClose | float64 | preClose | Previous closing price. |
Intraday | *TimelineBucket | intraday | Regular-session timeline data. |
PreHours | *TimelineBucket | preHours | Pre-market timeline data. |
AfterHours | *TimelineBucket | afterHours | After-hours timeline data. |
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 | Average price |
Invocation example
result, err := qc.GetTimelineByReq(model.TimelineRequest{
Symbols: []string{"AAPL"},
SecType: "STK",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)Rate limit
The base rate limit is 120 requests/min.
GetTimelineHistory
GetTimelineHistoryPurpose
Retrieves historical stock timeline data.
Signature
func (c *QuoteClient) GetTimelineHistory(req model.TimelineHistoryRequest) ([]model.Timeline, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.TimelineHistoryRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Date | string | No | Omitted if empty | None; yyyy-MM-dd |
Right | string | No | Omitted if empty | Allowed values: PUT, CALL (option side); br, nr when used as quote adjustment |
TradeSession | string | No | Omitted if empty | Trading session: PreMarket, Regular, AfterHours, or OverNight |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Symbols | []string | No | Omitted when empty | Symbols |
Returns
([]model.Timeline, error). Key fields from model.Timeline:
| Field | Type | JSON field | Description |
|---|---|---|---|
Symbol | string | symbol | Instrument symbol. |
Period | string | period | Timeline period. |
PreClose | float64 | preClose | Previous closing price. |
Intraday | *TimelineBucket | intraday | Regular-session timeline data. |
PreHours | *TimelineBucket | preHours | Pre-market timeline data. |
AfterHours | *TimelineBucket | afterHours | After-hours timeline data. |
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.GetTimelineHistory(model.TimelineHistoryRequest{
Symbols: []string{"AAPL"},
Date: "2025-01-15",
Right: "CALL",
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"symbol": "AAPL",
"period": "day",
"preClose": 333.43,
"intraday": {
"items": [
{"time": 1785504600000, "price": 304.05, "avgPrice": 304.77, "volume": 3808851},
{"time": 1785504660000, "price": 301.93, "avgPrice": 304.60, "volume": 1704737},
{"time": 1785504720000, "price": 302.03, "avgPrice": 304.24, "volume": 2029081}
]
},
"preHours": null,
"afterHours": null
}
]Rate limit
The base rate limit is 60 requests/min.
GetTradeTick
GetTradeTickPurpose
Retrieves trade ticks and decodes them into the published Go return model.
Signature
func (c *QuoteClient) GetTradeTick(req model.TradeTickRequest) ([]model.TradeTick, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.TradeTickRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Limit | int | No | Omitted when zero | With both BeginIndex and EndIndex and a span no greater than 2,000, omission uses 2,000; otherwise 200; values at or above 2,000 are capped at 2,000 |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Symbols | []string | No | Omitted when empty | Symbols |
BeginIndex | int | No | Omitted when zero | Start index |
EndIndex | int | No | Omitted when zero | End index |
Returns
([]model.TradeTick, error). Key fields from model.TradeTick:
| Field | Type | JSON field | Description |
|---|---|---|---|
Symbol | string | symbol | Instrument symbol. |
BeginIndex | int64 | beginIndex | First trade-tick index. |
EndIndex | int64 | endIndex | Last trade-tick index. |
Items | []TradeTickItem | items | Trade ticks. |
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.GetTradeTick(model.TradeTickRequest{
Symbols: []string{"AAPL"},
Limit: 20,
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"symbol": "AAPL",
"beginIndex": 2062878,
"endIndex": 2062880,
"items": [
{"time": 1785528000829, "volume": 36, "price": 308.91, "type": "-"},
{"time": 1785528000899, "volume": 1, "price": 309.0, "type": "*"}
]
}
]Rate limit
The base rate limit is 120 requests/min.
GetQuoteDepth
GetQuoteDepthPurpose
Retrieves order book data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetQuoteDepth(req model.DepthQuoteRequest) ([]model.Depth, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.DepthQuoteRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Market | string | No | Omitted if empty | Allowed values: ALL, US, HK, CN, SG |
TradeSession | string | No | Omitted if empty | Trading session: PreMarket, Regular, AfterHours, or OverNight |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Symbols | []string | No | Omitted when empty | Symbols |
Returns
([]model.Depth, error). Key fields from model.Depth:
| Field | Type | JSON field | Description |
|---|---|---|---|
Symbol | string | symbol | Instrument symbol. |
Asks | []DepthLevel | asks | Ask-side order-book levels. |
Bids | []DepthLevel | bids | Bid-side order-book levels. |
DepthLevel field | Type | JSON field |
|---|---|---|
Price | float64 | price |
Count | int | count |
Volume | int64 | volume |
Invocation example
result, err := qc.GetQuoteDepth(model.DepthQuoteRequest{
Symbols: []string{"AAPL"},
Market: "US",
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"symbol": "AAPL",
"asks": [
{"price": 310.97, "volume": 400, "count": 0},
{"price": 310.98, "volume": 200, "count": 0},
{"price": 311.00, "volume": 1500, "count": 0}
],
"bids": [
{"price": 310.89, "volume": 80, "count": 0},
{"price": 310.88, "volume": 300, "count": 0},
{"price": 310.85, "volume": 600, "count": 0}
]
}
]Rate limit
The base rate limit is 60 requests/min.
GetCapitalFlow
GetCapitalFlowPurpose
Retrieves capital flow data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetCapitalFlow(symbol, market, period string) (*model.CapitalFlow, error)Availability depends on market, instrument, and enabled data access.
Parameters
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
symbol | string | Yes | None | Instrument or underlying symbol |
market | string | Yes | None | Market code; SDK enum values are ALL/US/HK/CN/SG |
period | string | Yes | None | Bar period; see the BarPeriod enum |
Returns
(*model.CapitalFlow, error). Key fields from model.CapitalFlow:
| Field | Type | JSON field | Description |
|---|---|---|---|
Symbol | string | symbol | Instrument symbol. |
Period | string | period | Capital-flow period. |
Items | []CapitalFlowItem | items | Capital-flow data points. |
CapitalFlowItem fields
| Field | Type | Description |
|---|---|---|
Time | string | Timestamp |
Timestamp | int64 | Timestamp value |
NetInflow | float64 | Net inflow value |
Invocation example
result, err := qc.GetCapitalFlow("AAPL", "US", "day")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result){
"symbol": "AAPL",
"period": "day",
"items": [
{"time": 1785470400000, "netInflow": -52341890.50, "inBig": 182345000.0, "inMid": 95432100.0, "inSmall": 23456000.0, "outBig": 195678900.0, "outMid": 98765400.0, "outSmall": 59131690.5}
]
}Rate limit
The base rate limit is 60 requests/min.
GetCapitalDistribution
GetCapitalDistributionPurpose
Retrieves capital distribution data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetCapitalDistribution(symbol, market string) (*model.CapitalDistribution, error)Availability depends on market, instrument, and enabled data access.
Parameters
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
symbol | string | Yes | None | Instrument or underlying symbol |
market | string | Yes | None | Market code; SDK enum values are ALL/US/HK/CN/SG |
Returns
(*model.CapitalDistribution, error). Key fields from model.CapitalDistribution:
| Field | Type | JSON field | Description |
|---|---|---|---|
Symbol | string | symbol | Instrument symbol. |
NetInflow | float64 | netInflow | Net capital inflow. |
InAll | float64 | inAll | Total capital inflow. |
InBig | float64 | inBig | Large-order capital inflow. |
InMid | float64 | inMid | Medium-order capital inflow. |
InSmall | float64 | inSmall | Small-order capital inflow. |
OutAll | float64 | outAll | Total capital outflow. |
OutBig | float64 | outBig | Large-order capital outflow. |
OutMid | float64 | outMid | Medium-order capital outflow. |
OutSmall | float64 | outSmall | Small-order capital outflow. |
Invocation example
result, err := qc.GetCapitalDistribution("AAPL", "US")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result){
"symbol": "AAPL",
"netInflow": -52341890.50,
"inAll": 301233100.0,
"inBig": 182345000.0,
"inMid": 95432100.0,
"inSmall": 23456000.0,
"outAll": 353574990.50,
"outBig": 195678900.0,
"outMid": 98765400.0,
"outSmall": 59130690.50
}Rate limit
The base rate limit is 60 requests/min.
GetTradeRank
GetTradeRankPurpose
Retrieves trade rank data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetTradeRank(req model.TradeRankRequest) ([]model.TradeRankItem, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.TradeRankRequest
| 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.TradeRankItem, error). Key fields from model.TradeRankItem:
| Field | Type | JSON field | Description |
|---|---|---|---|
Symbol | string | symbol | Instrument symbol. |
Name | string | name | Instrument name. |
LatestPr | float64 | latestPrice | Latest traded price. |
Change | float64 | change | Price change from the previous close. |
ChangeRate | float64 | changeRate | Price change rate. |
Volume | int64 | volume | Trading volume. |
Amount | float64 | amount | Trading turnover. |
Invocation example
result, err := qc.GetTradeRank(model.TradeRankRequest{
Market: "US",
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"symbol": "NVDA",
"name": "NVIDIA Corp",
"latestPrice": 132.15,
"change": 8.42,
"changeRate": 0.068,
"volume": 385241000,
"amount": 50871234567.0
},
{
"symbol": "TSLA",
"name": "Tesla Inc",
"latestPrice": 285.50,
"change": 12.30,
"changeRate": 0.045,
"volume": 112456000,
"amount": 32089765432.0
}
]Rate limit
The base rate limit is 10 requests/min.
GetShortInterest
GetShortInterestPurpose
Retrieves short interest data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetShortInterest(req model.ShortInterestRequest) ([]model.ShortInterest, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.ShortInterestRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Symbols | []string | No | Omitted when empty | Symbols |
Returns
([]model.ShortInterest, error). Key fields from model.ShortInterest:
| Field | Type | JSON field | Description |
|---|---|---|---|
Symbol | string | symbol | Instrument symbol. |
SettlementDate | string | settlementDate | Short-interest settlement date. |
ShortInterest | float64 | shortInterest | Shares sold short. |
AvgDailyVolume | float64 | avgDailyVolume | Average daily trading volume. |
DaysToCover | float64 | daysToCover | Days to cover short interest. |
PercentOfFloat | float64 | percentOfFloat | Short interest as a percentage of float. |
ShortInterestPrevious | float64 | shortInterestPrevious | Prior short-interest value. |
PercentChange | float64 | percentChange | Short-interest percentage change. |
Invocation example
result, err := qc.GetShortInterest(model.ShortInterestRequest{
Symbols: []string{"AAPL"},
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result)[
{
"symbol": "AAPL",
"settlementDate": "2025-07-15",
"shortInterest": 98234567.0,
"avgDailyVolume": 65432100.0,
"daysToCover": 1.5,
"percentOfFloat": 0.65,
"shortInterestPrevious": 96543210.0,
"percentChange": 1.75
}
]Rate limit
The base rate limit is 60 requests/min.
GetStockBroker
GetStockBrokerPurpose
Retrieves stock broker data and decodes it into the published Go return model.
Signature
func (c *QuoteClient) GetStockBroker(req model.StockBrokerRequest) (*model.StockBroker, error)Availability depends on market, instrument, and enabled data access.
Parameters
model.StockBrokerRequest
| SDK field | Type | Required | Serialization | SDK default and constraints |
|---|---|---|---|---|
Limit | int | No | Omitted when zero | Result count |
SecType | string | No | Omitted if empty | Allowed values: ALL, STK, OPT, WAR, IOPT, FUT, FOP, CASH, MLEG, FUND |
Lang | string | No | Omitted if empty | Allowed values: zh_CN, zh_TW, en_US |
Symbol | string | No | Omitted when empty | Symbol |
Returns
(*model.StockBroker, error). Key fields from model.StockBroker:
| Field | Type | JSON field | Description |
|---|---|---|---|
Symbol | string | symbol | Instrument symbol. |
LevelAskList | []StockBrokerItem | levelAskList | Ask-side broker levels. |
LevelBidList | []StockBrokerItem | levelBidList | Bid-side broker levels. |
StockBrokerItem field | Type | JSON field |
|---|---|---|
Level | int | level |
Price | float64 | price |
Brokers | []BrokerDetail | brokers |
BrokerDetail field | Type | JSON field |
|---|---|---|
ID | string | id |
Name | string | name |
Invocation example
result, err := qc.GetStockBroker(model.StockBrokerRequest{
Symbol: "AAPL",
Limit: 20,
SecType: "STK",
Lang: "en_US",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%#v\n", result){
"symbol": "00700",
"levelAskList": [
{
"level": 1,
"price": 420.80,
"brokers": [
{"id": "8461", "name": "FUTU Securities"},
{"id": "8577", "name": "HSBC"}
]
}
],
"levelBidList": [
{
"level": 1,
"price": 420.60,
"brokers": [
{"id": "6997", "name": "China Investment"},
{"id": "8134", "name": "BOC"},
{"id": "5342", "name": "J.P. Morgan"}
]
}
]
}Rate limit
The base rate limit is 60 requests/min.
Updated about 1 month ago
