Go SDK
Tiger Open API Go SDK, providing market data queries, order placement, account management, and real-time push notifications.
- Requires Go 1.20 or higher
- Source repository: openapi-go-sdk
Installation
go get github.com/tigerfintech/openapi-go-sdkRequires Go 1.20 or higher.
Configuration
The SDK supports three configuration methods. Priority: Environment Variables > Code Settings (including config file) > Defaults.
Method 1: Load from properties file
cfg, err := config.NewClientConfig(
config.WithPropertiesFile("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
cfg, err := config.NewClientConfig(
config.WithTigerID("your_tiger_id"),
config.WithPrivateKey("your_rsa_private_key"),
config.WithAccount("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 |
|---|---|---|---|
| tiger_id | Developer ID | Yes | - |
| private_key | RSA private key | Yes | - |
| account | Trading account | No | - |
| language | Language (zh_CN/zh_TW/en_US) | No | zh_CN |
| timeout | Request timeout | No | 15s |
Updated about 17 hours ago
