基金
以下操作均通过 QuoteClient.ExecuteAsync 调用。
STOCK_DETAIL 与 QUOTE_OVERNIGHT 需额外行情权限,未开通时服务端返回权限错误码。
获取基金代码列表
操作名
QuoteApiService.FUND_ALL_SYMBOLS = fund_all_symbols。该常量用于设置 TigerRequest.ApiMethodName。
服务端已注册此操作。
请求
TigerRequest<SymbolNameResponse>ModelValue: QuoteMarketModel.
参数
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | CLR 默认值;序列化时省略 | no | — |
Account | string (nullable) | account | null | Not applicable | Account 是继承字段;QuoteClient 不会从 TigerConfig.DefaultAccount 注入,null 时序列化省略 |
Market | Market | market | CLR 默认值;序列化时省略 | Optional | Enum value |
PackageName | PackageName | package_name | CLR 默认值;序列化时省略 | Optional | — |
IncludeOTC | Boolean | include_otc | CLR 默认值;序列化时省略 | Optional | — |
返回
SymbolNameResponse 继承 TigerResponse;其 Data 为 List<SymbolNameItem>。
响应数据类型:List<SymbolNameItem>。
| 字段 | C# 类型 | 说明 |
|---|---|---|
Symbol | string | 基金代码 |
Name | string | 基金名称 |
示例
TigerRequest<SymbolNameResponse> request = new()
{
ApiMethodName = QuoteApiService.FUND_ALL_SYMBOLS,
ModelValue = new QuoteMarketModel { Market = Market.US }
};
SymbolNameResponse? response = await quoteClient.ExecuteAsync(request);响应类型
List<SymbolNameItem>? data = response?.Data; // response 或 data 缺失时为 null获取基金合约
操作名
QuoteApiService.FUND_CONTRACTS = fund_contracts。该常量用于设置 TigerRequest.ApiMethodName。
服务端已注册此操作。
请求
TigerRequest<FundContractsResponse>ModelValue: FundSymbolModel.
参数
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | CLR 默认值;序列化时省略 | no | — |
Account | string (nullable) | account | null | Not applicable | Account 是继承字段;QuoteClient 不会从 TigerConfig.DefaultAccount 注入,null 时序列化省略 |
Symbols | 列表,元素为 string | symbols | null | Required | Non-empty list |
返回
FundContractsResponse 继承 TigerResponse;其 Data 为 List<FundContractItem>。
响应数据类型:List<FundContractItem>。
| 字段 | C# 类型 | 说明 |
|---|---|---|
Symbol | string | 基金代码 |
Name | string | 名称 |
CompanyName | string | 公司名称 |
Market | string | 市场 |
SecType | string | 证券类型 |
Currency | string | 币种 |
SubType | string | 子类型 |
DividendType | string | 分红类型 |
Tradeable | bool | 是否可交易 |
TigerVault | bool | 是否为 Tiger Vault 基金 |
示例
TigerRequest<FundContractsResponse> request = new()
{
ApiMethodName = QuoteApiService.FUND_CONTRACTS,
ModelValue = new FundSymbolModel { 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。该常量用于设置 TigerRequest.ApiMethodName。
服务端已注册此操作。
请求
TigerRequest<FundQuoteResponse>ModelValue: FundSymbolModel.
参数
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | CLR 默认值;序列化时省略 | no | — |
Account | string (nullable) | account | null | Not applicable | Account 是继承字段;QuoteClient 不会从 TigerConfig.DefaultAccount 注入,null 时序列化省略 |
Symbols | 列表,元素为 string | symbols | null | Required | Non-empty list |
返回
FundQuoteResponse 继承 TigerResponse;其 Data 为 List<FundQuoteItem>。
响应数据类型:List<FundQuoteItem>。
| 字段 | C# 类型 | 说明 |
|---|---|---|
Symbol | string | 基金代码 |
Close | float | 收盘净值 |
Timestamp | long | 行情时间戳 |
示例
TigerRequest<FundQuoteResponse> request = new()
{
ApiMethodName = QuoteApiService.FUND_QUOTE,
ModelValue = new FundSymbolModel { 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。该常量用于设置 TigerRequest.ApiMethodName。
服务端已注册此操作。
请求
TigerRequest<FundHistoryQuoteResponse>ModelValue: FundQuoteHistoryModel.
参数
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | CLR 默认值;序列化时省略 | no | — |
Account | string (nullable) | account | null | Not applicable | Account 是继承字段;QuoteClient 不会从 TigerConfig.DefaultAccount 注入,null 时序列化省略 |
Symbols | 列表,元素为 string | symbols | null | Required | Non-empty list |
BeginTime | Int64 | begin_time | CLR 默认值;序列化时省略 | Optional | Timestamp or date format; maintain chronological order |
EndTime | Int64 | end_time | CLR 默认值;序列化时省略 | Optional | Timestamp or date format; maintain chronological order |
Limit | Int32 | limit | CLR 默认值;序列化时省略 | Optional | Positive integer |
返回
FundHistoryQuoteResponse 继承 TigerResponse;其 Data 为 List<FundHistoryQuoteItem>。
响应数据结构:List<FundHistoryQuoteItem>。
| 字段 | C# 类型 | 说明 |
|---|---|---|
Items | List<FundQuotePoint> | 历史净值点列表 |
Items 项:FundQuotePoint
| 字段 | C# 类型 | 说明 |
|---|---|---|
Nav | double | 单位净值 |
Time | long | 净值日期时间戳 |
示例
TigerRequest<FundHistoryQuoteResponse> request = new()
{
ApiMethodName = QuoteApiService.FUND_HISTORY_QUOTE,
ModelValue = new FundQuoteHistoryModel { Symbols = new List<string> { "AAPL" }, BeginTime = 1780272000000L, EndTime = 1782864000000L, Limit = 20 }
};
FundHistoryQuoteResponse? response = await quoteClient.ExecuteAsync(request);响应类型
List<FundHistoryQuoteItem>? data = response?.Data; // response 或 data 缺失时为 nullUpdated about 1 month ago
