mcpField
T
tigeropen-rust

tigeropen-rust

github.com/tigerfintechOther16163 installsUpdated 6d ago
Repository

About tigeropen-rust

A skill set for using Tiger Brokers OpenAPI through the `tigeropen` Rust SDK. It covers asynchronous market data, trading, account operations, options, and WebSocket updates, with guidance to default to paper trading.

Key features

  1. 01Async quotes and market data
  2. 02Place, modify, and cancel orders
  3. 03Account, asset, and position access
  4. 04WebSocket quote and order updates
  5. 05Options data and strategies

Use cases

  1. 01Retrieve stock or futures quotes
  2. 02Review positions and account assets
  3. 03Generate order-handling code for paper trading
  4. 04Work with option chains and Greeks

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/tigerfintech/tigeropen-skill --skill tigeropen-rust

After installing, type/tigeropen-rustin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
account.md
option.md
push.md
quickstart.md
quote.md
trade.md

Details

From the project README

Tiger Open API Rust SDK

老虎量化开放平台 Rust SDK 完整技能集 / Complete AI skill set for Tiger Brokers OpenAPI (Rust)

安全警告 / Safety Warning: 交易涉及真实资金。生成交易代码时默认使用模拟账户,除非用户明确要求实盘。实盘下单前必须与用户确认订单详情。 Trading involves real money. Default to Paper Trading when generating trading code. Always confirm order details before live orders.

Language Rules / 语言规则

根据用户输入语言自动回复。技术术语(代码、API 名称、参数名)保持原文不翻译。 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

TaskReference
First time setup, SDK install, auth configquickstart.md
Get stock/option/future quotes, K-linesquote.md
Place/modify/cancel orders, check positions/assetstrade.md
Real-time streaming data via WebSocketpush.md
Account info, assets, fund transfer, deposit/withdrawalaccount.md
Option chain, Greeks, expirations, multi-leg ordersoption.md

Common Symbols / 常见标的速查

港股 HK
常见称呼代码 Symbol
腾讯00700
阿里巴巴09988
美团03690
小米01810
美股 US
常见称呼代码 Symbol
苹果 / AppleAAPL
特斯拉 / TeslaTSLA
英伟达 / NVIDIANVDA
微软 / MicrosoftMSFT
谷歌 / GoogleGOOGL
亚马逊 / AmazonAMZN
MetaMETA
老虎证券 / TIGRTIGR
标普500 ETF / SPYSPY
纳指 ETF / QQQQQQ

Comments

Markdown supported