SuperAPI AI Directory

tigeropen

General & other

View repository

Updated 10-16 01:07

About this skill

Tiger Open API Python SDK

Tiger Quant Open Platform Python SDK Complete Skill Set / Complete AI skill set for Tiger Brokers OpenAPI

Safety Warning / Safety Warning: Trading involves real money. When generating trading code, default toPaper Account(Paper Trading), unless the user explicitly requests live trading. Before live order placementmust: 1) call preview_order() to show estimated commissions; 2) display order details in a table; 3) stop and wait for explicit user confirmation beforecalling place_order()。 Trading involves real money. Default to Paper Trading unless the user explicitly requests live trading. Before any live place_order() call: 1) call preview_order() and show estimated fees, 2) display order details in a table, 3) stop and wait for explicit user confirmation — never auto-submit.

Language Rules / Language Rules

Reply automatically based on the user's input language. If the user asks in English, reply in English; if the user asks in Chinese, reply in Chinese. 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

This skill is organized into focused reference files. Load the relevant guide based on your task:

  • Quickstart — SDK install, authentication, client setup, enums/objects, error codes, FAQ
  • Market Data — Real-time quotes, K-lines, depth, ticks, capital flow, fundamentals, scanner
  • Trading — Place orders (market/limit/stop/algo), order management, assets, positions, fund transfers
  • Options — Option chains, Greeks, single-leg/multi-leg combos, option calculator
  • Real-time Push — Subscribe to quote/depth/tick/K-line/order/position/asset changes via PushClient
  • CLI Tool — Command-line interface: config, quote, trade, account, push commands with table/json/csv output
  • MCP Server — Expose Tiger API as MCP tools for Cursor, Claude Code, Kiro, Trae

Quick Start

from tigeropen.common.consts import Language, Market
from tigeropen.tiger_open_config import TigerOpenClientConfig
from tigeropen.common.util.signature_utils import read_private_key
from tigeropen.quote.quote_client import QuoteClient
from tigeropen.trade.trade_client import TradeClient

# 1. Configure / 配置
# 方式一:配置文件(推荐) / Method 1: Config file (recommended)
config = TigerOpenClientConfig(props_path='/path/to/your/config/')

# 方式二:代码赋值 / Method 2: Code assignment
# config = TigerOpenClientConfig()
# config.tiger_id = 'your_tiger_id'
# config.private_key = read_private_key('/path/to/your_private_key.pem')
# config.account = 'your_account'
# config.language = Language.en_US

# 2. Query quotes / 查询行情
quote_client = QuoteClient(config)
quote = quote_client.get_market_status(Market.US)

# 3. Place order / 下单
trade_client = TradeClient(config)
# See references/trade.md for order examples

When to Use Each Reference

Task Reference
First time setup, SDK install, auth config quickstart.md
Get stock/option/future quotes, K-lines, screener quote.md
Place/modify/cancel orders, check positions/assets trade.md
Option chains, Greeks, combo strategies option.md
Real-time streaming data via WebSocket push.md
CLI commands: query data, manage orders from terminal cli.md
Set up MCP Server for AI editor integration mcp.md

Common Symbols / Common Symbols Quick Reference

When the user uses a Chinese name or English abbreviation, map it according to the table below. For symbols not in the table, infer from context. Map user's natural language to symbols. For unlisted symbols, infer from context.

Hong Kong Stocks HK

Common Names Symbol Symbol
Tencent 00700
Alibaba, Ali 09988
Meituan 03690
Xiaomi 01810
JD.com 09618
BYD 01211
Kuaishou 01024
Baidu 09888
NetEase 09999
SMIC 00981
MINIMAX 00100
Zhipu 02513

US Stocks US

Common Names Symbol Symbol
Apple / Apple AAPL
Tesla / Tesla TSLA
NVIDIA / NVIDIA NVDA
Microsoft / Microsoft MSFT
Google / Google GOOGL
Amazon / Amazon AMZN
Meta META
TSMC / TSM TSM
AMD AMD
Tiger Brokers / Tiger / TIGR TIGR
Alibaba (US) / BABA BABA
JD.com (US) / JD JD
Pinduoduo / PDD PDD
S&P 500 ETF / SPY SPY
Nasdaq ETF / QQQ QQQ