- Home
- Skills
- Web3 & Crypto
- Port a WebSocket Order-Book Listener to a New Exchange
Port a WebSocket Order-Book Listener to a New Exchange
What is inside (one SKILL.md, no scripts): - Checking what a half-finished port already contains before writing anything.
$5
What it does
- Ports a WebSocket market-data listener (books and trades) to a new exchange
- Verifies the protocol against primary docs: snapshots, sequence gaps, keepalive, subscribe limits
- Normalises renames before diffing so only real undocumented divergences count as gaps
Port a WebSocket Order-Book Listener to a New Exchange
Example session with this skill installed
Add an OKX order-book listener, modelled on our Bybit one. How do you start and what do you check before writing code?
- Read your context and instructions
- Compiled the port a websocket
Example on a fictional setup (reference listener: bybit-listener, target: okx-listener).
- Inventory first: the repo already holds a module file, a Makefile and a half-written book data structure with no WS wiring. Read those before writing anything; they encode earlier decisions.
- Read the Bybit listener in full, tests included. The tests encode envelope shapes, pong frames and undesired-symbol drops.
- Protocol check against OKX primary docs, one line each with a quote: snapshot then incremental updates, checksum or sequence rule for gap detection, keepalive (a literal ping string every N seconds, not a WS ping frame), maximum subscriptions per connection and per second.
- Design finding to review before code: an active resync on gap would refire on every inbound frame for a still-gapped symbol and burn the subscribe budget in a correlated-gap event. Decision: resync is rate-limited per symbol with a cooldown.
- I write the core exchange package myself and prove it with unit tests plus a Linux cross-build (shared memory is Unix-only). The playground, recorder and soak tools are mechanical and go to parallel workers once that package compiles.
- Final gates are run unpiped with the exit code echoed.
Open question for you: which category label your fleet uses for the last-price socket.
Connects securely to your tools. The creator never sees your data.
About this skill
Adding an exchange to a fleet of market-data listeners goes wrong in quiet ways: a keepalive that does not match, a snapshot/delta rule copied from the wrong venue, a resync path that burns the subscribe budget. This skill is the order of work that avoids them.
What is inside (one SKILL.md, no scripts):
- Checking what a half-finished port already contains before writing anything.
- Reading the reference listener in full, because the sibling listeners are the spec for the handler interface and the stream architecture.
- A protocol checklist verified against the exchange's primary docs: snapshots, sequence gaps, keepalive, subscribe budgets.
- A review checkpoint after research and before code, with the real design bug this caught.
- Which part to write yourself (the core exchange package) and which mechanical tools to fan out to parallel workers.
- Cross-cutting gotchas that do not show in one file's diff (control-plane keys, last-price socket labels, process-manager environment injection).
- A final verification and report format that quotes exit codes, not piped output.
- Section 10, auditing a finished port: normalise renames before diffing, treat only undocumented divergences as gaps, partition audit dimensions, and run mechanical checks yourself.
Who it is for: engineers extending a multi-exchange market-data stack that uses a sibling-per-exchange architecture. The examples are Go and seqlocked shared memory, the method applies to any language. It is also part of the Crypto Exchange Connector Engineering Pack at a lower per-skill price.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 day ago
- Software
- Claude Codeora compatible agent runtimeGit and a shell
Git
An existing sibling listener to port from (examples are Go with shared memory).
Permissions
What's inside
Frequently Asked Questions
New in Web3 & Crypto
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Web3 & Crypto.