← Back to Skills Marketplace
jolestar

Binance Spot WebSocket Skill

by jolestar · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
209
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install binance-spot-websocket-skill
Description
Subscribe to Binance Spot public market streams through UXC raw WebSocket support for trades, book ticker, depth, and ticker events with stream-specific guar...
README (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

Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install binance-spot-websocket-skill
  3. After installation, invoke the skill by name or use /binance-spot-websocket-skill
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug binance-spot-websocket-skill
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 209 downloads so far.

How do I install Binance Spot WebSocket Skill?

Run "/install binance-spot-websocket-skill" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Binance Spot WebSocket Skill free?

Yes, Binance Spot WebSocket Skill is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Binance Spot WebSocket Skill support?

Binance Spot WebSocket Skill is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Binance Spot WebSocket Skill?

It is built and maintained by jolestar (@jolestar); the current version is v1.0.0.

💬 Comments