forked from binary-com/deriv-mockserver
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathget-limits.api.ts
More file actions
45 lines (42 loc) · 1.29 KB
/
get-limits.api.ts
File metadata and controls
45 lines (42 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { GenericRequest, InterceptedAPIHandler } from '../types/base.type';
export const getLimits = async ({ data, ws }: InterceptedAPIHandler) => {
const { req_id } = data as GenericRequest;
const response = {
get_limits: {
daily_transfers: {
ctrader: {
allowed: '50000.00',
available: '49500.00',
minimum: '0.01',
},
derivez: {
allowed: '10000.00',
available: '9900.00',
limit_type: 'amount',
minimum: '0.01',
},
},
unverified_transfers: {
crypto_to_crypto: {
allowed: '200.00',
available: '100:00',
},
crypto_to_fiat: {
allowed: '500.00',
available: '500:00',
},
fiat_to_crypto: {
allowed: '1000.00',
available: '950.00',
},
},
},
echo_req: {
get_limits: '<not shown>',
req_id,
},
msg_type: 'authorize',
req_id,
};
ws.send(JSON.stringify(response));
};