Xerolite: 盈透证券 (IBKR) 交易自动化 - Openclaw Skills
作者:互联网
2026-04-06
什么是 Xerolite?
Xerolite 是一个专门设计的交易桥梁,旨在将 TradingView 警报和自动化逻辑直接连接到盈透证券 (IBKR)。通过使用此技能,开发者可以使其智能体通过精简的 REST API 与 TWS 或 IB Gateway 进行通信。这种集成确保了交易创意可以在无需人工干预的情况下实时执行,在策略设计与市场执行之间提供了稳健的链接。
在 Openclaw Skills 生态系统中,xerolite 技能提供了一个基于 CLI 的接口来触发订单和查询市场合约。这允许创建复杂的交易机器人或由助手引导的投资组合管理工具,这些工具在保持现代 AI 驱动工作流灵活性的同时,利用了盈透证券的可靠性。
下载入口:https://github.com/openclaw/skills/tree/main/skills/xero-flex/xerolite
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install xerolite
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 xerolite。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
Xerolite 应用场景
- 使用自然语言命令在盈透证券上执行买入或卖出订单。
- 自动化执行由外部分析工具信号触发的交易。
- 执行快速合约搜索以验证代码可用性和资产类别详情。
- 构建通过 Openclaw Skills 与 IBKR 交互的自定义交易仪表板。
- 用户或自动化智能体使用特定参数(如代码、操作和数量)触发 xerolite.mjs 脚本。
- 技能解析这些输入,如果未提供货币和交易所,则应用默认值。
- 生成结构化的 JSON 负载,并通过 POST 请求发送到配置的 Xerolite REST API 端点。
- Xerolite 接收请求并将指令转发给盈透证券平台(TWS 或 IB Gateway)。
- 执行状态或合约数据返回给智能体,完成 Openclaw Skills 环境内的闭环。
Xerolite 配置指南
要开始使用,请确保系统中安装了 Node.js 18 或更高版本。如果 API 端点不在本地机器上运行,您可以选择配置它。
# 可选:如果未使用 localhost,则设置 API URL
export XEROLITE_API_URL="http://your-server-address"
# 进入技能目录
cd skills/xerolite
# 下达测试订单
node scripts/xerolite.mjs order place --symbol TSLA --action BUY --qty 5
Xerolite 数据架构与分类体系
该技能使用为金融交易设计的标准化 JSON 架构进行通信。以下是脚本处理的主要数据点:
| 参数 | 类型 | 描述 |
|---|---|---|
| symbol | 字符串 | 资产的股票代码(例如 AAPL)。 |
| action | 字符串 | 交易方向:BUY 或 SELL。 |
| qty | 字符串/数字 | 要交易的股票或合约数量。 |
| asset_class | 字符串 | 资产类型,默认为 STOCK(股票)。 |
| currency | 字符串 | 交易货币,默认为 USD(美元)。 |
| exch | 字符串 | 路由交易所,默认为 SMART。 |
name: xerolite
description: "Integrate OpenClaw with Xerolite - IBKR. Use when: querying Xerolite API, placing orders, searching contracts."
metadata: {"openclaw":{"requires":{"bins":["node"]}}}
Xerolite
Trading Bridge from TradingView to Interactive Brokers.
Xerolite automates execution of your trading ideas: it connects TradingView alerts to your Interactive Brokers account so orders are sent in real time with no manual steps. You design the logic and alerts in TradingView; Xerolite handles the bridge to IB (TWS or IB Gateway) and execution.
This skill lets your OpenClaw agent call the Xerolite REST API to place orders and search contracts — so you can trade or look up symbols from natural language or automation without leaving your workflow.
Package Structure
skills/xerolite/
├── SKILL.md # This file
├── scripts/
│ ├── xerolite.mjs # CLI (order place, contract search)
└── references/
└── API.md # REST API guide
Capabilities
- Place orders via Xerolite REST API.
- Search contracts via Xerolite REST API.
Commands
Use these commands from the skill directory (or with {baseDir} in other skills).
Default flag values (optional; omit to use): --currency USD, --asset-class STOCK, --exch SMART.
Place order
Required: --action, --qty, --symbol. Optional: --currency, --asset-class, --exch.
# Minimal (defaults: USD, STOCK, SMART)
node {baseDir}/scripts/xerolite.mjs order place --symbol AAPL --action BUY --qty 10
# Full
node {baseDir}/scripts/xerolite.mjs order place r
--symbol AAPL r
--currency USD r
--asset-class STOCK r
--exch SMART r
--action BUY r
--qty 10
JSON sent to POST /api/internal/agent/order/place-order:
{
"name": "Agent",
"action": "BUY",
"qty": "10",
"symbol": "AAPL",
"currency": "USD",
"asset_class": "STOCK",
"exch": "SMART"
}
Search contract
Required: --symbol. Optional: --currency, --asset-class, --exch.
# Minimal (defaults: USD, STOCK, SMART)
node {baseDir}/scripts/xerolite.mjs contract search --symbol AAPL
# Full
node {baseDir}/scripts/xerolite.mjs contract search r
--symbol AAPL r
--currency USD r
--asset-class STOCK r
--exch SMART
JSON sent to POST /api/internal/agent/contract/search:
{
"brokerName": "IBKR",
"symbol": "AAPL",
"currency": "USD",
"xeroAssetClass": "STOCK"
}
REST API
For the order and contract search endpoints used by this skill, see references/API.md.
Requirements
- Node.js 18+ (for built-in
fetch) - CLI only: Optional
XEROLITE_API_URL— base URL for Xerolite API. If not set, defaults tohttp://localhost(same machine or local network). No API key in this version; may be added in a future version.
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
图像模型评估:基准测试 AI 图像生成器 - Openclaw Skills
fal-ai 模型发现:获取 llms.txt 链接 - Openclaw Skills
Janitor:Openclaw Skills 的自动化工作区维护工具
智谱网页搜索:实时 AI 互联网访问 - Openclaw Skills
OpenClaw 模型故障转移:自动 LLM 冗余 - Openclaw Skills
Prawnpt War Defender:AI 提示词攻防安全 - Openclaw Skills
Markdown 转 PDF:将 MD 转换为高质量 PDF - Openclaw Skills
YouTube 视频下载器:通过 Openclaw Skills 进行媒体管理
YouTube 视频下载器:专业的媒体提取工具 - Openclaw Skills
X 趋势:分析 Twitter 实时热门话题 - Openclaw Skills
AI精选
柔美魅力内衣时尚人像摄影
Billie Eilish 卡通版 3D 渲染提示词
从程序员到AI工程师:距离有多远?附全套学习路线图
ArkClaw 养虾省钱攻略,这 10% 的返利你还不知道?
大模型就是你雇的员工:从职场管理学看 AI 协作范式的三次进化
MinerU JS/TS SDK 深度指南:JavaScript/TypeScript 开发者的 PDF/文档解析利器
AI 自动值夜班时代来了!Claude Code 刚刚推出 Routines
一天一个开源项目(第74篇):OpenCLI - 把任意网站变成零成本 CLI 工具的 AI Agent 基础设施
