tiger-trading

老虎证券美股交易能力。支持账户余额查询、持仓查询、买卖下单、订单管理。用户只需提供 tiger_id、account、license 和 private_key 即可使用。触发场景:(1) 查询老虎账户状态 (2) 买卖美股 (3) 查看持仓 (4) 取消订单

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "tiger-trading" with this command: npx skills add wjpwc/tiger-trading

Tiger Trading Skill

使用 Tiger 客户端进行美股交易。

快速开始

用户提供以下信息即可使用:

  • tiger_id: Tiger ID
  • account: 账户ID
  • license: 许可证 (通常为 TBNZ)
  • private_key: 私钥内容或私钥文件路径

使用方式

1. 初始化客户端

import sys
sys.path.insert(0, 'skills/tiger-trading/scripts')
from tiger_client import TigerClient

# 方式1: 使用私钥文件路径
client = TigerClient(
    tiger_id='YOUR_TIGER_ID',
    account='YOUR_ACCOUNT_ID',
    license='TBNZ',
    private_key='/path/to/private_key.pem'
)

# 方式2: 使用私钥内容
client = TigerClient(
    tiger_id='YOUR_TIGER_ID',
    account='YOUR_ACCOUNT_ID',
    license='TBNZ',
    private_key='MIICXAIBAAKBgQ...'
)

2. 查询功能

# 查询账户
client.get_account()

# 查询持仓
client.get_positions()

# 查询余额
client.get_balance()

# 查询订单 (传入状态列表过滤)
client.get_orders()  # 所有订单

3. 交易功能

# 限价买单
client.place_order(
    symbol='AAPL',
    side='buy',
    quantity=100,
    order_type='LMT',  # LMT=限价单, MKT=市价单
    price=150.0
)

# 市价卖单
client.place_order(
    symbol='AAPL',
    side='sell',
    quantity=50,
    order_type='MKT'
)

4. 订单管理

# 取消订单
client.cancel_order(order_id='123456')

CLI 用法

# 余额查询
python skills/tiger-trading/scripts/tiger_client.py \
  --tiger-id YOUR_TIGER_ID \
  --account YOUR_ACCOUNT_ID \
  --license TBNZ \
  --private-key /path/to/private_key.pem balance

# 持仓查询
python skills/tiger-trading/scripts/tiger_client.py \
  --tiger-id YOUR_TIGER_ID \
  --account YOUR_ACCOUNT_ID \
  --license TBNZ \
  --private-key /path/to/private_key.pem positions

# 下单
python skills/tiger-trading/scripts/tiger_client.py \
  --tiger-id YOUR_TIGER_ID \
  --account YOUR_ACCOUNT_ID \
  --license TBNZ \
  --private-key /path/to/private_key.pem order \
  --symbol AAPL --side buy --quantity 100 --price 150.0

返回格式示例

余额

{
  "success": true,
  "balance": {
    "cash": 100000.0,
    "buying_power": 400000.0,
    "net_liquidation": 100000.0,
    "unrealized_pnl": 0.0,
    "currency": "USD"
  }
}

持仓

{
  "success": true,
  "positions": [
    {
      "symbol": "AAPL",
      "quantity": 100,
      "avg_cost": 150.0,
      "market_value": 15000.0,
      "unrealized_pnl": 0.0,
      "unrealized_pnl_percent": 0.0
    }
  ]
}

注意事项

  1. 私钥支持文件路径或直接内容两种方式
  2. 默认使用模拟盘环境 (license=TBNZ)
  3. order_type: LMT=限价单, MKT=市价单
  4. 真实账户需要提供真实的 license 和账户信息

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Zoom

Zoom API integration with managed OAuth. Manage meetings, webinars, recordings, and user profiles. Use this skill when users want to schedule meetings, manag...

Registry SourceRecently Updated
General

Kleinanzeigen.de Helper

Erstelle und verwalte Verkaufsanzeigen speziell auf kleinanzeigen.de. Verwende diesen Skill wenn der Human sagt, er will etwas auf kleinanzeigen.de verkaufen...

Registry SourceRecently Updated
General

Poku

Sends and receives phone calls and messages (like SMS, WhatsApp, Slack), and reserves dedicated phone numbers using the Poku API. Example use cases: calling...

Registry SourceRecently Updated
General

IMAP/SMTP Email - Maddy Fix

Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Sup...

Registry SourceRecently Updated