FAQ
View our code samples. You can use these code snippets in your app to open a connection to our WebSocket API service. Explore our API playground for the method calls you need for your app.
Simply copy our open-source code and adapt it for your needs. Follow these steps to get started:
- Open a GitHub account.
- Download the GitHub Desktop application.
- Fork any of our open-source front-end repositories.
- Make the code changes in your fork.
- Publish your fork using the GitHub Pages facility.
- For SSL and website acceleration for your app, open a free account on Cloudflare.
Sure! You may hire developers who are familiar with JavaScript and WebSocket technology to build your app for you.
Yes! Follow these steps:
- Sign up as an affiliate.
- Insert your affiliate token into the
new_account_virtual
call in your app.
Here are some ways:
- Sign up as a payment agent to process local payments for our clients in your country.
You may automate your payment agent facility using the
paymentagent_transfer
API call. - If you are prepared to offer higher contract prices than ours, you may add a markup percentage when you register your app. This is a percentage of contract payouts, and it’s added to all contract prices in your app. At every month-end, the aggregate markup is paid to you. Sign up as our affiliate and contact your Affiliate Manager to learn more.
Copy trading allows a client (the Copier) to automatically copy the trades of another client (the Trader).
To allow others to copy your trades, set the ‘allow_copiers’ setting via the set settings call.
The Trader may create a read-only API token and provide it to the Copier.
Enabling ‘allow_copiers’ will also make the copytrading statistics call available. The statistics call provides the information about an account. This is so that potential copiers have an idea about the trader’s past performance.
To start copying, use the copy start call. To stop copying, use copy stop.
Use the website status call to check whether the website is online or not.
This JavaScript code opens a WebSocket and makes a subscription for server status notifications. When a message is received, it sends the website status message, if available:
const WebSocket = require('ws'); const ws = new WebSocket('wss://ws.binaryws.com/websockets/v3?l=EN&app_id=1089'); ws.on('open', function open() { ws.send(JSON.stringify({ website_status: 1, subscribe: 1 })); }); ws.on('message', function incoming(data) { data = JSON.parse(data); console.log('website status: %s', data.website_status.site_status); if (data.website_status.message) { console.log('status message: %s', data.website_status.message); } });