Binance Spot WebSocket Skill
by @jolestar
Subscribe to Binance Spot public market streams through UXC raw WebSocket support for trades, book ticker, depth, and ticker events with stream-specific guar...
clawhub install binance-spot-websocket-skillπ About This Skill
name: 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 guardrails.
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.Scope
This skill covers Binance Spot public market streams such as:
This skill does not cover:
Endpoint Model
Binance Spot public market streams use raw WebSocket endpoints.
wss://stream.binance.com:443wss://stream.binance.com:443/ws/wss://stream.binance.com:443/stream?streams=/ Important:
{"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
4. Stop the job when finished:
- uxc subscribe stop
Common Stream Targets
btcusdt@trade
btcusdt@aggTrade
btcusdt@bookTicker
btcusdt@miniTicker
btcusdt@ticker
btcusdt@depthRuntime Validation
The following live raw WebSocket flow was validated successfully through uxc:
wss://stream.binance.com:443/ws/btcusdt@trade--transport websocketopen
- repeated data events with Binance trade payloads
- closed after stopObserved event fields included:
e: "trade"s: "BTCUSDT"pqtGuardrails
--text.event_kind, data, meta.wss://stream.binance.com:443 as the default public stream host; it validated more reliably than :9443 in recent runtime checks.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
references/usage-patterns.md
βοΈ Configuration
uxc is installed and available in PATH.