Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit ab1484d

Browse files
authored
Merge pull request #242 from hubert-deriv/update_sandbox_endpoint
2 parents 54c3e88 + 9fa154b commit ab1484d

File tree

19 files changed

+24
-24
lines changed

19 files changed

+24
-24
lines changed

docs/core-concepts/websocket/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ WebSocket is especially great for services that require continuous data exchange
2525
To open a WebSocket connection, we need to create `new WebSocket` using the special protocol `ws`or `wss` in the url. Here is how you can do that in `JavaScript`:
2626

2727
```js
28-
let socket = new WebSocket('wss://ws.binaryws.com/websockets/v3?app_id=1089');
28+
let socket = new WebSocket('wss://ws.derivws.com/websockets/v3?app_id=1089');
2929
```
3030

3131
:::caution
@@ -49,7 +49,7 @@ Here’s an example in `JavaScript`:
4949

5050
```js showLineNumbers
5151
const app_id = 1089; // Replace with your app_id or leave as 1089 for testing.
52-
const socket = new WebSocket(`wss://ws.binaryws.com/websockets/v3?app_id=${app_id}`);
52+
const socket = new WebSocket(`wss://ws.derivws.com/websockets/v3?app_id=${app_id}`);
5353

5454
socket.onopen = function (e) {
5555
console.log('[open] Connection established');

docs/languages/javascript/get-country-list/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Your final code will be:
145145

146146
```js title="index.js" showLineNumbers
147147
const app_id = 1089; // Replace with your app_id or leave as 1089 for testing.
148-
const websocket = new WebSocket(`wss://ws.binaryws.com/websockets/v3?app_id=${app_id}`);
148+
const websocket = new WebSocket(`wss://ws.derivws.com/websockets/v3?app_id=${app_id}`);
149149
const ping_interval = 12000; // it's in milliseconds, which equals to 120 seconds
150150
let interval;
151151

docs/languages/javascript/websocket-connection/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Next, we'll create a WebSocket connection to Deriv WebSocket Server as seen belo
2424

2525
```js title="index.js" showLineNumbers
2626
const app_id = 1089; // Replace with your app_id or leave as 1089 for testing.
27-
const websocket = new WebSocket(`wss://ws.binaryws.com/websockets/v3?app_id=${app_id}`);
27+
const websocket = new WebSocket(`wss://ws.derivws.com/websockets/v3?app_id=${app_id}`);
2828
```
2929

3030
:::info
@@ -147,7 +147,7 @@ Your final code should be:
147147

148148
```js title="index.js" showLineNumbers
149149
const app_id = 1089; // Replace with your app_id or leave as 1089 for testing.
150-
const websocket = new WebSocket(`wss://ws.binaryws.com/websockets/v3?app_id=${app_id}`);
150+
const websocket = new WebSocket(`wss://ws.derivws.com/websockets/v3?app_id=${app_id}`);
151151
const ping_interval = 12000; // it's in milliseconds, which equals to 120 seconds
152152
let interval;
153153

examples/active_symbols/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import DerivAPIBasic from 'https://cdn.skypack.dev/@deriv/deriv-api/dist/DerivAPIBasic';
22

33
const app_id = 1089; // Replace with your app_id or leave the current one for testing.
4-
const connection = new WebSocket(`wss://ws.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.derivws.com/websockets/v3?app_id=${app_id}`);
55
const api = new DerivAPIBasic({ connection });
66

77
// Currently gets all available symbols.

examples/balance/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import DerivAPIBasic from 'https://cdn.skypack.dev/@deriv/deriv-api/dist/DerivAPIBasic';
22

33
const app_id = 32404; // Replace with your app_id or leave the current one for testing.
4-
const connection = new WebSocket(`wss://ws.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.derivws.com/websockets/v3?app_id=${app_id}`);
55
const api = new DerivAPIBasic({ connection });
66

77
// WARNING: Be careful to not leak your token here in the sandbox.

examples/buy_contract/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import DerivAPIBasic from 'https://cdn.skypack.dev/@deriv/deriv-api/dist/DerivAPIBasic';
22

33
const app_id = 32436; // Replace with your app_id or leave the current test app_id.
4-
const connection = new WebSocket(`wss://ws.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.derivws.com/websockets/v3?app_id=${app_id}`);
55
const api = new DerivAPIBasic({ connection });
66

77
// Use a demo account token to test with demo currency.

examples/contracts_for_symbol/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import DerivAPIBasic from 'https://cdn.skypack.dev/@deriv/deriv-api/dist/DerivAPIBasic';
22

33
const app_id = 1089; // Replace with your app_id or leave the current test app_id.
4-
const connection = new WebSocket(`wss://ws.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.derivws.com/websockets/v3?app_id=${app_id}`);
55
const api = new DerivAPIBasic({ connection });
66

77
const contracts_for_symbol_request = {

examples/expired_contracts/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import DerivAPIBasic from 'https://cdn.skypack.dev/@deriv/deriv-api/dist/DerivAPIBasic';
22

33
const app_id = 32512; // Replace with your app_id or leave current one for testing.
4-
const connection = new WebSocket(`wss://ws.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.derivws.com/websockets/v3?app_id=${app_id}`);
55
const api = new DerivAPIBasic({ connection });
66

77
let token = '';

examples/keep_alive/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import DerivAPIBasic from 'https://cdn.skypack.dev/@deriv/deriv-api/dist/DerivAPIBasic';
22

33
const app_id = 1089; // Replace with your app_id or leave as 1089 for testing.
4-
const connection = new WebSocket(`wss://ws.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.derivws.com/websockets/v3?app_id=${app_id}`);
55

66
const api = new DerivAPIBasic({ connection });
77

examples/open_contracts/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import DerivAPIBasic from 'https://cdn.skypack.dev/@deriv/deriv-api/dist/DerivAPIBasic';
22

33
const app_id = 32486; // Replace with your app_id for testing.
4-
const connection = new WebSocket(`wss://ws.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.derivws.com/websockets/v3?app_id=${app_id}`);
55
const api = new DerivAPIBasic({ connection });
66
// WARNING: Be careful to not leak your token here in the sandbox.
77
let token = '';

0 commit comments

Comments
 (0)