Quickstart to Deriv API

Opening a connection

Use this code to open a connection to our WebSocket service (in Javascript):


copy code icon Copy
var ws = new WebSocket('wss://ws.binaryws.com/websockets/v3?app_id=XXX');

After opening a connection, you can send data through the WebSocket using the method calls from our API playground.
Data transfer in both directions is handled by structured JSON-encoded data. All field name identifiers and most field values are double-quoted in the encoded data. Each message is a serialized JSON-encoded string.

App ID

You’ll get your app ID when you register your app with us.

Code samples

See our code samples in languages other than JavaScript.

Multi-language support

To receive responses in other languages, add the language code to the connection URL:


copy code icon Copy
var ws = new WebSocket('wss://ws.binaryws.com/websockets/v3?app_id=XXX&l=RU');