aster-api-spot-websocket-v1

WebSocket market + user data streams for Aster Spot API v1. Subscription model, stream names, listenKey (/api/v1/listenKey). Use when implementing real-time spot market or user events. listenKey = USER_STREAM; see aster-api-spot-auth-v1.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "aster-api-spot-websocket-v1" with this command: npx skills add asterdex/aster-skills-hub/asterdex-aster-skills-hub-aster-api-spot-websocket-v1

Aster Spot API WebSocket (v1)

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

Limits: Connection 24h; ping every 5 min → pong within 15 min; 5 msg/s; max 1024 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.

Stream names (market)

StreamDescription
<symbol>@aggTradeAggregate trades
<symbol>@tradeTick-by-tick trades
<symbol>@kline_<interval>Kline (e.g. 1m, 1h)
<symbol>@depth, @depth@100msDiff. book depth (1000ms or 100ms)
<symbol>@miniTicker24h mini ticker
!miniTicker@arrAll mini tickers
<symbol>@ticker24h ticker
!ticker@arrAll tickers
<symbol>@bookTickerBest bid/ask
!bookTickerAll book tickers

User data stream (USER_STREAM)

  1. Start: POST /api/v1/listenKey → { "listenKey": "..." } (existing key extended 60 min). API key in header.
  2. Connect: wss://sstream.asterdex.com/ws/<listenKey>.
  3. Keepalive: PUT /api/v1/listenKey with listenKey (e.g. every 30 min).
  4. Close: DELETE /api/v1/listenKey with listenKey.

Events: outboundAccountPosition (balance), executionReport (order update).

Order book sync (depth)

  1. Subscribe to <symbol>@depth; buffer events.
  2. Snapshot: GET /api/v1/depth?symbol=SYMBOL&limit=1000.
  3. Discard events with u ≤ lastUpdateId; first valid: U ≤ lastUpdateId+1 and u ≥ lastUpdateId+1.
  4. Each event: pu = previous u; else re-sync. Qty absolute; 0 = remove level.

Payload shapes: reference.md.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

aster-api-market-data-v3

No summary provided by upstream source.

Repository SourceNeeds Review
General

aster-api-account-v3

No summary provided by upstream source.

Repository SourceNeeds Review
General

aster-api-errors-v3

No summary provided by upstream source.

Repository SourceNeeds Review