基金与窝轮牛熊证
示例上下文
import { createClientConfig, QuoteClient } from '@tigeropenapi/tigeropen';
const config = createClientConfig();
const quoteClient = QuoteClient.fromConfig(config);获取基金代码列表
签名
async getFundSymbols(req: FundSymbolsRequest): Promise<string[]>用途
查询 fund symbols。
参数、默认值与约束
| 参数 | 类型 | 必填 | SDK 默认值 | 约束 |
|---|---|---|---|---|
req | FundSymbolsRequest | 是 | None | — |
req.lang | string | undefined | 否 | 无 | — |
返回
Promise<string[]>
示例
const result = await quoteClient.getFundSymbols({ lang: 'en_US' });
console.log(result);返回示例
[
"string"
]获取基金合约
签名
async getFundContracts(req: FundContractsRequest): Promise<FundContractInfo[]>用途
查询 fund contracts。
参数、默认值与约束
| 参数 | 类型 | 必填 | SDK 默认值 | 约束 |
|---|---|---|---|---|
req | FundContractsRequest | 是 | None | — |
req.symbols | string[] | undefined | 否 | 无 | — |
req.lang | string | undefined | 否 | 无 | — |
返回
Promise<FundContractInfo[]>
| 字段 | 类型 | 说明 |
|---|---|---|
| symbol | string | 股票代码 |
| name | string | 名称 |
| currency | string | 币种 |
| fundType | string | 基金类型 |
| inception | string | 成立日期 |
| netAssetValue | number | 净资产价值 |
| expenseRatio | number | 费率 |
示例
const result = await quoteClient.getFundContracts({ symbols: ['00003.HK'] });
console.log(result);返回示例
[
{
"symbol": "string",
"name": "string",
"currency": "string",
"fundType": "string",
"inception": "string",
"netAssetValue": 0,
"expenseRatio": 0
}
]获取基金行情
签名
async getFundQuote(req: FundQuoteRequest): Promise<FundQuote[]>用途
查询 fund quote。
参数、默认值与约束
| 参数 | 类型 | 必填 | SDK 默认值 | 约束 |
|---|---|---|---|---|
req | FundQuoteRequest | 是 | None | — |
req.symbols | string[] | undefined | 否 | 无 | — |
req.lang | string | undefined | 否 | 无 | — |
返回
Promise<FundQuote[]>
| 字段 | 类型 | 说明 |
|---|---|---|
| symbol | string | 股票代码 |
| latestNav | number | 最新净值 |
| change | number | 涨跌额 |
| changeRate | number | 涨跌幅 |
| date | string | 日期 |
示例
const result = await quoteClient.getFundQuote({ symbols: ['00003.HK'] });
console.log(result);返回示例
[
{
"symbol": "string",
"latestNav": 0,
"change": 0,
"changeRate": 0,
"date": "string"
}
]获取基金历史行情
签名
async getFundHistoryQuote(req: FundHistoryQuoteRequest): Promise<FundHistoryQuote[]>用途
查询 fund history quote。
参数、默认值与约束
| 参数 | 类型 | 必填 | SDK 默认值 | 约束 |
|---|---|---|---|---|
req | FundHistoryQuoteRequest | 是 | None | — |
req.symbols | string[] | undefined | 否 | 无 | — |
req.beginTime | number | undefined | 否 | 无 | — |
req.endTime | number | undefined | 否 | 无 | — |
req.limit | number | undefined | 否 | 无 | — |
req.lang | string | undefined | 否 | 无 | — |
返回
Promise<FundHistoryQuote[]>
| 字段 | 类型 | 说明 |
|---|---|---|
| symbol | string | 股票代码 |
| date | string | 日期 |
| nav | number | 净值 |
示例
const result = await quoteClient.getFundHistoryQuote({ symbols: ['00003.HK'], beginTime: Date.UTC(2026, 0, 1), endTime: Date.UTC(2026, 0, 31), limit: 100 });
console.log(result);返回示例
[
{
"symbol": "string",
"date": "string",
"nav": 0
}
]获取窝轮行情
签名
async getWarrantQuote(req: WarrantBriefsRequest): Promise<WarrantBrief[]>用途
查询 warrant quote。
参数、默认值与约束
| 参数 | 类型 | 必填 | SDK 默认值 | 约束 |
|---|---|---|---|---|
req | WarrantBriefsRequest | 是 | None | — |
req.symbols | string[] | undefined | 否 | 无 | — |
req.lang | string | undefined | 否 | 无 | — |
返回
Promise<WarrantBrief[]>
| 字段 | 类型 | 说明 |
|---|---|---|
| symbol | string | 股票代码 |
| name | string | 名称 |
| latestPrice | number | 最新价 |
| change | number | 涨跌额 |
| changeRate | number | 涨跌幅 |
| volume | number | 成交量 |
| amount | number | 成交额 |
| underlying | string | 标的代码 |
| issuer | string | 发行商 |
| expiryDate | string | 到期日 |
| strikePrice | number | 行权价 |
| warrantType | string | 权证类型 |
示例
const result = await quoteClient.getWarrantQuote({ symbols: ['12345'] });
console.log(result);返回示例
[
{
"symbol": "string",
"name": "string",
"latestPrice": 0,
"change": 0,
"changeRate": 0,
"volume": 0,
"amount": 0,
"underlying": "string",
"issuer": "string",
"expiryDate": "string",
"strikePrice": 0,
"warrantType": "string"
}
]窝轮筛选
签名
async getWarrantFilter(req: WarrantFilterRequest): Promise<WarrantFilterResult | undefined>用途
查询 warrant filter。
参数、默认值与约束
| 参数 | 类型 | 必填 | SDK 默认值 | 约束 |
|---|---|---|---|---|
req | WarrantFilterRequest | 是 | None | — |
req.symbol | string | undefined | 否 | 无 | — |
req.page | number | undefined | 否 | 无 | — |
req.pageSize | number | undefined | 否 | 无 | — |
req.sortFieldName | string | undefined | 否 | 无 | — |
req.sortDir | string | undefined | 否 | 无 | — |
req.issuerName | string | undefined | 否 | 无 | — |
req.expireYm | string | undefined | 否 | 无 | — |
req.lang | string | undefined | 否 | 无 | — |
返回
Promise<WarrantFilterResult | undefined>
| 字段 | 类型 | 说明 |
|---|---|---|
| total | number | 总数 |
| items | WarrantBrief[] | 数据数组 |
| pageSize | number | 每页大小 |
| page | number | 页码 |
示例
const result = await quoteClient.getWarrantFilter({ symbol: '00700', page: 0, pageSize: 20 });
console.log(result);返回示例
{
"total": 0,
"items": [
{
"symbol": "string",
"name": "string",
"latestPrice": 0,
"change": 0,
"changeRate": 0,
"volume": 0,
"amount": 0,
"underlying": "string",
"issuer": "string",
"expiryDate": "string",
"strikePrice": 0,
"warrantType": "string"
}
],
"pageSize": 0,
"page": 0
}Updated 8 days ago
Did this page help you?
