/ws/v5/business), which is separate from the private channel used for regular order management. WebsocketAPIClient routes spread methods to the correct channel automatically.
Spread trading is available on the global OKX platform (
www.okx.com). Make sure
your account has spread trading enabled before using these methods.submitSpreadOrder()
Place a new spread order.Parameters
Response
Example
amendSpreadOrder()
Amend the price or quantity of an open spread order.Parameters
Response
Example
cancelSpreadOrder()
Cancel an open spread order by order ID or client order ID.Parameters
Response
Example
massCancelSpreadOrders()
Cancel all open spread orders, optionally filtered by spread instrument ID.Parameters
data[0].result is true when the mass cancel was accepted.
Example
Using the business channel directly
If you need lower-level access, spread operations useWS_KEY_MAP.prodBusiness (or the equivalent demo/regional key). You can call sendWSAPIRequest() on the underlying WebsocketClient directly:

