Subscribe to OKX public exchange WebSocket channels through UXC raw WebSocket mode for ticker, trade, book, and candle events with explicit subscribe frames.
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.
uxc is installed and available in PATH.This skill covers OKX public exchange channels such as:
This skill does not cover:
Use the OKX public WebSocket endpoint:
wss://ws.okx.com:8443/ws/v5/publicOKX public channels require a subscribe frame after connect, for example:
{"op":"subscribe","args":[{"channel":"tickers","instId":"BTC-USDT"}]}
uxc subscribe start wss://ws.okx.com:8443/ws/v5/public --transport websocket --init-frame '{"op":"subscribe","args":[{"channel":"tickers","instId":"BTC-USDT"}]}' --sink file:$HOME/.uxc/subscriptions/okx-btcusdt-ticker.ndjsontail -n 5 $HOME/.uxc/subscriptions/okx-btcusdt-ticker.ndjsonuxc subscribe listuxc subscribe status <job_id>uxc subscribe stop <job_id>{"op":"subscribe","args":[{"channel":"tickers","instId":"BTC-USDT"}]}{"op":"subscribe","args":[{"channel":"trades","instId":"BTC-USDT"}]}{"op":"subscribe","args":[{"channel":"books5","instId":"BTC-USDT"}]}{"op":"subscribe","args":[{"channel":"candle1m","instId":"BTC-USDT"}]}The following live raw WebSocket flow has been validated successfully through uxc:
wss://ws.okx.com:8443/ws/v5/public--transport websocket{"op":"subscribe","args":[{"channel":"tickers","instId":"BTC-USDT"}]}Observed sink behavior:
opendata event for subscription acknowledgementdata events carrying ticker payloads under:
arg.channelarg.instIddata[0].lastdata[0].bidPxdata[0].askPxdata[0].ts--text.event_kind, data, meta.--transport websocket for this skill.--init-frame is required because OKX public channels are multiplexed behind one endpoint.instId values use OKX instrument naming such as BTC-USDT.uxc subscribe start ... --transport websocket is the intended execution path for this skill; uxc link is not the main interface because channel selection lives in the subscribe frame.references/usage-patterns.md