For the complete documentation index, see llms.txt. This page is also available as Markdown.

WebSocket

Real-time market data and account updates via WebSocket.

Persistent connection for real-time orderbook, kline, ticker, trades, and account state updates.

WebSocket operations are JSON messages sent over an open WebSocket connection. They are not HTTP POST requests.

Environment
URL

Mainnet

wss://ws.afx.xyz/ws/dex

Testnet

wss://ws-testnet.afx.xyz/ws/dex

Python SDK Examples

The official SDK repository includes runnable WebSocket examples:

Last updated