360 Secure SkillHub
360 安全技能中心

okx_symbol_prices

通过本地 Python 脚本调用 OKX 行情接口,为用户指定币种获取一次性现货价格,优先采用 USDT、USDC、USD 计价,可按输入顺序输出美元格式文本或 JSON;无对应现货行情时显示 N/A。

chgy123
chgy123
热度 50.40
最近更新 2026-05-11 17:33:49
分类:数据依赖:代码执行 / 第三方 API应用场景:财务

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add okx-symbol-prices
Metadata
name
okx-symbol-prices
description
Fetch specified crypto spot prices from OKX and present them in USD display. Use when the user asks to get OKX prices/quotes for specific symbols (e.g. BTC, ETH, SOL) or mentions OKX markets/top-cryptocurrency price list.

OKX Symbol Prices (USD display)

What this skill does

Gets one-shot spot prices for user-specified symbols from OKX, displayed with a $ sign. For each symbol it prefers quote currency USDT > USDC > USD.

How to run (Windows / PowerShell)

From the workspace root, run:

python ".openclaw/workspace/skills/okx-symbol-prices/scripts/okx_symbol_prices.py" --symbols BTC,ETH,SOL

Optional:

  • Increase timeout (seconds):
python ".openclaw/workspace/skills/okx-symbol-prices/scripts/okx_symbol_prices.py" --symbols BTC,ETH,SOL --timeout 20
  • Output JSON (one object per symbol):
python ".openclaw/workspace/skills/okx-symbol-prices/scripts/okx_symbol_prices.py" --symbols BTC,ETH,SOL --format json

Output conventions

  • Prints results in the same order as --symbols.
  • If a symbol has no USDT/USDC/USD spot ticker on OKX, prints N/A.