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

Commit 9bc76e4

Browse files
authored
Merge pull request #210 from hubert-deriv/reverting_tag_20230712_0
2 parents 2c6ee77 + 24a7415 commit 9bc76e4

File tree

22 files changed

+24
-31
lines changed

22 files changed

+24
-31
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://red.binaryws.com/websockets/v3?app_id=1089');
28+
let socket = new WebSocket('wss://ws.binaryws.com/websockets/v3?app_id=1089');
2929
```
3030

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

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

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

docs/guides/markup-calculation/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ description: How is markup calculated?
2121

2222
## Markup
2323

24-
Increase your earnings by charging markups on each contract purchased through the trading app you've created with the Deriv API. The markup is defined by you and can be up to 3%.
24+
Increase your earnings by charging markups on each contract purchased through the trading app you've created with the Deriv API. The markup is defined by you and can be up to 5%.
2525

2626
Below is an example of how the markup is calculated.
2727

docs/intro.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ keywords:
1616
description: Getting started with Deriv API
1717
---
1818

19-
:::danger
20-
Kindly be informed that due to recent API usage guidelines, all third-party apps communications must use Deriv's API red servers at the following address
21-
`red.binaryws.com`.
22-
This restriction will be applied after 7 days and any traffic to the other servers from third-party apps will be rejected.
23-
Please take the necessary action before the effective date.
24-
:::
25-
2619
Our Documentation is divided in several sections:
2720

2821
- [Core concepts](category/core-concepts)

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"
147147
const app_id = 1089; // Replace with your app_id or leave as 1089 for testing.
148-
const websocket = new WebSocket(`wss://red.binaryws.com/websockets/v3?app_id=${app_id}`);
148+
const websocket = new WebSocket(`wss://ws.binaryws.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"
2626
const app_id = 1089; // Replace with your app_id or leave as 1089 for testing.
27-
const websocket = new WebSocket(`wss://red.binaryws.com/websockets/v3?app_id=${app_id}`);
27+
const websocket = new WebSocket(`wss://ws.binaryws.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"
149149
const app_id = 1089; // Replace with your app_id or leave as 1089 for testing.
150-
const websocket = new WebSocket(`wss://red.binaryws.com/websockets/v3?app_id=${app_id}`);
150+
const websocket = new WebSocket(`wss://ws.binaryws.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://red.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.binaryws.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://red.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.binaryws.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://red.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.binaryws.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://red.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.binaryws.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://red.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.binaryws.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://red.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.binaryws.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://red.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.binaryws.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 = '';

examples/portfolio/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 = 32445; // Replace with your app_id or leave as 1089 for testing.
4-
const connection = new WebSocket(`wss://red.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.binaryws.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 = '';

examples/profit_table/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 = 32450; // Replace with your app_id or leave as 1089 for testing.
4-
const connection = new WebSocket(`wss://red.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.binaryws.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 = '';

examples/proposal/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://red.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.binaryws.com/websockets/v3?app_id=${app_id}`);
55
const api = new DerivAPIBasic({ connection });
66

77
const proposal_request = {

examples/statement/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 = 32462; // Replace with your app_id or leave as 1089 for testing.
4-
const connection = new WebSocket(`wss://red.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.binaryws.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 = '';

examples/ticks/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://red.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.binaryws.com/websockets/v3?app_id=${app_id}`);
55
const api = new DerivAPIBasic({ connection });
66
const tickStream = () => api.subscribe({ ticks: 'R_100' });
77

examples/ticks_history/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://red.binaryws.com/websockets/v3?app_id=${app_id}`);
4+
const connection = new WebSocket(`wss://ws.binaryws.com/websockets/v3?app_id=${app_id}`);
55
const api = new DerivAPIBasic({ connection });
66

77
const ticks_history_request = {

examples/website_status/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import DerivAPIBasic from 'https://cdn.skypack.dev/@deriv/deriv-api';
22
const app_id = 1089; // Replace with your app_id or leave as 1089 for testing.
3-
const connection = new WebSocket(`wss://red.binaryws.com/websockets/v3?app_id=${app_id}`);
3+
const connection = new WebSocket(`wss://ws.binaryws.com/websockets/v3?app_id=${app_id}`);
44
const api = new DerivAPIBasic({ connection });
55

66
const websiteStatusResponse = async (res) => {

src/features/dashboard/components/AppForm/__tests__/app-form.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ describe('App Form', () => {
158158
await userEvent.click(submitButton);
159159

160160
const appMarkupPercentageError = await screen.findByText(
161-
'Your markup value must be equal to or above 0.00 and no more than 3.00.',
161+
'Your markup value must be equal to or above 0.00 and no more than 5.00.',
162162
);
163163

164164
expect(appMarkupPercentageError).toBeInTheDocument();

src/features/dashboard/components/AppForm/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ const AppForm = ({
163163
<label htmlFor='app_markup_percentage'>Markup percentage (optional)</label>
164164
</div>
165165
<Text as='p' type='paragraph-1' className={styles.helperText}>
166-
Enter 0 if you don&lsquo;t want to earn a markup. Max markup: 3%
166+
Enter 0 if you don&lsquo;t want to earn a markup. Max markup: 5%
167167
</Text>
168168
{errors && errors?.app_markup_percentage && (
169169
<Text as='span' type='paragraph-1' className='error-message'>

src/features/dashboard/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as yup from 'yup';
22

3-
const markupPercentageRegex = /^((([0-2]\.([0-9]([0-9])?)?))||([3]\.([0]([0])?)?)||([0-3]))$/;
3+
const markupPercentageRegex = /^((([0-4]\.([0-9]([0-9])?)?))||([5]\.([0]([0])?)?)||([0-5]))$/;
44
const urlRegex = /^[a-z][a-z0-9.+-]*:\/\/[0-9a-zA-Z.-]+[%/\w .-]*$/;
55

66
const base_schema = {
@@ -34,7 +34,7 @@ const base_schema = {
3434
.max(4, 'Your markup value cannot be more than 4 characters.')
3535
.matches(
3636
markupPercentageRegex,
37-
'Your markup value must be equal to or above 0.00 and no more than 3.00.',
37+
'Your markup value must be equal to or above 0.00 and no more than 5.00.',
3838
),
3939
app_id: yup.number(),
4040
};

0 commit comments

Comments
 (0)