Tiger Quant Open Platform C# SDK Complete Skill Set / Complete AI skill set for Tiger Brokers OpenAPI (C#)
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://quant.itigerup.com/openapi/zh/csharp/overview/introduction.html
- GitHub: https://github.com/tigerfintech/openapi-cs-sdk
- .NET 10.0 (net10.0), C# 14 default
Language Rules / Language Rules
Reply automatically based on the user's input language. Keep technical terms (code, API names, parameter names) in their original form without translation. Reply in the user's language. Keep technical terms (code, API names, parameters) as-is.
Reference Guides
- Quickstart — NuGet install, config, client creation, error handling
- Market Data — Real-time quotes, K-lines, depth, options, futures
- Trading — Place/modify/cancel orders, positions, assets
- Real-time Push — TCP/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
using TigerOpenAPI.Config;
using TigerOpenAPI.Common.Enum;
using TigerOpenAPI.Quote;
using TigerOpenAPI.Quote.Model;
using TigerOpenAPI.Trade;
// 1. 创建配置 / Create config
TigerConfig config = new TigerConfig()
{
ConfigFilePath = "path/to/config/",
Language = Language.en_US,
};
// 2. 查询行情 / Query quotes
QuoteClient quoteClient = new QuoteClient(config);
var request = new TigerRequest<QuoteRealTimeQuoteResponse>()
{
ApiMethodName = QuoteApiService.QUOTE_REAL_TIME,
ModelValue = new QuoteSymbolModel() { Symbols = new List<string> { "AAPL", "TSLA" } }
};
var response = await quoteClient.ExecuteAsync(request);
// 3. 查询订单 / Query orders
TradeClient tradeClient = new TradeClient(config);
var orderRequest = new TigerRequest<OrderBatchResponse>()
{
ApiMethodName = TradeApiService.ORDERS,
ModelValue = new QueryOrderModel() { Account = config.DefaultAccount }
};
var orderResponse = await tradeClient.ExecuteAsync(orderRequest);
When to Use Each Reference
| Task | Reference |
|---|---|
| First time setup, NuGet 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 TCP socket | 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 |