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

Commit e00229d

Browse files
author
nobody
committed
JSON Schema Update
1 parent 5b99240 commit e00229d

File tree

135 files changed

+13713
-10978
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+13713
-10978
lines changed

_data/v3.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
groups:
22
- label: All Calls
33
methods:
4+
- name: account_list
5+
title: Account List
46
- name: active_symbols
57
title: Active Symbols
68
- name: api_token

config/v3/account_list/example.json

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

config/v3/account_list/receive.json

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Account List (response)",
4+
"description": "Returns all accounts belonging to the authorized user.",
5+
"type": "object",
6+
"required": [
7+
"echo_req",
8+
"msg_type"
9+
],
10+
"properties": {
11+
"account_list": {
12+
"description": "List of accounts for current user. This is also available from the `authroize` call.",
13+
"type": "array",
14+
"items": {
15+
"type": "object",
16+
"additionalProperties": false,
17+
"required": [
18+
"account_category",
19+
"account_type",
20+
"broker_code",
21+
"created_at",
22+
"currency",
23+
"is_disabled",
24+
"is_virtual",
25+
"landing_company_name",
26+
"linked_to",
27+
"loginid"
28+
],
29+
"properties": {
30+
"account_category": {
31+
"description": "Account category.",
32+
"type": "string",
33+
"enum": [
34+
"trading",
35+
"wallet"
36+
]
37+
},
38+
"account_type": {
39+
"description": "Account type.",
40+
"type": "string"
41+
},
42+
"broker": {
43+
"description": "2 letter broker code.",
44+
"type": "string"
45+
},
46+
"created_at": {
47+
"description": "Creation time of the account as epoch.",
48+
"type": "integer"
49+
},
50+
"currency": {
51+
"description": "Currency of specified account.",
52+
"type": "string"
53+
},
54+
"is_disabled": {
55+
"description": "Boolean value: 1 or 0, indicating whether the account is marked as disabled or not.",
56+
"type": "integer",
57+
"enum": [
58+
1,
59+
0
60+
]
61+
},
62+
"is_virtual": {
63+
"description": "Boolean value: 1 or 0, indicating whether the account is a virtual-money account.",
64+
"type": "integer",
65+
"enum": [
66+
1,
67+
0
68+
]
69+
},
70+
"landing_company_name": {
71+
"description": "Landing company shortcode the account belongs to.",
72+
"type": "string"
73+
},
74+
"linked_to": {
75+
"description": "Details of the list of Trading accounts linked to the Wallet account.",
76+
"type": "array",
77+
"items": {
78+
"type": "object",
79+
"additionalProperties": false,
80+
"properties": {
81+
"loginid": {
82+
"description": "Account ID.",
83+
"type": "string"
84+
},
85+
"platform": {
86+
"description": "Account platform name.",
87+
"type": "string",
88+
"enum": [
89+
"ctrader",
90+
"derivez",
91+
"dtrade",
92+
"dwallet",
93+
"dxtrade",
94+
"mt5"
95+
]
96+
}
97+
}
98+
}
99+
},
100+
"loginid": {
101+
"description": "The account ID of specified account.",
102+
"type": "string"
103+
}
104+
}
105+
}
106+
},
107+
"echo_req": {
108+
"description": "Echo of the request made.",
109+
"type": "object"
110+
},
111+
"msg_type": {
112+
"description": "Action name of the request made.",
113+
"type": "string",
114+
"enum": [
115+
"account_list"
116+
]
117+
},
118+
"req_id": {
119+
"description": "Optional field sent in request to map to response, present only when request contains `req_id`.",
120+
"type": "integer"
121+
}
122+
}
123+
}

config/v3/account_list/send.json

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

config/v3/active_symbols/send.json

Lines changed: 114 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,117 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
3-
"title": "Active Symbols (request)",
4-
"description": "Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading).",
5-
"type": "object",
6-
"auth_required": 0,
7-
"additionalProperties": false,
8-
"required": ["active_symbols"],
9-
"properties": {
10-
"active_symbols": {
11-
"description": "If you use `brief`, only a subset of fields will be returned.",
12-
"type": "string",
13-
"enum": ["brief", "full"]
14-
},
15-
"landing_company": {
16-
"description": "Deprecated - replaced by landing_company_short.",
17-
"type": "string",
18-
"enum": [
19-
"iom",
20-
"malta",
21-
"maltainvest",
22-
"svg",
23-
"virtual",
24-
"vanuatu",
25-
"champion",
26-
"champion-virtual"
27-
]
28-
},
29-
"landing_company_short": {
30-
"description": "[Optional] If you specify this field, only symbols available for trading by that landing company will be returned. If you are logged in, only symbols available for trading by your landing company will be returned regardless of what you specify in this field.",
31-
"type": "string",
32-
"enum": [
33-
"iom",
34-
"malta",
35-
"maltainvest",
36-
"svg",
37-
"virtual",
38-
"vanuatu",
39-
"champion",
40-
"champion-virtual"
41-
]
42-
},
43-
"product_type": {
44-
"description": "[Optional] If you specify this field, only symbols that can be traded through that product type will be returned.",
45-
"type": "string",
46-
"enum": ["basic"]
47-
},
48-
"loginid": {
49-
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
50-
"type": "string",
51-
"pattern": "^[A-Za-z]+[0-9]+$"
52-
},
53-
"passthrough": {
54-
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.",
55-
"type": "object"
56-
},
57-
"req_id": {
58-
"description": "[Optional] Used to map request to response.",
59-
"type": "integer"
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Active Symbols (request)",
4+
"description": "Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading).",
5+
"type": "object",
6+
"auth_required": 0,
7+
"additionalProperties": false,
8+
"required": [
9+
"active_symbols"
10+
],
11+
"properties": {
12+
"active_symbols": {
13+
"description": "If you use `brief`, only a subset of fields will be returned.",
14+
"type": "string",
15+
"enum": [
16+
"brief",
17+
"full"
18+
]
19+
},
20+
"contract_type": {
21+
"description": "[Optional] The proposed contract type",
22+
"type": "array",
23+
"items": {
24+
"description": "",
25+
"type": "string",
26+
"enum": [
27+
"MULTUP",
28+
"MULTDOWN",
29+
"UPORDOWN",
30+
"EXPIRYRANGE",
31+
"ONETOUCH",
32+
"CALLE",
33+
"LBHIGHLOW",
34+
"ASIAND",
35+
"EXPIRYRANGEE",
36+
"DIGITDIFF",
37+
"DIGITMATCH",
38+
"DIGITOVER",
39+
"PUTE",
40+
"DIGITUNDER",
41+
"NOTOUCH",
42+
"CALL",
43+
"RANGE",
44+
"LBFLOATPUT",
45+
"DIGITODD",
46+
"PUT",
47+
"ASIANU",
48+
"LBFLOATCALL",
49+
"EXPIRYMISSE",
50+
"EXPIRYMISS",
51+
"DIGITEVEN",
52+
"TICKHIGH",
53+
"TICKLOW",
54+
"RESETCALL",
55+
"RESETPUT",
56+
"CALLSPREAD",
57+
"PUTSPREAD",
58+
"RUNHIGH",
59+
"RUNLOW",
60+
"ACCU",
61+
"VANILLALONGCALL",
62+
"VANILLALONGPUT",
63+
"TURBOSLONG",
64+
"TURBOSSHORT"
65+
]
66+
}
67+
},
68+
"landing_company": {
69+
"description": "Deprecated - replaced by landing_company_short.",
70+
"type": "string",
71+
"enum": [
72+
"iom",
73+
"malta",
74+
"maltainvest",
75+
"svg",
76+
"virtual",
77+
"vanuatu",
78+
"champion",
79+
"champion-virtual"
80+
]
81+
},
82+
"landing_company_short": {
83+
"description": "[Optional] If you specify this field, only symbols available for trading by that landing company will be returned. If you are logged in, only symbols available for trading by your landing company will be returned regardless of what you specify in this field.",
84+
"type": "string",
85+
"enum": [
86+
"iom",
87+
"malta",
88+
"maltainvest",
89+
"svg",
90+
"virtual",
91+
"vanuatu",
92+
"champion",
93+
"champion-virtual"
94+
]
95+
},
96+
"product_type": {
97+
"description": "[Optional] If you specify this field, only symbols that can be traded through that product type will be returned.",
98+
"type": "string",
99+
"enum": [
100+
"basic"
101+
]
102+
},
103+
"loginid": {
104+
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
105+
"type": "string",
106+
"pattern": "^[A-Za-z]+[0-9]+$"
107+
},
108+
"passthrough": {
109+
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.",
110+
"type": "object"
111+
},
112+
"req_id": {
113+
"description": "[Optional] Used to map request to response.",
114+
"type": "integer"
115+
}
60116
}
61-
}
62117
}

0 commit comments

Comments
 (0)