name: mexc-futures-websocket description: MEXC Futures WebSocket workflows for public streams, private account/order/position streams, ping/pong, subscriptions, and depth maintenance.
MEXC Futures WebSocket
Workflow
Use this skill for streaming contract data and private futures events. Open references/streams.md only for exact stream names and lifecycle details.
- Use
wss://contract.mexc.com/edge. - Use public channels for market data and private channels only when the user has configured environment-variable credentials.
- For private auth code, use Futures REST signing rules and redact
ApiKey,Signature, and the secret. - Handle ping/pong and reconnects explicitly.
- Use REST snapshots plus WebSocket increments for order book maintenance.
- Treat compressed payload behavior as current-default for deal and depth streams.
- Use REST for initial assets/order books; private streams and depth streams are updates after snapshots.
- For balance/account snapshots, use
/mexc-futures-restquick commands and the REST skill lookup helper before opening REST or stream references.
Safety Rules
- Do not request API keys in chat. Use env vars and redact signed login payloads.
- Do not persist private stream auth tokens, signatures, or account event payloads to logs unless redacted.
- Reconnect with backoff and resubscribe idempotently.
- Rebuild order books from snapshot on any sequence gap.
- Respect endpoint and stream rate limits from the official docs.
Verification
Before production code, verify base URL, public auth requirements, current private login flow, and order-book gap recovery.