TypeScript SDK
Tiger Open API TypeScript SDK, providing market data queries, order placement, account management, and real-time push notifications.
- Requires Node.js >= 16.0.0
- Supports both ESM and CommonJS
- Source repository: openapi-sdks/typescript
Installation
npm install tigeropen
# or
yarn add tigeropen
# or
pnpm add tigeropenRequires Node.js >= 16.0.0.
Configuration
The SDK supports three configuration methods. Priority: Environment Variables > Code Settings (including config file) > Defaults.
Method 1: Load from properties file
import { createClientConfig } from 'tigeropen';
const config = createClientConfig({
propertiesFilePath: 'tiger_openapi_config.properties',
});Configuration file format:
tiger_id=your_developer_id
private_key=your_rsa_private_key
account=your_trading_accountMethod 2: Set directly in code
import { createClientConfig } from 'tigeropen';
const config = createClientConfig({
tigerId: 'your_tiger_id',
privateKey: 'your_rsa_private_key',
account: 'your_trading_account',
});Method 3: Environment variables
export TIGEROPEN_TIGER_ID=your_developer_id
export TIGEROPEN_PRIVATE_KEY=your_rsa_private_key
export TIGEROPEN_ACCOUNT=your_trading_accountConfiguration Options
| Option | Description | Required | Default |
|---|---|---|---|
| tigerId | Developer ID | Yes | - |
| privateKey | RSA private key | Yes | - |
| account | Trading account | No | - |
| language | Language (zh_CN/en_US) | No | zh_CN |
| timeout | Request timeout (seconds) | No | 15 |
Updated 6 days ago
