asterdex/aster-skills-hub/aster-api-websocket-v3

Claude Code and agent skill by asterdex/aster-skills-hub

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

WebSocket market + user data streams for Aster Futures API v3. Subscription model, stream names, listenKey. Use when implementing real-time market or user events (orders, balance, positions). listenKey = signed; see aster-api-auth-v3.

Install

npx vskill@latest install asterdex/aster-skills-hub/aster-api-websocket-v3

SKILL.md

Aster API WebSocket

Base: wss://fstream.asterdex.com. Raw: /ws/<streamName>. Combined: /stream?streams=name1/name2/... → {"stream":"<name>","data":<payload>}. Stream names lowercase (e.g. btcusdt).

Limits: 24h; ping 5 min → pong within 15 min; 10 msg/s; max 200 streams.

Market: subscribe / unsubscribe

JSON: Subscribe {"method":"SUBSCRIBE","params":["btcusdt@aggTrade","btcusdt@depth"],"id":1} → {"result":null,"id":1}. Unsubscribe: UNSUBSCRIBE + params. List: LIST_SUBSCRIPTIONS. id = unsigned int.

Stream names (market)

StreamDescription
<symbol>@aggTradeAggregate trades (100ms)
<symbol>@depthDiff. book depth (250/500/100ms: @depth@500ms, @depth@100ms)
<symbol>@depth5, @depth10, @depth20Partial book depth
<symbol>@kline_<interval>Kline (e.g. 1m, 1h); interval as in REST
<symbol>@markPrice, <symbol>@markPrice@1sMark price (3s or 1s)
!markPrice@arr, !markPrice@arr@1sAll symbols mark price
<symbol>@miniTicker24h mini ticker (500ms)
!miniTicker@arrAll mini tickers (1000ms)
<symbol>@ticker24h ticker (500ms)
!ticker@arrAll tickers (1000ms)
<symbol>@bookTickerBest bid/ask (real-time)
!bookTickerAll book tickers
<symbol>@forceOrderLiquidation snapshot (1000ms)
!forceOrder@arrAll liquidations

User data stream

  1. Start: POST /fapi/v3/listenKey (signed) → { "listenKey": "..." }. If account already has active listenKey, same key returned and validity extended 60 min.
  2. Connect: wss://fstream.asterdex.com/ws/<listenKey>.
  3. Keepalive: PUT /fapi/v3/listenKey (signed) at least every &lt;60 min (e.g. every 30 min).
  4. Close: DELETE /fapi/v3/listenKey (signed).

User data events are not guaranteed in order during heavy load; order updates by event time E.

Events: ACCOUNT_UPDATE (balance/position), ORDER_TRADE_UPDATE, ACCOUNT_CONFIG_UPDATE (leverage, multi-asset, position mode), MARGIN_CALL, listenKeyExpired.

Order book sync (depth stream)

  1. Connect to btcusdt@depth (or combined).
  2. Buffer incoming events.
  3. Get snapshot: GET /fapi/v3/depth?symbol=BTCUSDT&limit=1000.
  4. Drop events with u &lt; snapshot lastUpdateId.
  5. First valid event: U ≤ lastUpdateId and u ≥ lastUpdateId.
  6. Then each event’s pu must equal previous event’s u; else re-sync from step 3.
  7. Quantity in events is absolute; quantity 0 means remove that price level.

Payload shapes: reference.md.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
56
Repository forks
9
7-day trend score
20

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 16 Mar 2026, 7 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/asterdex/aster-skills-hub/aster-api-websocket-v3/badge)](https://verified-skill.com/skills/asterdex/aster-skills-hub/aster-api-websocket-v3)

Something wrong with this skill or its page? Tell us.