Tradekix: 实时金融市场数据 API - Openclaw Skills

作者:互联网

2026-03-29

AI教程

什么是 Tradekix?

Tradekix 是为 Openclaw Skills 环境构建的强大金融数据连接器,使 AI 智能体能够获取实时和历史市场信息。它充当复杂金融 API 与智能体工作流之间的桥梁,提供对股票、外汇和数字资产的访问。通过利用此技能,开发人员可以授权其智能体通过流线型界面进行深度市场研究、监测波动性并及时了解宏观经济变化。

该技能对于构建自动交易助手或金融研究智能体的开发人员特别有价值。它通过为各种数据点(从标准价格报价到国会交易活动和社交媒体情感分析等利基数据集)提供统一的包装器,简化了数据获取过程。

下载入口:https://github.com/openclaw/skills/tree/main/skills/jamesjohnfox/tradekix

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install tradekix

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 tradekix。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

Tradekix 应用场景

  • 跟踪股票和加密货币符号的实时投资组合表现。
  • 自动生成公司收益和经济日历摘要。
  • 通过社交情感和 Twitter 活动识别潜在的市场推动者。
  • 监控国会交易活动以进行透明度和趋势分析。
  • 为特定符号价格变动设置自动市场警报。
Tradekix 工作原理
  1. 技能通过验证 config 目录中的 API 配置来初始化,以确保存在有效的密钥。
  2. 对于新用户,Openclaw Skills 集成促进了自动注册命令以生成免费 API 密钥。
  3. 请求通过专门的 bash 包装脚本进行路由,该脚本处理身份验证和终结点路由。
  4. 数据从 Tradekix 云基础设施检索,并以标准 JSON 格式返回,以便智能体轻松解析。
  5. 智能体监视响应中的 meta 对象,以跟踪剩余的每日速率限制并优雅地处理 API 限制。

Tradekix 配置指南

要开始使用 Tradekix,请验证您的配置或使用提供的脚本自动注册:

# 检查现有配置
cat ~/.config/tradekix/config.json 2>/dev/null

# 注册免费 API 密钥(10 次调用/天)
bash SKILL_DIR/scripts/tradekix.sh signup --name "AGENT_NAME" --email "AGENT_EMAIL"

API 密钥将存储在本地,允许所有后续命令自动加载凭据。

Tradekix 数据架构与分类体系

Tradekix 技能对所有查询使用结构化 JSON 响应。以下是命令到数据的映射:

命令 数据内容
market 股票、加密货币、外汇和商品概览
prices 特定符号(如 AAPL、BTC)的当前价格数据
indices 标准普尔 500 指数、纳斯达克指数和其他全球指数的表现
news 金融和市场变动新闻的精选摘要
trades 国会交易和潜在冲突的详细信息
sentiment 社交媒体情感分析得分
economic 美联储会议和 CPI 数据等经济日历事件

所有响应都返回 {"success": true, "data": {...}, "meta": {...}} 结构。

name: tradekix
description: Query financial market data via the Tradekix API — stock prices, crypto, forex, indices, market news, earnings, economic events, Congressional trades, and social sentiment. Use when the user asks about markets, stock prices, trading data, economic calendars, or financial news. Also handles API key signup and upgrade to Pro.

Tradekix

Financial data API for AI agents. Free tier: 10 calls/day.

Setup

Check for existing config:

cat ~/.config/tradekix/config.json 2>/dev/null

If no config exists, sign up automatically:

bash SKILL_DIR/scripts/tradekix.sh signup --name "AGENT_NAME" --email "AGENT_EMAIL"

This stores the API key in ~/.config/tradekix/config.json.

Usage

Run via the wrapper script. All commands auto-load the API key from config.

# Market overview (stocks, crypto, forex, commodities)
bash SKILL_DIR/scripts/tradekix.sh market

# Specific stock/crypto prices
bash SKILL_DIR/scripts/tradekix.sh prices AAPL,TSLA,BTC

# Global indices
bash SKILL_DIR/scripts/tradekix.sh indices

# Forex rates
bash SKILL_DIR/scripts/tradekix.sh forex

# Market news summaries
bash SKILL_DIR/scripts/tradekix.sh news

# Latest alerts
bash SKILL_DIR/scripts/tradekix.sh alerts

# Economic calendar
bash SKILL_DIR/scripts/tradekix.sh economic

# Earnings calendar
bash SKILL_DIR/scripts/tradekix.sh earnings

# Social sentiment
bash SKILL_DIR/scripts/tradekix.sh sentiment

# Market tweets
bash SKILL_DIR/scripts/tradekix.sh tweets

# Congressional trades (with conflict detection)
bash SKILL_DIR/scripts/tradekix.sh trades

# Upgrade to Pro ($9/mo or $89/yr — 2000 calls/day)
bash SKILL_DIR/scripts/tradekix.sh upgrade monthly

# Revoke API key
bash SKILL_DIR/scripts/tradekix.sh revoke

Endpoint Selection Guide

User asks about... Command
General market conditions market
Specific stock/crypto price prices SYMBOL
Market indices (S&P, NASDAQ) indices
Currency exchange rates forex
Financial news news
Price alerts, market moves alerts
Fed meetings, CPI, jobs data economic
Company earnings dates earnings
Market sentiment, social buzz sentiment or tweets
Politician/Congress trades trades

Response Format

All responses return {"success":true,"data":{...},"meta":{...}}. Parse data for results. Check meta.rate_limit_remaining to track usage.

Rate Limits

  • Free: 10 calls/day, 5/min
  • Pro: 2,000 calls/day, 60/min ($9/mo or $89/yr)
  • Enterprise: 50,000 calls/day — contact sales@tradekix.com

When rate limited (HTTP 429), check Retry-After header.

Full API Reference

See references/api-docs.md for complete endpoint documentation.

相关推荐