← 返回 Skills 市场
jolestar

Binance Spot WebSocket Skill

作者 jolestar · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
209
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install binance-spot-websocket-skill
功能描述
Subscribe to Binance Spot public market streams through UXC raw WebSocket support for trades, book ticker, depth, and ticker events with stream-specific guar...
使用说明 (SKILL.md)

Binance Spot WebSocket Skill

Use this skill to run Binance Spot public market streams through uxc subscribe raw WebSocket mode.

Reuse the uxc skill for generic runtime behavior, sink handling, and event-envelope parsing.

Prerequisites

  • uxc is installed and available in PATH.
  • Network access to Binance Spot public WebSocket streams.
  • A writable sink path for NDJSON output.

Scope

This skill covers Binance Spot public market streams such as:

  • trade events
  • aggregate trade events
  • book ticker updates
  • ticker updates
  • depth updates

This skill does not cover:

  • Binance Spot REST/OpenAPI workflows
  • private user data streams
  • signed WebSocket API methods
  • margin, wallet, futures, or other non-Spot product families

Endpoint Model

Binance Spot public market streams use raw WebSocket endpoints.

  • preferred base: wss://stream.binance.com:443
  • raw stream form: wss://stream.binance.com:443/ws/\x3CstreamName>
  • combined stream form: wss://stream.binance.com:443/stream?streams=\x3Cstream1>/\x3Cstream2>

Important:

  • stream names are lowercase
  • connections are valid for up to 24 hours
  • raw stream payloads arrive directly as JSON objects
  • combined stream payloads arrive as {"stream":"...","data":{...}}

Core Workflow

  1. Start a subscription directly with uxc subscribe start:
    • uxc subscribe start wss://stream.binance.com:443/ws/btcusdt@trade --transport websocket --sink file:$HOME/.uxc/subscriptions/binance-btcusdt-trade.ndjson
  2. Inspect the sink output:
    • tail -n 5 $HOME/.uxc/subscriptions/binance-btcusdt-trade.ndjson
  3. Query runtime status:
    • uxc subscribe list
    • uxc subscribe status \x3Cjob_id>
  4. Stop the job when finished:
    • uxc subscribe stop \x3Cjob_id>

Common Stream Targets

  • raw trade stream:
    • btcusdt@trade
  • aggregate trade stream:
    • btcusdt@aggTrade
  • book ticker stream:
    • btcusdt@bookTicker
  • mini ticker stream:
    • btcusdt@miniTicker
  • rolling ticker stream:
    • btcusdt@ticker
  • depth stream:
    • btcusdt@depth

Runtime Validation

The following live raw WebSocket flow was validated successfully through uxc:

  • endpoint: wss://stream.binance.com:443/ws/btcusdt@trade
  • transport: --transport websocket
  • sink output:
    • open
    • repeated data events with Binance trade payloads
    • closed after stop

Observed event fields included:

  • e: "trade"
  • s: "BTCUSDT"
  • p
  • q
  • t

Guardrails

  • Keep automation on the JSON output envelope; do not use --text.
  • Parse stable event fields first: event_kind, data, meta.
  • Use wss://stream.binance.com:443 as the default public stream host; it validated more reliably than :9443 in recent runtime checks.
  • Stream names must be lowercase.
  • This skill is read-only. Do not describe it as account, order, or signed WebSocket support.
  • Combined streams are useful when one job should emit multiple markets into one sink, but downstream parsing must handle stream wrappers.
  • uxc subscribe start ... --transport websocket is the intended execution path for this skill; uxc link is not the main interface because stream identity is encoded directly in the endpoint path.

References

安全使用建议
This skill appears to do what it says: it runs public Binance Spot WebSocket subscriptions via the `uxc` CLI and writes event NDJSON to a sink file. Before installing, verify you trust the `uxc` binary that will run (confirm its origin/version), ensure you want the skill to write to $HOME/.uxc/subscriptions (check permissions and available disk space), and note that the included validate script expects `rg` (ripgrep) during validation/publishing even though the registry metadata doesn't list required binaries. No API keys or secrets are requested. If you plan to allow autonomous agent invocation, remember the agent could start/stop uxc jobs—ensure that runtime behavior is acceptable for your environment.
功能分析
Type: OpenClaw Skill Name: binance-spot-websocket-skill Version: 1.0.0 The skill bundle provides instructions and examples for using the 'uxc' tool to subscribe to public Binance Spot market WebSocket streams. It includes a validation script (scripts/validate.sh) that performs static analysis on the documentation to ensure consistency and the absence of legacy command patterns, and the instructions in SKILL.md are strictly limited to public, read-only market data.
能力评估
Purpose & Capability
The SKILL.md clearly documents subscribing to Binance public Spot WebSocket streams via the `uxc` CLI, which matches the skill name and description. However, the registry metadata lists no required binaries while the SKILL.md explicitly requires `uxc` in PATH (and the included validate.sh requires `rg`). That mismatch is a packaging/metadata inconsistency but not hostile.
Instruction Scope
Instructions are narrowly scoped to starting/stopping `uxc subscribe` jobs, inspecting NDJSON sink files under $HOME, and handling combined/raw stream envelopes. The skill explicitly states it is read-only and excludes private/signed APIs. It does reference writing to the user's home (~/.uxc/subscriptions) which is expected for a sink.
Install Mechanism
No install spec is provided (instruction-only), so nothing will be written or fetched by the skill itself. This is the lowest-risk install model.
Credentials
The skill requests no environment variables or credentials, which is appropriate. One caveat: the runtime uses $HOME and a writable sink path, and the included validation script requires the `rg` binary — these runtime/tool dependencies are not declared in registry metadata and should be verified by the user.
Persistence & Privilege
The skill is not marked always:true and is user-invocable. It does not request persistent privileges or modify other skills' configuration. Autonomous invocation is allowed (platform default) but the skill's behavior is narrowly scoped.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install binance-spot-websocket-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /binance-spot-websocket-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of the Binance Spot WebSocket Skill. - Subscribe to Binance Spot public market streams (trades, book ticker, depth, ticker) via UXC using raw WebSocket mode. - Supports direct streaming to NDJSON sinks for persistent event storage and processing. - Enforces stream-specific guardrails, including lowercase stream names and public-only (read-only) operations. - Includes runtime instructions for subscribing, monitoring, and stopping data streams. - References validated endpoints and example usage for rapid adoption.
元数据
Slug binance-spot-websocket-skill
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Binance Spot WebSocket Skill 是什么?

Subscribe to Binance Spot public market streams through UXC raw WebSocket support for trades, book ticker, depth, and ticker events with stream-specific guar... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 209 次。

如何安装 Binance Spot WebSocket Skill?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install binance-spot-websocket-skill」即可一键安装,无需额外配置。

Binance Spot WebSocket Skill 是免费的吗?

是的,Binance Spot WebSocket Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Binance Spot WebSocket Skill 支持哪些平台?

Binance Spot WebSocket Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Binance Spot WebSocket Skill?

由 jolestar(@jolestar)开发并维护,当前版本 v1.0.0。

💬 留言讨论