Securities

GetSymbols

Purpose

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 fieldTypeRequiredSerializationSDK default and constraints
MarketstringNoOmitted if emptyAllowed values: ALL, US, HK, CN, SG
SecTypestringNoOmitted if emptyAllowed values: ALL, STK, OPT, WAR, IOPT, FUT, FOP, CASH, MLEG, FUND
IncludeOtcboolNoOmitted when falseWhether to include OTC instruments
LangstringNoOmitted if emptyAllowed 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

Purpose

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 fieldTypeRequiredSerializationSDK default and constraints
MarketstringNoOmitted if emptyAllowed values: ALL, US, HK, CN, SG
SecTypestringNoOmitted if emptyAllowed values: ALL, STK, OPT, WAR, IOPT, FUT, FOP, CASH, MLEG, FUND
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
IncludeOtcboolNoOmitted when falseInclude otc value

Returns

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

FieldTypeJSON fieldDescription
SymbolstringsymbolInstrument symbol.
NamestringnameInstrument name.
MarketstringmarketMarket 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

Purpose

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 fieldTypeRequiredSerializationSDK default and constraints
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
Symbols[]stringNoOmitted when emptySymbols

Returns

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

FieldTypeJSON fieldDescription
SymbolstringsymbolInstrument symbol.
LotSizeintlotSizeMinimum trading lot size.
MinTickfloat64minTickMinimum price increment.
SpreadScalefloat64spreadScalePrice spread scale.
ShortableFlagstringshortableFlagShort-selling eligibility flag.
MarginableFlagstringmarginableFlagMargin-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

Purpose

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 fieldTypeRequiredSerializationSDK default and constraints
Symbols[]stringNoOmitted if empty—
IncludeHourTrading*boolNoOmitted when nilWhether to include extended-hours quotes; a pointer distinguishes explicit false from omission
SecTypestringNoOmitted if emptyAllowed values: ALL, STK, OPT, WAR, IOPT, FUT, FOP, CASH, MLEG, FUND
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US

Returns

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

FieldTypeJSON fieldDescription
SymbolstringsymbolInstrument symbol.
Openfloat64openSession opening price.
Highfloat64highSession high price.
Lowfloat64lowSession low price.
Closefloat64closeSession closing price.
PreClosefloat64preClosePrevious closing price.
LatestPricefloat64latestPriceLatest traded price.
LatestTimeint64latestTimeLatest quote timestamp.
AskPricefloat64askPriceBest ask price.
AskSizeint64askSizeBest ask size.
BidPricefloat64bidPriceBest bid price.
BidSizeint64bidSizeBest bid size.
Volumeint64volumeTrading volume.
StatusstringstatusQuote status.
AdjPreClosefloat64adjPreCloseAdjusted previous closing price.
Changefloat64changePrice change from the previous close.
ChangeRatefloat64changeRatePrice change rate.
Amplitudefloat64amplitudeSession price range rate.
Expiryint64expiryOption expiry timestamp.
StrikestringstrikeOption strike price.
RightstringrightOption call or put right.
MultiplierintmultiplierContract multiplier.
OpenInterestint64openInterestOpen 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

Purpose

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 fieldTypeRequiredSerializationSDK default and constraints
SecTypestringNoOmitted if emptyAllowed values: ALL, STK, OPT, WAR, IOPT, FUT, FOP, CASH, MLEG, FUND
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
Symbols[]stringNoOmitted when emptySymbols

Returns

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

FieldTypeJSON fieldDescription
SymbolstringsymbolInstrument symbol.
Openfloat64openSession opening price.
Highfloat64highSession high price.
Lowfloat64lowSession low price.
Closefloat64closeSession closing price.
PreClosefloat64preClosePrevious closing price.
LatestPricefloat64latestPriceLatest traded price.
LatestTimeint64latestTimeLatest quote timestamp.
AskPricefloat64askPriceBest ask price.
AskSizeint64askSizeBest ask size.
BidPricefloat64bidPriceBest bid price.
BidSizeint64bidSizeBest bid size.
Volumeint64volumeTrading volume.
StatusstringstatusQuote status.
AdjPreClosefloat64adjPreCloseAdjusted previous closing price.
Changefloat64changePrice change from the previous close.
ChangeRatefloat64changeRatePrice change rate.
Amplitudefloat64amplitudeSession price range rate.
Expiryint64expiryOption expiry timestamp.
StrikestringstrikeOption strike price.
RightstringrightOption call or put right.
MultiplierintmultiplierContract multiplier.
OpenInterestint64openInterestOpen 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

Purpose

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 fieldTypeRequiredSerializationSDK default and constraints
PeriodstringNoOmitted if emptyAllowed values: day, week, month, year, 1min, 5min, 15min, 30min, 60min
RightstringNoOmitted if emptyAllowed values: PUT, CALL (option side); br, nr when used as quote adjustment
BeginTimeint64NoOmitted if emptyNone; mutually exclusive with BeginIndex/EndIndex; millisecond timestamp
EndTimeint64NoOmitted if emptyNone; mutually exclusive with BeginIndex/EndIndex; millisecond timestamp
LimitintNoOmitted when zeroResult count
BeginIndexintNoOmitted when zeroStart index; mutually exclusive with the time range
EndIndexintNoOmitted when zeroEnd index; mutually exclusive with the time range
PageTokenstringNoOmitted if emptyPagination cursor
TradeSessionstringNoOmitted if emptyTrading session: PreMarket, Regular, AfterHours, or OverNight
DatestringNoOmitted if emptyQuery date
WithFundamental*boolNoOmitted when nilWhether to include fundamental data; a pointer distinguishes explicit false from omission
SecTypestringNoOmitted if emptyAllowed values: ALL, STK, OPT, WAR, IOPT, FUT, FOP, CASH, MLEG, FUND
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
Symbols[]stringNoOmitted when emptySymbols

Time and index ranges cannot be combined.

Returns

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

FieldTypeJSON fieldDescription
SymbolstringsymbolInstrument symbol.
PeriodstringperiodCandlestick period.
NextPageTokenstringnextPageTokenCursor for the next page.
Items[]KlineItemitemsCandlestick bars.

KlineItem fields

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

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

Purpose

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 fieldTypeRequiredSerializationSDK default and constraints
SymbolstringNoOmitted if emptyInstrument symbol
SecTypestringNoOmitted if emptyAllowed values: ALL, STK, OPT, WAR, IOPT, FUT, FOP, CASH, MLEG, FUND
PeriodstringNoOmitted if emptyAllowed values: day, week, month, year, 1min, 5min, 15min, 30min, 60min
BeginTimeint64NoOmitted when zeroStart time in milliseconds
EndTimeint64NoOmitted when zeroEnd time in milliseconds
TotalSizeintNo1000 when <= 0Total desired result count
PageSizeintNo200 when <= 0Result count per page
RightstringNoOmitted if emptyAllowed values: PUT, CALL (option side); br, nr when used as quote adjustment
TradeSessionstringNoOmitted if emptyTrading session: PreMarket, Regular, AfterHours, or OverNight
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US

The SDK merges pages in ascending time order.

Returns

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

FieldTypeJSON fieldDescription
Timeint64timeBar timestamp.
Volumeint64volumeTrading volume.
Openfloat64openBar opening price.
Closefloat64closeBar closing price.
Highfloat64highBar high price.
Lowfloat64lowBar low price.
Amountfloat64amountTrading 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

Purpose

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

ParameterTypeRequiredSDK defaultConstraints
symbols[]stringYesNoneInstrument symbols; the SDK does not enforce a batch limit

Returns

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

FieldTypeJSON fieldDescription
SymbolstringsymbolInstrument symbol.
PeriodstringperiodTimeline period.
PreClosefloat64preClosePrevious closing price.
Intraday*TimelineBucketintradayRegular-session timeline data.
PreHours*TimelineBucketpreHoursPre-market timeline data.
AfterHours*TimelineBucketafterHoursAfter-hours timeline data.

TimelineBucket fields

FieldTypeDescription
Items[]TimelineItemResult items

TimelineItem fields

FieldTypeDescription
Timeint64Timestamp
Volumeint64Volume
Pricefloat64Price
AvgPricefloat64Avg 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

Purpose

Retrieves current stock timeline data from a request object.

Signature

func (c *QuoteClient) GetTimelineByReq(req model.TimelineRequest) ([]model.Timeline, error)

Parameters

SDK fieldTypeRequiredSerializationConstraints
Symbols[]stringNoOmitted when emptyInstrument symbols
SecTypestringNoOmitted if emptyAllowed values: ALL, STK, OPT, WAR, IOPT, FUT, FOP, CASH, MLEG, FUND

Returns

([]model.Timeline, error).

FieldTypeJSON fieldDescription
SymbolstringsymbolInstrument symbol.
PeriodstringperiodTimeline period.
PreClosefloat64preClosePrevious closing price.
Intraday*TimelineBucketintradayRegular-session timeline data.
PreHours*TimelineBucketpreHoursPre-market timeline data.
AfterHours*TimelineBucketafterHoursAfter-hours timeline data.

TimelineBucket fields

FieldTypeDescription
Items[]TimelineItemResult items

TimelineItem fields

FieldTypeDescription
Timeint64Timestamp
Volumeint64Volume
Pricefloat64Price
AvgPricefloat64Average 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

Purpose

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 fieldTypeRequiredSerializationSDK default and constraints
DatestringNoOmitted if emptyNone; yyyy-MM-dd
RightstringNoOmitted if emptyAllowed values: PUT, CALL (option side); br, nr when used as quote adjustment
TradeSessionstringNoOmitted if emptyTrading session: PreMarket, Regular, AfterHours, or OverNight
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
Symbols[]stringNoOmitted when emptySymbols

Returns

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

FieldTypeJSON fieldDescription
SymbolstringsymbolInstrument symbol.
PeriodstringperiodTimeline period.
PreClosefloat64preClosePrevious closing price.
Intraday*TimelineBucketintradayRegular-session timeline data.
PreHours*TimelineBucketpreHoursPre-market timeline data.
AfterHours*TimelineBucketafterHoursAfter-hours timeline data.

TimelineBucket fields

FieldTypeDescription
Items[]TimelineItemResult items

TimelineItem fields

FieldTypeDescription
Timeint64Timestamp
Volumeint64Volume
Pricefloat64Price
AvgPricefloat64Avg 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

Purpose

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 fieldTypeRequiredSerializationSDK default and constraints
LimitintNoOmitted when zeroWith 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
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
Symbols[]stringNoOmitted when emptySymbols
BeginIndexintNoOmitted when zeroStart index
EndIndexintNoOmitted when zeroEnd index

Returns

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

FieldTypeJSON fieldDescription
SymbolstringsymbolInstrument symbol.
BeginIndexint64beginIndexFirst trade-tick index.
EndIndexint64endIndexLast trade-tick index.
Items[]TradeTickItemitemsTrade ticks.

TradeTickItem fields

FieldTypeDescription
Timeint64Timestamp
Volumeint64Volume
Pricefloat64Price
TypestringOperation 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

Purpose

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 fieldTypeRequiredSerializationSDK default and constraints
MarketstringNoOmitted if emptyAllowed values: ALL, US, HK, CN, SG
TradeSessionstringNoOmitted if emptyTrading session: PreMarket, Regular, AfterHours, or OverNight
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
Symbols[]stringNoOmitted when emptySymbols

Returns

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

FieldTypeJSON fieldDescription
SymbolstringsymbolInstrument symbol.
Asks[]DepthLevelasksAsk-side order-book levels.
Bids[]DepthLevelbidsBid-side order-book levels.
DepthLevel fieldTypeJSON field
Pricefloat64price
Countintcount
Volumeint64volume

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

Purpose

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

ParameterTypeRequiredSDK defaultConstraints
symbolstringYesNoneInstrument or underlying symbol
marketstringYesNoneMarket code; SDK enum values are ALL/US/HK/CN/SG
periodstringYesNoneBar period; see the BarPeriod enum

Returns

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

FieldTypeJSON fieldDescription
SymbolstringsymbolInstrument symbol.
PeriodstringperiodCapital-flow period.
Items[]CapitalFlowItemitemsCapital-flow data points.

CapitalFlowItem fields

FieldTypeDescription
TimestringTimestamp
Timestampint64Timestamp value
NetInflowfloat64Net 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

Purpose

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

ParameterTypeRequiredSDK defaultConstraints
symbolstringYesNoneInstrument or underlying symbol
marketstringYesNoneMarket code; SDK enum values are ALL/US/HK/CN/SG

Returns

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

FieldTypeJSON fieldDescription
SymbolstringsymbolInstrument symbol.
NetInflowfloat64netInflowNet capital inflow.
InAllfloat64inAllTotal capital inflow.
InBigfloat64inBigLarge-order capital inflow.
InMidfloat64inMidMedium-order capital inflow.
InSmallfloat64inSmallSmall-order capital inflow.
OutAllfloat64outAllTotal capital outflow.
OutBigfloat64outBigLarge-order capital outflow.
OutMidfloat64outMidMedium-order capital outflow.
OutSmallfloat64outSmallSmall-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

Purpose

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 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.TradeRankItem, error). Key fields from model.TradeRankItem:

FieldTypeJSON fieldDescription
SymbolstringsymbolInstrument symbol.
NamestringnameInstrument name.
LatestPrfloat64latestPriceLatest traded price.
Changefloat64changePrice change from the previous close.
ChangeRatefloat64changeRatePrice change rate.
Volumeint64volumeTrading volume.
Amountfloat64amountTrading 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

Purpose

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 fieldTypeRequiredSerializationSDK default and constraints
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
Symbols[]stringNoOmitted when emptySymbols

Returns

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

FieldTypeJSON fieldDescription
SymbolstringsymbolInstrument symbol.
SettlementDatestringsettlementDateShort-interest settlement date.
ShortInterestfloat64shortInterestShares sold short.
AvgDailyVolumefloat64avgDailyVolumeAverage daily trading volume.
DaysToCoverfloat64daysToCoverDays to cover short interest.
PercentOfFloatfloat64percentOfFloatShort interest as a percentage of float.
ShortInterestPreviousfloat64shortInterestPreviousPrior short-interest value.
PercentChangefloat64percentChangeShort-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

Purpose

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 fieldTypeRequiredSerializationSDK default and constraints
LimitintNoOmitted when zeroResult count
SecTypestringNoOmitted if emptyAllowed values: ALL, STK, OPT, WAR, IOPT, FUT, FOP, CASH, MLEG, FUND
LangstringNoOmitted if emptyAllowed values: zh_CN, zh_TW, en_US
SymbolstringNoOmitted when emptySymbol

Returns

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

FieldTypeJSON fieldDescription
SymbolstringsymbolInstrument symbol.
LevelAskList[]StockBrokerItemlevelAskListAsk-side broker levels.
LevelBidList[]StockBrokerItemlevelBidListBid-side broker levels.
StockBrokerItem fieldTypeJSON field
Levelintlevel
Pricefloat64price
Brokers[]BrokerDetailbrokers
BrokerDetail fieldTypeJSON field
IDstringid
Namestringname

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.



Did this page help you?