The Websockets API uses the state-of-the-art WebSockets protocol to allow fast, two-way messaging between client programs and trading services.

To open a connection to WebSocket service (in Javascript), do:

var ws = new WebSocket('wss://');
where app_id is your Application ID obtained as described in the API guide.

For languages other than JavaScript, view code samples.

You can now send data up and down the websocket using any of the messages described in the API playground.

Note: to receive responses where English text has been translated to another language, append the language code to the connection URL as follows:

var ws = new WebSocket('wss://');

Data transfer in both directions is done with structured JSON-encoded data. All field name identifiers, and most field values, will be double-quoted in the encoded data. The same applies to receiving messages: each message is a serialized JSON-encoded string.