Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/core-concepts/websocket/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ WebSocket is especially great for services that require continuous data exchange
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`:

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

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

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

socket.onopen = function (e) {
console.log('[open] Connection established');
Expand Down
2 changes: 1 addition & 1 deletion docs/languages/javascript/get-country-list/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Your final code will be:

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

Expand Down
4 changes: 2 additions & 2 deletions docs/languages/javascript/websocket-connection/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Next, we'll create a WebSocket connection to Deriv WebSocket Server as seen belo

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

:::info
Expand Down Expand Up @@ -147,7 +147,7 @@ Your final code should be:

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

Expand Down
2 changes: 1 addition & 1 deletion examples/active_symbols/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import DerivAPIBasic from 'https://cdn.skypack.dev/@deriv/deriv-api/dist/DerivAPIBasic';

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

// Currently gets all available symbols.
Expand Down
2 changes: 1 addition & 1 deletion examples/contracts_for_symbol/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import DerivAPIBasic from 'https://cdn.skypack.dev/@deriv/deriv-api/dist/DerivAPIBasic';

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

const contracts_for_symbol_request = {
Expand Down
2 changes: 1 addition & 1 deletion examples/keep_alive/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import DerivAPIBasic from 'https://cdn.skypack.dev/@deriv/deriv-api/dist/DerivAPIBasic';

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

const api = new DerivAPIBasic({ connection });

Expand Down
2 changes: 1 addition & 1 deletion examples/proposal/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import DerivAPIBasic from 'https://cdn.skypack.dev/@deriv/deriv-api/dist/DerivAPIBasic';

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

const proposal_request = {
Expand Down
2 changes: 1 addition & 1 deletion examples/ticks/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import DerivAPIBasic from 'https://cdn.skypack.dev/@deriv/deriv-api/dist/DerivAPIBasic';

const app_id = 1089; // Replace with your app_id or leave as 1089 for testing.
const connection = new WebSocket(`wss://ws.binaryws.com/websockets/v3?app_id=${app_id}`);
const connection = new WebSocket(`wss://ws.derivws.com/websockets/v3?app_id=${app_id}`);
const api = new DerivAPIBasic({ connection });
const tickStream = () => api.subscribe({ ticks: 'R_100' });

Expand Down
2 changes: 1 addition & 1 deletion examples/ticks_history/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import DerivAPIBasic from 'https://cdn.skypack.dev/@deriv/deriv-api/dist/DerivAPIBasic';

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

const ticks_history_request = {
Expand Down
2 changes: 1 addition & 1 deletion examples/website_status/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import DerivAPIBasic from 'https://cdn.skypack.dev/@deriv/deriv-api';
const app_id = 1089; // Replace with your app_id or leave as 1089 for testing.
const connection = new WebSocket(`wss://ws.binaryws.com/websockets/v3?app_id=${app_id}`);
const connection = new WebSocket(`wss://ws.derivws.com/websockets/v3?app_id=${app_id}`);
const api = new DerivAPIBasic({ connection });

const websiteStatusResponse = async (res) => {
Expand Down