基金

以下操作均通过 QuoteClient.ExecuteAsync 调用。

STOCK_DETAILQUOTE_OVERNIGHT 需额外行情权限,未开通时服务端返回权限错误码。

获取基金代码列表

操作名

QuoteApiService.FUND_ALL_SYMBOLS = fund_all_symbols. 使用服务端方法 fund_all_symbols。这是 *ApiService 常量,不是客户端成员方法。

请求

TigerRequest<SymbolNameResponse>

ModelValue: QuoteMarketModel.

参数

SDK propertyC# typeAPI fieldSDK defaultRequiredConstraints
LangLanguagelangNone (omitted if not set)no
Accountstring (nullable)accountnullNot applicableTradeClient uses DefaultAccount when empty
MarketMarketmarketNone (omitted if not set)OptionalEnum value
PackageNamePackageNamepackage_nameNone (omitted if not set)Optional
IncludeOTCBooleaninclude_otcNone (omitted if not set)Optional

返回

SymbolNameResponse inherits TigerResponse; its data property is 列表,元素为 SymbolNameItem. Key SDK fields: Symbol: string, Name: string.

示例

TigerRequest<SymbolNameResponse> request = new()
{
    ApiMethodName = QuoteApiService.FUND_ALL_SYMBOLS,
    ModelValue = new QuoteMarketModel { Account = tradeClient.GetDefaultAccount, Market = Market.US }
};
SymbolNameResponse? response = await quoteClient.ExecuteAsync(request);

响应类型

List<SymbolNameItem>? data = response?.Data; // response 或 data 缺失时为 null

获取基金合约

操作名

QuoteApiService.FUND_CONTRACTS = fund_contracts. 使用服务端方法 fund_contracts。这是 *ApiService 常量,不是客户端成员方法。

请求

TigerRequest<FundContractsResponse>

ModelValue: FundSymbolModel.

参数

SDK propertyC# typeAPI fieldSDK defaultRequiredConstraints
LangLanguagelangNone (omitted if not set)no
Accountstring (nullable)accountnullNot applicableTradeClient uses DefaultAccount when empty
Symbols列表,元素为 stringsymbolsnullRequiredNon-empty list

返回

FundContractsResponse inherits TigerResponse; its data property is 列表,元素为 FundContractItem. Key SDK fields: Symbol: string, Name: string, CompanyName: string, Market: string, SecType: string, Currency: string, Tradeable: bool, SubType: string.

示例

TigerRequest<FundContractsResponse> request = new()
{
    ApiMethodName = QuoteApiService.FUND_CONTRACTS,
    ModelValue = new FundSymbolModel { Account = tradeClient.GetDefaultAccount, Symbols = new List<string> { "AAPL" } }
};
FundContractsResponse? response = await quoteClient.ExecuteAsync(request);

响应类型

List<FundContractItem>? data = response?.Data; // response 或 data 缺失时为 null

返回示例

{
  "code": 0,
  "message": "success",
  "timestamp": 1785528000000,
  "data": [
    {"symbol": "SPY", "name": "SPDR S&P 500 ETF", "secType": "FUND", "market": "US", "currency": "USD"},
    {"symbol": "QQQ", "name": "Invesco QQQ Trust", "secType": "FUND", "market": "US", "currency": "USD"}
  ]
}

获取基金行情

操作名

QuoteApiService.FUND_QUOTE = fund_quote. 使用服务端方法 fund_quote。这是 *ApiService 常量,不是客户端成员方法。

请求

TigerRequest<FundQuoteResponse>

ModelValue: FundSymbolModel.

参数

SDK propertyC# typeAPI fieldSDK defaultRequiredConstraints
LangLanguagelangNone (omitted if not set)no
Accountstring (nullable)accountnullNot applicableTradeClient uses DefaultAccount when empty
Symbols列表,元素为 stringsymbolsnullRequiredNon-empty list

返回

FundQuoteResponse inherits TigerResponse; its data property is 列表,元素为 FundQuoteItem. Key SDK fields: Timestamp: long.

示例

TigerRequest<FundQuoteResponse> request = new()
{
    ApiMethodName = QuoteApiService.FUND_QUOTE,
    ModelValue = new FundSymbolModel { Account = tradeClient.GetDefaultAccount, Symbols = new List<string> { "AAPL" } }
};
FundQuoteResponse? response = await quoteClient.ExecuteAsync(request);

响应类型

List<FundQuoteItem>? data = response?.Data; // response 或 data 缺失时为 null

返回示例

{
  "code": 0,
  "message": "success",
  "timestamp": 1785528000000,
  "data": [
    {
      "symbol": "SPY",
      "open": 545.20,
      "high": 548.90,
      "low": 543.10,
      "close": 547.85,
      "preClose": 544.30,
      "latestPrice": 547.85,
      "volume": 52345000
    }
  ]
}

获取基金历史行情

操作名

QuoteApiService.FUND_HISTORY_QUOTE = fund_history_quote. 使用服务端方法 fund_history_quote。这是 *ApiService 常量,不是客户端成员方法。

请求

TigerRequest<FundHistoryQuoteResponse>

ModelValue: FundQuoteHistoryModel.

参数

SDK propertyC# typeAPI fieldSDK defaultRequiredConstraints
LangLanguagelangNone (omitted if not set)no
Accountstring (nullable)accountnullNot applicableTradeClient uses DefaultAccount when empty
Symbols列表,元素为 stringsymbolsnullRequiredNon-empty list
BeginTimeInt64begin_timeNone (omitted if not set)OptionalTimestamp or date format; maintain chronological order
EndTimeInt64end_timeNone (omitted if not set)OptionalTimestamp or date format; maintain chronological order
LimitInt32limitNone (omitted if not set)OptionalPositive integer

返回

FundHistoryQuoteResponse inherits TigerResponse; its data property is 列表,元素为 FundHistoryQuoteItem. Key SDK fields: Items: list of FundQuotePoint.

示例

TigerRequest<FundHistoryQuoteResponse> request = new()
{
    ApiMethodName = QuoteApiService.FUND_HISTORY_QUOTE,
    ModelValue = new FundQuoteHistoryModel { Account = tradeClient.GetDefaultAccount, Symbols = new List<string> { "AAPL" }, BeginTime = 1780272000000L, EndTime = 1782864000000L, Limit = 20 }
};
FundHistoryQuoteResponse? response = await quoteClient.ExecuteAsync(request);

响应类型

List<FundHistoryQuoteItem>? data = response?.Data; // response 或 data 缺失时为 null

Did this page help you?