Skip to main content

Taiwan order-update WebSocket

GET

{BASE_URL}/tw/websocket

Connect to wss://{BASE_URL}/tw/websocket with the X-API-KEY header. The key is checked before the upgrade: a missing or invalid key gets an HTTP 401 error body instead of a WebSocket. Read-only keys may connect. Browser clients whose Origin host differs from the API host are refused with HTTP 403.

Which updates you receive. A connection receives updates for every Taiwan order whose receiving initiator is the API client that owns the key, across all of its accounts. The receiving initiator is the client that placed the order unless receiving_initiator was set; a modify keeps the original order's receiving initiator unless it sets a new one. Every open connection for the same client receives every update.

Messages. The server sends text frames shaped as {"message_type": "order_update", "message": {...}} and expects no messages from the client; a data frame from the client closes the connection with status 1008. The server sends a WebSocket ping every 30 seconds. Updates for the same order arrive in event order.

No replay. Updates are delivered only to connections open at that moment; missed updates are not re-sent. After reconnecting, reconcile with /tw/orders.

order_event values sent: new, partial_fill, fill, canceled, rejected, replaced, cancel_rejected, replace_rejected. AutoFX orders (coming soon) arrive as separate updates with order.parent_av_order_id set to the equity order's av_order_id.

Responses​

WebSocket upgraded.