Thanks to visit codestin.com
Credit goes to github.com

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

Commit e64a60b

Browse files
author
nobody
committed
JSON Schema Update
1 parent c25449a commit e64a60b

File tree

4 files changed

+260
-0
lines changed

4 files changed

+260
-0
lines changed

_data/v3.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,5 +233,7 @@ groups:
233233
title: Verify Email
234234
- name: verify_email_cellxpert
235235
title: Verify Email Cellxpert
236+
- name: website_config
237+
title: Server Config
236238
- name: website_status
237239
title: Server Status

config/v3/website_config/example.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"website_config": 1
3+
}

config/v3/website_config/receive.json

Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Server Config (response)",
4+
"description": "All config related settings.",
5+
"type": "object",
6+
"required": [
7+
"echo_req",
8+
"msg_type"
9+
],
10+
"properties": {
11+
"website_config": {
12+
"title": "website_config",
13+
"description": "Server status and other information regarding general settings",
14+
"type": "object",
15+
"additionalProperties": false,
16+
"required": [
17+
"currencies_config"
18+
],
19+
"properties": {
20+
"currencies_config": {
21+
"description": "Available currencies and their information",
22+
"type": "object",
23+
"minProperties": 1,
24+
"patternProperties": {
25+
"^[a-zA-Z0-9]{2,20}$": {
26+
"description": "Currency code",
27+
"type": "object",
28+
"additionalProperties": false,
29+
"required": [
30+
"fractional_digits",
31+
"is_deposit_suspended",
32+
"is_suspended",
33+
"is_withdrawal_suspended",
34+
"stake_default",
35+
"transfer_between_accounts",
36+
"type"
37+
],
38+
"properties": {
39+
"fractional_digits": {
40+
"description": "Number of fractional digits.",
41+
"type": "number"
42+
},
43+
"is_deposit_suspended": {
44+
"description": "Current status for payment deposit for the currency",
45+
"type": "number",
46+
"enum": [
47+
0,
48+
1
49+
]
50+
},
51+
"is_suspended": {
52+
"description": "Current status for the currency",
53+
"type": "number",
54+
"enum": [
55+
0,
56+
1
57+
]
58+
},
59+
"is_withdrawal_suspended": {
60+
"description": "Current status for payment withdrawal for the currency",
61+
"type": "number",
62+
"enum": [
63+
0,
64+
1
65+
]
66+
},
67+
"name": {
68+
"description": "Name of the currency.",
69+
"type": "string"
70+
},
71+
"stake_default": {
72+
"description": "Default stake value for the currency.",
73+
"type": "number",
74+
"minimum": 0
75+
},
76+
"transfer_between_accounts": {
77+
"description": "Fees and range of allowed amount for transfer between accounts with different types of currencies.",
78+
"type": "object",
79+
"additionalProperties": false,
80+
"required": [
81+
"fees",
82+
"limits"
83+
],
84+
"properties": {
85+
"fees": {
86+
"description": "The fee that applies for transfer between accounts with different types of currencies.",
87+
"type": "object",
88+
"patternProperties": {
89+
"^[a-zA-Z0-9]{2,20}$": {
90+
"description": "Currency code.",
91+
"type": "number",
92+
"maximum": 7,
93+
"minimum": 0
94+
}
95+
}
96+
},
97+
"limits": {
98+
"description": "Range of allowed amount for transfer between accounts.",
99+
"oneOf": [
100+
{
101+
"type": "object",
102+
"required": [
103+
"min"
104+
],
105+
"properties": {
106+
"max": {
107+
"description": "Maximum allowed amount for transfer between accounts with different types of currencies.",
108+
"type": "number",
109+
"minimum": 0
110+
},
111+
"min": {
112+
"description": "Minimum allowed amount for transfer between accounts with different types of currencies.",
113+
"type": "number",
114+
"minimum": 0
115+
}
116+
}
117+
},
118+
{
119+
"type": "null"
120+
}
121+
]
122+
},
123+
"limits_ctrader": {
124+
"description": "Range of allowed amount for transfer between ctrader accounts.",
125+
"type": "object"
126+
},
127+
"limits_derivez": {
128+
"description": "Range of allowed amount for transfer between derivez accounts.",
129+
"type": "object"
130+
},
131+
"limits_dxtrade": {
132+
"description": "Range of allowed amount for transfer between dxtrade accounts.",
133+
"type": "object"
134+
},
135+
"limits_mt5": {
136+
"description": "Range of allowed amount for transfer between mt5 accounts.",
137+
"type": "object"
138+
}
139+
}
140+
},
141+
"type": {
142+
"description": "Type of the currency.",
143+
"type": "string",
144+
"enum": [
145+
"fiat",
146+
"crypto"
147+
]
148+
}
149+
}
150+
}
151+
}
152+
},
153+
"feature_flags": {
154+
"description": "Feature flags related to the website/server for various features and options: \n - 'signup_with_optional_email_verification': Allow signup with optional email verification.",
155+
"type": "array",
156+
"items": {
157+
"type": "string"
158+
}
159+
},
160+
"payment_agents": {
161+
"description": "Payments Agents system settings.",
162+
"type": "object",
163+
"additionalProperties": false,
164+
"required": [
165+
"initial_deposit_per_country"
166+
],
167+
"properties": {
168+
"initial_deposit_per_country": {
169+
"description": "Initial deposit requirement per country.",
170+
"type": "object",
171+
"patternProperties": {
172+
"^([a-z]{2}|default)$": {
173+
"description": "Country code or default setting",
174+
"type": "number"
175+
}
176+
}
177+
}
178+
}
179+
},
180+
"supported_languages": {
181+
"description": "Provides codes for languages supported.",
182+
"type": "array",
183+
"items": {
184+
"type": "string"
185+
}
186+
},
187+
"terms_conditions_version": {
188+
"description": "Latest terms and conditions version.",
189+
"type": "string"
190+
}
191+
}
192+
},
193+
"subscription": {
194+
"title": "Subscription information",
195+
"description": "For subscription requests only.",
196+
"type": "object",
197+
"additionalProperties": false,
198+
"required": [
199+
"id"
200+
],
201+
"properties": {
202+
"id": {
203+
"description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.",
204+
"type": "string",
205+
"examples": [
206+
"c84a793b-8a87-7999-ce10-9b22f7ceead3"
207+
]
208+
}
209+
}
210+
},
211+
"echo_req": {
212+
"description": "Echo of the request made.",
213+
"type": "object"
214+
},
215+
"msg_type": {
216+
"description": "Action name of the request made.",
217+
"type": "string",
218+
"enum": [
219+
"website_config"
220+
]
221+
},
222+
"req_id": {
223+
"description": "Optional field sent in request to map to response, present only when request contains `req_id`.",
224+
"type": "integer"
225+
}
226+
}
227+
}

config/v3/website_config/send.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Server Config (request)",
4+
"description": "Request server config.",
5+
"type": "object",
6+
"auth_required": 0,
7+
"additionalProperties": false,
8+
"required": [
9+
"website_config"
10+
],
11+
"properties": {
12+
"website_config": {
13+
"description": "Must be `1`",
14+
"type": "integer",
15+
"enum": [
16+
1
17+
]
18+
},
19+
"passthrough": {
20+
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.",
21+
"type": "object"
22+
},
23+
"req_id": {
24+
"description": "[Optional] Used to map request to response.",
25+
"type": "integer"
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)