tigeropen-rust

Build Rust trading applications with Tiger Brokers OpenAPI for quotes, orders, and push subscriptions.

1.5k|337|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/qusong0627/QuantMind --skill tigeropen-rust-qusong0627
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tigeropen-rust
Source: https://github.com/qusong0627/QuantMind/tree/main/skills/tigeropen-rust
Command: npx skills add https://github.com/qusong0627/QuantMind --skill tigeropen-rust-qusong0627

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tigeropen, tokio, serde_json, and includes references (resource) components.

What problem does it solve? Integrating the Tiger Brokers OpenAPI in Rust involves async client setup, RSA authentication, typed request structs, and subtle API conventions (such as i64 millisecond expiries versus YYYYMMDD strings) that are easy to get wrong. This Skill gives AI coding tools accurate, bilingual guidance so generated trading code compiles and behaves correctly. ## Core Features & Use Cases - Async Market Data: Query real-time quotes, K-lines, depth, timelines, futures, and capital flow via the QuoteClient with typed request structs. - Trading & Account Management: Place, preview, modify, and cancel orders (limit, market, stop, trailing, iceberg, OCA, multi-leg option combos), and query positions, assets, and fund transfers through the TradeClient. - Real-time Push Subscriptions: Stream quotes, orders, positions, and assets over WebSocket using an Arc-wrapped PushClient with protobuf callbacks and automatic resubscription on reconnect. - Use Case: A developer asks the AI to write a Rust program that subscribes to AAPL and TSLA quotes, previews a limit buy order on a paper account, and prints position updates in real time. ## Quick Start Ask the AI to write a Rust program using the tigeropen crate that fetches real-time quotes for AAPL and lists recent orders on a paper trading account.

Frequently Asked Questions about tigeropen-rust

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I place an order with the Tiger Brokers Rust SDK?

Create an order with a helper like limit_order(account, symbol, sec_type, action, quantity, price), then call preview_order to check estimated commission before calling place_order. Order operations return Option<T>, so check for None before reading fields.

How do I get real-time stock quotes in Rust with tigeropen?

Build a ClientConfig with your tiger ID and RSA private key, create a QuoteClient via QuoteClient::from_config, then call get_real_time_quote with a BriefRequest containing your symbols. All methods are async and must be awaited inside a tokio runtime.

Does the tigeropen Rust SDK support WebSocket push subscriptions?

Yes. Wrap a PushClient in an Arc, set callbacks for quote, order, asset, or position data, then call the free function connect(&pc) and subscribe with SubjectType. The SDK automatically restores subscriptions after a reconnect.

What Rust version and runtime does the Tiger Brokers SDK require?

The tigeropen crate requires Rust 1.70 or later and the tokio async runtime, typically enabled with #[tokio::main]. Add tigeropen and tokio with full features to your Cargo.toml dependencies.

Why is the option expiry field different between quote and order APIs?

Quote APIs such as get_option_chain use expiry as an i64 millisecond timestamp, while the order struct uses expiry as an Option<String> in YYYYMMDD format. Mixing these formats is a common source of errors when generating option trading code.

Can I trade multi-leg option strategies with the tigeropen Rust SDK?

Yes. Build legs with contract_leg and submit them via combo_order plus place_order, supporting strategies like VERTICAL, STRADDLE, STRANGLE, CALENDAR, and CUSTOM. There is no place_combo_order method; combos go through the standard place_order call.