← ClaudeAtlas

strike-websocketlisted

Live Strike Finance data over WebSocket - the public price stream (mark price, depth updates, trades, klines) and the authenticated user stream (order fills, position and balance updates) - plus how to run a watch process on the desk computer, keep a local order book in sync, supervise it with a heartbeat, and tell a dead feed apart from a quiet market. Use for monitoring, alert conditions and watching a live position. Read-only.
Mendurim/strikegrok-trading-desk · ★ 0 · AI & Automation · score 75
Install: claude install-skill Mendurim/strikegrok-trading-desk
# Strike WebSocket Polling is fine for a brief. A watch that must notice something within seconds uses a stream. | Stream | URL | Auth | | --- | --- | --- | | Public price | `wss://api.strikefinance.org/ws/price` | none | | User | `wss://api.strikefinance.org/ws/user-api` | yes | The public stream carries mark price, depth updates, trades and klines. The user stream carries order fills, position and balance updates for the account. ## 1. The rule that matters most **Silence is not information.** A watch reporting "no alert" on a socket that died two hours ago looks exactly like a calm market. Every watch on this desk must be able to tell the two apart, and must say which it has. Concretely, a watch process: - Records the UTC time of the **last message of any kind**, not just the last matching one. - Has a staleness threshold. Past it, the watch reports `unavailable`, not "condition did not fire". - Reconnects with backoff, and logs every disconnect and reconnect with times. - On reconnect, re-reads state from REST or the MCP rather than assuming nothing happened while it was away. A watch that cannot meet those four is not run. ## 2. Keeping a local order book in sync `/v2/depth` gives the snapshot; the stream gives deltas. The documented procedure: 1. Fetch `/v2/depth?symbol=BTC-USD&limit=1000` and record `lastUpdateId`. 2. Connect and subscribe to `{symbol}@depth`. 3. Drop any `depthUpdate` whose `u <= lastUpdateId`. 4. Apply everything after that. Per-symbol `+