TypeScript SDK

Tiger Open API TypeScript SDK, providing market data queries, order placement, account management, and real-time push notifications.

Installation

npm install tigeropen
# or
yarn add tigeropen
# or
pnpm add tigeropen

Requires 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_account

Method 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_account

Configuration Options

OptionDescriptionRequiredDefault
tigerIdDeveloper IDYes-
privateKeyRSA private keyYes-
accountTrading accountNo-
languageLanguage (zh_CN/en_US)Nozh_CN
timeoutRequest timeout (seconds)No15