Okx websocket

From jiayaoqijia/cryptoskill · View interactive version

Okx websocket is an AI agent skill from the GitHub repository jiayaoqijia/cryptoskill. Subscribe to OKX public exchange WebSocket channels through UXC raw WebSocket mode for ticker, trade, book, and candle events with explicit subscribe frames.

How to use this skill

Skill file

OKX Exchange WebSocket Skill

Use this skill to run OKX public exchange WebSocket channels through uxc subscribe raw WebSocket mode.

Reuse the uxc skill for generic runtime behavior, sink handling, and event-envelope parsing.

Prerequisites

Scope

This skill covers OKX public exchange channels such as:

This skill does not cover:

Endpoint Model

Use the OKX public WebSocket endpoint:

OKX public channels require a subscribe frame after connect, for example:

{"op":"subscribe","args":[{"channel":"tickers","instId":"BTC-USDT"}]}

Core Workflow

  1. Start a raw WebSocket subscription:
  1. Inspect sink output:
  1. Query runtime status:
  1. Stop the job when finished:

Common Subscribe Frames

Runtime Validation

The following live raw WebSocket flow has been validated successfully through uxc:

Observed sink behavior:

Guardrails

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.