Tiger Trading

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

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 164 · 0 current installs · 0 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description, SKILL.md, and the Python client are consistent: this is a Tiger (老虎) brokerage client that lists/queries accounts/positions/balance and places/cancels orders. The credentials it asks for (tiger_id, account, license, private_key) are appropriate for this purpose.
Instruction Scope
Runtime instructions and the code only reference the Tiger SDK and local private key (file path or text). The skill does not read unrelated system files or send data to unknown endpoints in the provided code; all network activity would occur via the tigeropen library to the brokerage API.
!
Install Mechanism
This is an instruction-only install with no install spec, but the code depends on the external Python package 'tigeropen' (and its submodules). That dependency is not declared or installed by the skill, which can cause runtime failures. Lack of an install/dependency declaration is an operational/maintenance gap (not necessarily malicious).
Credentials
The only sensitive inputs required are tiger_id, account, license, and private_key — all expected for trading. Requiring raw private key content or a path is necessary for signing requests but is high sensitivity: supplying these grants the skill ability to execute real trades. No unrelated credentials or environment variables are requested.
Persistence & Privilege
always is false (good). The skill allows autonomous model invocation (platform default). Because the skill can place/cancel orders, autonomous invocation increases risk if the agent is permitted to call the skill without human approval — consider restricting use or requiring explicit user confirmation for trade actions.
Assessment
This skill is coherent with its stated purpose but handles very sensitive credentials and can execute real trades. Before installing: (1) Confirm you trust the skill source (no homepage or publisher info is provided). (2) Review the tiger_client.py yourself or run it in a sandboxed/test (simulated) Tiger account (license=TBNZ) first. (3) Do NOT supply your production private key to untrusted skills; prefer a limited/sandbox key and rotate it afterward. (4) Ensure the runtime has the required 'tigeropen' Python package installed and pinned to a known-good version. (5) If possible, disable autonomous invocation or require explicit confirmation for any order-placement actions to avoid accidental or automated trades.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk97768f0s1z3d3zj5cxgz5xntn82jt1s

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

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 和账户信息

Files

2 total
Select a file
Select a file to preview.

Comments

Loading comments…