diff --git a/docs/core-concepts/websocket/index.md b/docs/core-concepts/websocket/index.md index b3207db4..f343f332 100644 --- a/docs/core-concepts/websocket/index.md +++ b/docs/core-concepts/websocket/index.md @@ -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 @@ -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'); diff --git a/docs/languages/javascript/get-country-list/index.md b/docs/languages/javascript/get-country-list/index.md index e60c4b02..0384d707 100644 --- a/docs/languages/javascript/get-country-list/index.md +++ b/docs/languages/javascript/get-country-list/index.md @@ -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; diff --git a/docs/languages/javascript/websocket-connection/index.md b/docs/languages/javascript/websocket-connection/index.md index 66888242..55557838 100644 --- a/docs/languages/javascript/websocket-connection/index.md +++ b/docs/languages/javascript/websocket-connection/index.md @@ -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 @@ -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; diff --git a/examples/active_symbols/index.js b/examples/active_symbols/index.js index 4a349200..8effda29 100644 --- a/examples/active_symbols/index.js +++ b/examples/active_symbols/index.js @@ -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. diff --git a/examples/contracts_for_symbol/index.js b/examples/contracts_for_symbol/index.js index 2794c84b..b1abe44d 100644 --- a/examples/contracts_for_symbol/index.js +++ b/examples/contracts_for_symbol/index.js @@ -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 = { diff --git a/examples/keep_alive/index.js b/examples/keep_alive/index.js index 2bdc4395..e3f49881 100644 --- a/examples/keep_alive/index.js +++ b/examples/keep_alive/index.js @@ -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 }); diff --git a/examples/proposal/index.js b/examples/proposal/index.js index 8aeb5c60..98f5fc41 100644 --- a/examples/proposal/index.js +++ b/examples/proposal/index.js @@ -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 = { diff --git a/examples/ticks/index.js b/examples/ticks/index.js index f57cf777..3ac15090 100644 --- a/examples/ticks/index.js +++ b/examples/ticks/index.js @@ -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' }); diff --git a/examples/ticks_history/index.js b/examples/ticks_history/index.js index 6ebc51d4..8876aca0 100644 --- a/examples/ticks_history/index.js +++ b/examples/ticks_history/index.js @@ -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 = { diff --git a/examples/website_status/index.js b/examples/website_status/index.js index b9a086e0..582fa0b6 100644 --- a/examples/website_status/index.js +++ b/examples/website_status/index.js @@ -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) => {