闲社服务运行正常AI智能体自动化平台
s

羊驼交易爪

技能标识:storyclaw-alpaca-trading

US stock and crypto trading via Alpaca API. Paper trading (simulated) and real trading supported. Real-time quotes, orders, positions, RSI strategy.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 0.1.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

羊驼交易爪

Alpaca交易 - 美股与加密货币交易

通过Alpaca API交易美股和加密货币。支持模拟交易(免费)和实盘交易。

关键规则

  1. 1. 未展示计划并获得明确确认前,绝不执行交易
  2. 未事先提议前,绝不设置定时任务
  3. 绝不捏造价格或数据——始终查询真实数据
  4. 绝不假设用户想交易什么——先询问

多用户支持

每个用户拥有自己的 credentials/{USER_ID}.json:

json
{
apiKey: YOUR_KEY,
apiSecret: YOUR_SECRET,
baseUrl: https://paper-api.alpaca.markets,
dataUrl: https://data.alpaca.markets
}

要切换到实盘交易,将 baseUrl 改为 https://api.alpaca.markets。

或设置 ALPACAAPIKEY 和 ALPACAAPISECRET 环境变量。

首次用户流程

  1. 1. 检查凭证:USERID=$TELEGRAMUSER_ID node {baseDir}/scripts/trading.js check
  2. 询问他们想交易什么(股票还是加密货币、代码、金额、风险)
  3. 提出具体计划——等待确认
  4. 仅在用户确认后执行

命令

账户与持仓

bash
node {baseDir}/scripts/trading.js check # 检查配置
node {baseDir}/scripts/trading.js account # 余额
node {baseDir}/scripts/trading.js positions # 当前持仓
node {baseDir}/scripts/trading.js history # 订单历史
node {baseDir}/scripts/trading.js portfolio-history # 权益曲线(默认1周)
node {baseDir}/scripts/trading.js portfolio-history 1M # 1天/1周/1月/3月/1年

市场数据

bash
node {baseDir}/scripts/trading.js quote AAPL # 实时报价
node {baseDir}/scripts/trading.js bars AAPL 30 # 价格历史
node {baseDir}/scripts/trading.js rsi AAPL 14 # RSI指标

交易

bash
node {baseDir}/scripts/trading.js buy AAPL 10 # 买入(市价单)
node {baseDir}/scripts/trading.js sell AAPL 10 # 卖出

策略

bash
node {baseDir}/scripts/trading.js strategy-rsi AAPL # RSI均值回归

RSI < 30 + 无持仓 → 买入;RSI > 70 + 有持仓 → 卖出

功能

  • - 美股与加密货币(AAPL、TSLA、BTC、ETH等)
  • 模拟或实盘交易(取决于凭证)
  • 实时报价(免费版延迟15分钟)
  • 市价单、技术指标(RSI)
  • 交易时间:股票周一至周五美东时间9:30-16:00;加密货币全天候

设置

  1. 1. 在 https://app.alpaca.markets/brokerage/new-account 注册
  2. 生成API密钥+密钥(模拟交易部分)
  3. 创建 credentials/{USER_ID}.json 或设置环境变量

API限制

层级每分钟调用次数数据延迟
免费20015分钟
无限
无限制 | 实时 |

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 storyclaw-alpaca-trading-1776101296 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 storyclaw-alpaca-trading-1776101296 技能

通过命令行安装

skillhub install storyclaw-alpaca-trading-1776101296

下载

⬇ 下载 storyclaw-alpaca-trading v0.1.0(免费)

文件大小: 13.86 KB | 发布时间: 2026-4-15 14:31

v0.1.0 最新 2026-4-15 14:31
Initial release of storyclaw-alpaca-trading.

- Enables US stock and crypto trading via the Alpaca API, supporting both paper (simulated) and real trading
- Provides real-time quotes, order management, position tracking, and technical indicators like RSI
- Enforces critical safety rules: explicit user confirmation required for all trades and plans
- Supports multiple users with individual credentials and environment variable configuration
- Includes command-line scripts for account checks, trading, strategy, and market data queries
返回顶部