Complete AI skill set for the TradeUP OpenAPI Python SDK, scoped to U.S. stocks and options.
Safety Warning: Trading involves real money. Default to the Paper Trading account unless the user explicitly requests live trading. Before any live
place_order()call: 1) callpreview_order()and show estimated commission, 2) display order details in a table (symbol, action, quantity, price, account), 3) stop and wait for explicit user confirmation — never auto-submit. Never log or echo private-key fields.
- Docs: https://docs.tradeup.com/
- Developer Platform: https://developer.tradeup.com/
- GitHub: https://github.com/tigerfintech/openapi-python-sdk
- Install:
pip install tigeropen| Python 3.8 - 3.14
Scope
This skill covers U.S. market only. Supported instruments:
| Instrument | Live | Paper |
|---|---|---|
| Stocks, ETFs (incl. fractional shares, Live only) | ✅ | ✅ |
| Options | ✅ | ✅ |
Out of scope (use the global tigeropen-skill instead): Hong Kong, Singapore, Australia, China A-shares, futures, funds, crypto, warrants, multi-leg combo orders, TWAP/VWAP algo orders.
Reference Guides
Load the relevant guide for your task:
- Quickstart — install, configuration (
license=TBUS), client setup, enums/objects, error codes, FAQ - Market Data — market status, calendar, real-time quotes, K-lines, depth, ticks, intraday, capital flow, hot rank
- Options — option expirations, chains, briefs, depth, ticks, K-lines (with Greeks)
- Scanner — stock screener with field-based filters
- Trading — place / modify / cancel orders, contracts, order queries, accounts, positions, fund transfers
- Real-time Push — WebSocket subscriptions for quotes, depth, ticks, options, top movers, asset / position / order / transaction
- CLI Tool — command-line interface for config, quote, trade, account, push
- MCP Server — expose TradeUP API as MCP tools for Cursor, Claude Code, 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. Configuration via properties file (recommended)
client_config = TigerOpenClientConfig(props_path='/Users/demo/props/')
# Or assign in code:
# client_config = TigerOpenClientConfig()
# client_config.tiger_id = 'YOUR_TIGER_ID'
# client_config.private_key = read_private_key('/path/to/your_private_key.pem')
# client_config.account = '12345678'
# client_config.language = Language.en_US
# 2. Query market data
quote_client = QuoteClient(client_config)
status = quote_client.get_market_status(Market.US)
brief = quote_client.get_stock_briefs(['AAPL', 'TSLA'])
# 3. Place an order — see references/trade.md for full examples
trade_client = TradeClient(client_config)
When to Use Each Reference
| Task | Reference |
|---|---|
| First-time setup, install, auth, config | quickstart.md |
| Stock quotes, K-lines, intraday, capital flow | quote.md |
| Option chains, briefs, Greeks, expirations | option.md |
| Stock screening, filtering by financial fields | scanner.md |
| Place / modify / cancel orders, query orders, positions | trade.md |
| Real-time streaming via WebSocket | push.md |
| Manage TradeUP API from terminal | cli.md |
| Set up MCP server for AI editor integration | mcp.md |
Common U.S. Symbols
When the user uses an English name or shorthand, map per the table below. For symbols not listed, infer from context.
| Common name | Symbol |
|---|---|
| Apple | AAPL |
| Microsoft | MSFT |
| Tesla | TSLA |
| NVIDIA | NVDA |
| Google / Alphabet | GOOGL / GOOG |
| Amazon | AMZN |
| Meta / Facebook | META |
| Netflix | NFLX |
| TSMC | TSM |
| AMD | AMD |
| Berkshire Hathaway | BRK.A / BRK.B |
| TradeUP / Tiger / TIGR | TIGR |
| Alibaba ADR | BABA |
| JD.com ADR | JD |
| PDD / Pinduoduo | PDD |
| S&P 500 ETF | SPY |
| Nasdaq-100 ETF | QQQ |
| Russell 2000 ETF | IWM |
| Dow ETF | DIA |
| Treasury 20Y ETF | TLT |
| Volatility Index ETF | VXX |
Critical Facts
- License: U.S. accounts use
license=TBUS. Other licenses (TBHK, TBSG, etc.) will be rejected by the API. - Private key format (Python): PKCS#8 (
private_key_pk8) is recommended; PKCS#1 (private_key_pk1) is also supported. Both can coexist in the properties file — the SDK prefersprivate_key_pk8when present. Java SDK requires PKCS#8 only. - Default language:
Language.en_US. - Extended hours: For pre-market and after-hours trading, set
outside_rth=Trueon stock orders. Market orders (MKT) and stop orders (STP) are not supported in extended hours. - Fractional shares: Live accounts only, via
quantity_scaleparameter onplace_order. Paper Trading does not support fractional. - Time-in-force:
DAYorGTC(GTC up to 180 days). Market orders and Paper Trading do not supportGTC. - Index options: Only Friday-expiring contracts are tradeable except IWM/SPY/QQQ which support all listed expirations.
- Direction reversal: Cannot directly flip from long to short (or vice versa) in a single order. Close existing position first.