准备与配置
安装
npm install @tigeropenapi/tigeropen配置
createClientConfig(options?: ClientConfigOptions): ClientConfig 要求最终解析出 tigerId 和 privateKey。优先级为环境变量 > 代码参数 > properties 文件 > 默认值。默认搜索 ./tiger_openapi_config.properties 和 ~/.tigeropen/tiger_openapi_config.properties。
| 字段 | 类型 | 默认值/约束 |
|---|---|---|
tigerId, privateKey | string | 必填;环境变量为 TIGEROPEN_TIGER_ID、TIGEROPEN_PRIVATE_KEY |
account, secretKey | string | 交易账户;secretKey 仅机构账户需要 |
language | string | zh_CN |
timeout | number | 15 秒 |
token | string | TBHK 等需要 Token 的牌照使用 |
serverUrl, quoteServerUrl | string | 可显式固定;否则默认动态解析 |
enableDynamicDomain | boolean | true |
tiger_id=your_tiger_id
private_key=your_rsa_private_key
account=your_account
secret_key=your_institution_secret
license=TBUSUpdated 21 days ago
Did this page help you?
