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 guardrails.
Best use case
binance-spot-websocket-skill is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Subscribe to Binance Spot public market streams through UXC raw WebSocket support for trades, book ticker, depth, and ticker events with stream-specific guardrails.
Teams using binance-spot-websocket-skill should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/binance-spot-websocket/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How binance-spot-websocket-skill Compares
| Feature / Agent | binance-spot-websocket-skill | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Subscribe to Binance Spot public market streams through UXC raw WebSocket support for trades, book ticker, depth, and ticker events with stream-specific guardrails.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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/<streamName>`
- combined stream form: `wss://stream.binance.com:443/stream?streams=<stream1>/<stream2>`
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 <job_id>`
4. Stop the job when finished:
- `uxc subscribe stop <job_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 patterns:
- `references/usage-patterns.md`
- Binance Spot WebSocket Streams:
- https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streamsRelated Skills
okx-exchange-websocket-skill
Subscribe to OKX public exchange WebSocket channels through UXC raw WebSocket mode for ticker, trade, book, and candle events with explicit subscribe frames.
spot
KuCoin Spot trading using the KuCoin API. Authentication requires API Key, API Secret, and Passphrase.
kraken-spot-execution
Execute spot orders with validation, confirmation gates, and post-trade checks.
recipe-futures-hedge-spot
Hedge a spot holding with a short futures position to lock in value.
binance-web3-openapi-skill
Operate Binance Web3 public market and research APIs through UXC with a curated OpenAPI schema. Use when tasks need token search, token metadata/market snapshots, address holdings, rankings, token audit, or smart money signals on Binance Web3.
binance-watchlist
Scan a full Binance spot watchlist using multi-indicator TA scoring. Returns ranked trading opportunities sorted by signal strength. No API key required (uses public data). Use for Binance scanning, watchlist screening, signal ranking, or finding the best trade setup right now.
binance-trading-bot
Binance 现货/合约交易机器人 - 查询余额、市价/限价下单、止盈止损。每次调用自动扣费 0.001 USDT(SkillPay 集成)
Binance Trading Assistant Skill
Monitor Binance account balances, positions, and get price alerts through your AI assistant.
binance-stat-arb-monitor
Binance 统计套利监控系统。基于 ETH/BTC 永续合约价格比率计算 z-score,生成均值回归交易信号并推送到 Telegram 或飞书。 使用场景: (1) 监控统计套利机会(ETH/BTC 比率偏离均值) (2) 计算 z-score 判断开仓/平仓时机 (3) 生成交易信号(OPEN/CLOSE) (4) 通过 Telegram Channel 或飞书推送信号 (5) 记录信号历史用于回测分析 数据来源:Binance USDT 合约公共 API(无需认证即可获取行情数据)
binance-spot-trading
币安现货交易支持。每次调用自动扣费 0.001 USDT
binance-spot-trader
Autonomous Binance spot trading bot with LLM-powered market analysis. Supports momentum trading, mean reversion, and DCA strategies on any Binance spot pair. Use when user wants to trade on Binance, set up automated crypto trading, build a spot trading bot, or automate DCA buying. Features technical analysis, LLM sentiment evaluation, position sizing, and portfolio tracking.
binance-spot-openapi-skill
Operate Binance Spot market, account, and order APIs through UXC with a curated OpenAPI schema, Binance query signing, and separate mainnet/testnet link flows.