Setup and Configuration
Install
npm install @tigeropenapi/tigeropenConfigure
createClientConfig(options?: ClientConfigOptions): ClientConfig must ultimately resolve tigerId and privateKey. Precedence is environment variables, code options, properties file, then defaults. The SDK searches ./tiger_openapi_config.properties and ~/.tigeropen/tiger_openapi_config.properties by default.
| Field | Type | Default or constraint |
|---|---|---|
tigerId, privateKey | string | Required; environment variables are TIGEROPEN_TIGER_ID and TIGEROPEN_PRIVATE_KEY |
account, secretKey | string | Trading account; secretKey is for institutional accounts |
language | string | zh_CN |
timeout | number | 15 seconds |
token | string | Used by licenses such as TBHK that require a token |
serverUrl, quoteServerUrl | string | Pin explicitly or allow dynamic resolution |
enableDynamicDomain | boolean | true |
tiger_id=your_tiger_id
private_key=your_rsa_private_key
account=your_account
secret_key=your_institution_secret
license=TBUSNever commit private keys, tokens, or secretKey. See Quick Start and Account Types for activation and account restrictions.
Updated 13 days ago
Did this page help you?
