Skip to content

Commit 7c651c5

Browse files
author
nobody
committed
JSON Schema Update
1 parent 95b4331 commit 7c651c5

File tree

10 files changed

+227
-768
lines changed

10 files changed

+227
-768
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"financial_assessment_questions": 1
3+
}
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Financial Assessment Questions (response)",
4+
"description": "Returns the questionnaire structure defining the financial assessment questions and logic",
5+
"type": "object",
6+
"required": [
7+
"echo_req",
8+
"msg_type"
9+
],
10+
"properties": {
11+
"financial_assessment_questions": {
12+
"title": "financial_assessment_questions",
13+
"description": "The financial assessment questionnaire structure",
14+
"type": "object",
15+
"additionalProperties": false,
16+
"properties": {
17+
"questions": {
18+
"description": "Object containing the questions and possible answers",
19+
"type": "object",
20+
"additionalProperties": false,
21+
"patternProperties": {
22+
"^[a-z_]+$": {
23+
"description": "Question object containing the question details and possible answers",
24+
"type": "object",
25+
"additionalProperties": false,
26+
"required": [
27+
"answers",
28+
"hide_if",
29+
"question",
30+
"type"
31+
],
32+
"properties": {
33+
"answers": {
34+
"description": "Array of possible answers for this question",
35+
"type": "array",
36+
"items": {
37+
"type": "object",
38+
"additionalProperties": false,
39+
"required": [
40+
"hide_if",
41+
"key",
42+
"next_node",
43+
"value"
44+
],
45+
"properties": {
46+
"hide_if": {
47+
"description": "Array of conditions that determine if this answer should be hidden",
48+
"type": "array",
49+
"items": {
50+
"type": "string"
51+
}
52+
},
53+
"key": {
54+
"description": "The key for the answer option",
55+
"type": "string"
56+
},
57+
"next_node": {
58+
"description": "The next question to show after this answer is selected",
59+
"type": [
60+
"null",
61+
"string"
62+
]
63+
},
64+
"value": {
65+
"description": "Display text for this answer option",
66+
"type": "string"
67+
}
68+
}
69+
}
70+
},
71+
"hide_if": {
72+
"description": "Conditions that determine if this question should be hidden",
73+
"type": "array",
74+
"items": {
75+
"type": "string"
76+
}
77+
},
78+
"question": {
79+
"description": "The question text to display",
80+
"type": "string"
81+
},
82+
"type": {
83+
"description": "The type of input required for this question",
84+
"type": "string",
85+
"enum": [
86+
"free_text",
87+
"single_choice",
88+
"multiple_choice"
89+
]
90+
}
91+
}
92+
}
93+
}
94+
},
95+
"version": {
96+
"description": "The version of the financial assessment questionnaire.",
97+
"type": "string"
98+
}
99+
}
100+
},
101+
"echo_req": {
102+
"description": "Echo of the request made.",
103+
"type": "object"
104+
},
105+
"msg_type": {
106+
"description": "Action name of the request made.",
107+
"type": "string",
108+
"enum": [
109+
"financial_assessment_questions"
110+
]
111+
},
112+
"req_id": {
113+
"description": "Optional field sent in request to map to response, present only when request contains `req_id`.",
114+
"type": "integer"
115+
}
116+
}
117+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Financial Assessment Questions (request)",
4+
"description": "This call gets the financial assessment questionnaire structure, which defines the questions, possible answers, and flow logic for the financial assessment form.",
5+
"type": "object",
6+
"auth_required": 1,
7+
"auth_scopes": [
8+
"read"
9+
],
10+
"additionalProperties": false,
11+
"required": [
12+
"financial_assessment_questions"
13+
],
14+
"properties": {
15+
"financial_assessment_questions": {
16+
"description": "Must be `1`",
17+
"type": "integer",
18+
"enum": [
19+
1
20+
]
21+
},
22+
"landing_company_short": {
23+
"description": "[Optional] The landing company the account.",
24+
"type": "string"
25+
},
26+
"version": {
27+
"description": "[Optional] The version of the financial assessment questionnaire.",
28+
"type": "string"
29+
},
30+
"loginid": {
31+
"description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.",
32+
"type": "string",
33+
"pattern": "^[A-Za-z]+[0-9]+$"
34+
},
35+
"passthrough": {
36+
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.",
37+
"type": "object"
38+
},
39+
"req_id": {
40+
"description": "[Optional] Used to map request to response.",
41+
"type": "integer"
42+
}
43+
}
44+
}

config/v3/get_financial_assessment/receive.json

Lines changed: 6 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -14,162 +14,28 @@
1414
"type": "object",
1515
"additionalProperties": false,
1616
"properties": {
17-
"account_turnover": {
18-
"description": "The anticipated account turnover",
19-
"type": "string"
20-
},
21-
"binary_options_trading_experience": {
22-
"description": "Binary options trading experience",
23-
"type": "string"
24-
},
25-
"binary_options_trading_frequency": {
26-
"description": "Binary options trading frequency",
27-
"type": "string"
28-
},
29-
"cfd_experience": {
30-
"description": "How much experience do you have in CFD trading?",
31-
"type": "string"
32-
},
33-
"cfd_frequency": {
34-
"description": "How many CFD trades have you placed in the past 12 months?",
35-
"type": "string"
36-
},
3717
"cfd_score": {
3818
"description": "CFD Score",
3919
"type": "integer"
4020
},
41-
"cfd_trading_definition": {
42-
"description": "In your understanding, CFD trading allows you to:",
43-
"type": "string"
44-
},
45-
"cfd_trading_experience": {
46-
"description": "CFDs trading experience",
47-
"type": "string"
48-
},
49-
"cfd_trading_frequency": {
50-
"description": "CFDs trading frequency",
51-
"type": "string"
52-
},
53-
"commodities_trading_experience": {
54-
"description": "Commodities trading experience",
55-
"type": "string"
56-
},
57-
"commodities_trading_frequency": {
58-
"description": "Commodities trading frequency",
59-
"type": "string"
60-
},
61-
"education_level": {
62-
"description": "Level of Education",
63-
"type": "string"
64-
},
65-
"employment_industry": {
66-
"description": "Industry of Employment",
67-
"type": "string"
68-
},
69-
"employment_status": {
70-
"description": "Employment Status",
71-
"type": "string"
72-
},
73-
"estimated_worth": {
74-
"description": "Estimated Net Worth",
75-
"type": "string"
76-
},
7721
"financial_information_score": {
7822
"description": "Financial Information Score",
7923
"type": "integer"
8024
},
81-
"forex_trading_experience": {
82-
"description": "Forex trading experience",
83-
"type": "string"
84-
},
85-
"forex_trading_frequency": {
86-
"description": "Forex trading frequency",
87-
"type": "string"
88-
},
89-
"income_source": {
90-
"description": "Income Source",
91-
"type": "string"
92-
},
93-
"indices_trading_experience": {
94-
"description": "Indices trading experience",
95-
"type": "string"
96-
},
97-
"indices_trading_frequency": {
98-
"description": "Indices trading frequency",
99-
"type": "string"
100-
},
101-
"leverage_impact_trading": {
102-
"description": "How does leverage affect CFD trading?",
103-
"type": "string"
104-
},
105-
"leverage_trading_high_risk_stop_loss": {
106-
"description": "Leverage trading is high-risk, so it's a good idea to use risk management features such as stop loss. Stop loss allows you to",
107-
"type": "string"
108-
},
109-
"net_income": {
110-
"description": "Net Annual Income",
111-
"type": "string"
112-
},
113-
"occupation": {
114-
"description": "Occupation",
115-
"type": "string"
116-
},
117-
"other_derivatives_trading_experience": {
118-
"description": "Trading experience in other financial derivatives",
119-
"type": "string"
120-
},
121-
"other_derivatives_trading_frequency": {
122-
"description": "Trading frequency in other financial derivatives",
123-
"type": "string"
124-
},
125-
"other_instruments_trading_experience": {
126-
"description": "Trading experience in other financial instruments",
127-
"type": "string"
128-
},
129-
"other_instruments_trading_frequency": {
130-
"description": "Trading frequency in other financial instruments",
131-
"type": "string"
132-
},
133-
"required_initial_margin": {
134-
"description": "When would you be required to pay an initial margin?",
135-
"type": "string"
136-
},
137-
"risk_tolerance": {
138-
"description": "Do you understand that you could potentially lose 100% of the money you use to trade?",
139-
"type": "string"
140-
},
141-
"source_of_experience": {
142-
"description": "How much knowledge and experience do you have in relation to online trading?",
143-
"type": "string"
144-
},
145-
"source_of_wealth": {
146-
"description": "Source of wealth",
147-
"type": "string"
148-
},
149-
"stocks_trading_experience": {
150-
"description": "Stocks trading experience",
151-
"type": "string"
152-
},
153-
"stocks_trading_frequency": {
154-
"description": "Stocks trading frequency",
155-
"type": "string"
156-
},
15725
"total_score": {
15826
"description": "Total Score",
15927
"type": "integer"
16028
},
161-
"trading_experience_financial_instruments": {
162-
"description": "How much experience do you have with other financial instruments?",
163-
"type": "string"
164-
},
165-
"trading_frequency_financial_instruments": {
166-
"description": "How many trades have you placed with other financial instruments in the past 12 months?",
167-
"type": "string"
168-
},
16929
"trading_score": {
17030
"description": "Trading Experience Score",
17131
"type": "integer"
17232
}
33+
},
34+
"patternProperties": {
35+
".*": {
36+
"description": "Any property with a non-empty string or integer value",
37+
"type": "string"
38+
}
17339
}
17440
},
17541
"echo_req": {

config/v3/get_settings/receive.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,7 @@
120120
},
121121
"employment_status": {
122122
"description": "Employment Status.",
123-
"type": "string",
124-
"enum": [
125-
"Employed",
126-
"Pensioner",
127-
"Self-Employed",
128-
"Student",
129-
"Unemployed"
130-
]
123+
"type": "string"
131124
},
132125
"fatca_declaration": {
133126
"description": "Indicates client's self-declaration for FATCA.",

0 commit comments

Comments
 (0)