Tiger Quant Open Platform Rust SDK Complete Skill Set / Complete AI skill set for Tiger Brokers OpenAPI (Rust)
Safety Warning / Safety Warning: Trading involves real money. When generating trading code, default tosimulated account, unless the user explicitly requests live trading. Before placing a live order, you must confirm the order details with the user. Trading involves real money. Default to Paper Trading when generating trading code. Always confirm order details before live orders.
- Docs: https://docs.itigerup.com/docs/prepare
- GitHub: https://github.com/tigerfintech/openapi-rust-sdk
- Crate:
tigeropen| Rust 1.70+, tokio async
Language Rules / Language Rules
Reply automatically based on the user's input language. Keep technical terms (code, API names, parameter names) as-is without translation. Reply in the user's language. Keep technical terms (code, API names, parameters) as-is.
Reference Guides
- Quickstart — SDK install, config, async setup, error handling
- Market Data — Real-time quotes, K-lines, depth, options, futures (async)
- Trading — Place/modify/cancel orders, positions, assets (async)
- Real-time Push — Async WebSocket push for quotes, orders, positions
- Account Management — Account list, assets, positions, fund transfer, deposit/withdrawal
- Options Trading — Option chain, expirations, Greeks, multi-leg strategies
Quick Start
use tigeropen::config::ClientConfig;
use tigeropen::model::quote_requests::BriefRequest;
use tigeropen::model::trade_requests::OrdersRequest;
use tigeropen::quote::QuoteClient;
use tigeropen::trade::TradeClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// 1. 创建配置 / Create config
let config = ClientConfig::builder()
.tiger_id("your_tiger_id")
.private_key("your_rsa_private_key")
.account("your_account")
.build()?;
// 2. 查询行情 / Query quotes
let qc = QuoteClient::from_config(config.clone());
let briefs = qc
.get_real_time_quote(BriefRequest {
symbols: Some(vec!["AAPL".to_string(), "TSLA".to_string()]),
..Default::default()
})
.await?;
for b in &briefs {
println!("{} latest={}", b.symbol, b.latest_price);
}
// 3. 交易操作 / Trading
let tc = TradeClient::from_config(config.clone());
let orders = tc
.get_orders(OrdersRequest {
limit: Some(20),
..Default::default()
})
.await?;
println!("orders: {}", orders.len());
Ok(())
}
When to Use Each Reference
| Task | Reference |
|---|---|
| First time setup, SDK install, auth config | quickstart.md |
| Get stock/option/future quotes, K-lines | quote.md |
| Place/modify/cancel orders, check positions/assets | trade.md |
| Real-time streaming data via WebSocket | push.md |
| Account info, assets, fund transfer, deposit/withdrawal | account.md |
| Option chain, Greeks, expirations, multi-leg orders | option.md |
Common Symbols / Common Symbols Quick Reference
Hong Kong Stocks HK
| Common Name | Symbol |
|---|---|
| Tencent | 00700 |
| Alibaba | 09988 |
| Meituan | 03690 |
| Xiaomi | 01810 |
US Stocks US
| Common Name | Symbol |
|---|---|
| Apple / Apple | AAPL |
| Tesla / Tesla | TSLA |
| NVIDIA / NVIDIA | NVDA |
| Microsoft / Microsoft | MSFT |
| Google / Google | GOOGL |
| Amazon / Amazon | AMZN |
| Meta | META |
| Tiger Brokers / TIGR | TIGR |
| S&P 500 ETF / SPY | SPY |
| Nasdaq ETF / QQQ | QQQ |