Skip to content

Commit 06e8882

Browse files
author
nobody
committed
JSON Schema Update
1 parent 4366990 commit 06e8882

File tree

4 files changed

+165
-0
lines changed

4 files changed

+165
-0
lines changed

_data/v3.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ groups:
4343
title: Update Contract History
4444
- name: contracts_for
4545
title: Contracts For Symbol
46+
- name: contracts_for_company
47+
title: Contracts For Company
4648
- name: copy_start
4749
title: 'Copy Trading: Start'
4850
- name: copy_stop
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"contracts_for_company": 1
3+
}
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Contracts For Company (response)",
4+
"description": "Get the list of currently available contracts for a given landing company.",
5+
"type": "object",
6+
"required": [
7+
"echo_req",
8+
"msg_type"
9+
],
10+
"properties": {
11+
"contracts_for_company": {
12+
"title": "contracts_for_company",
13+
"description": "List of available contracts for a given landing company.",
14+
"type": "object",
15+
"additionalProperties": false,
16+
"required": [
17+
"available",
18+
"hit_count"
19+
],
20+
"properties": {
21+
"available": {
22+
"description": "List of available contracts.",
23+
"type": "array",
24+
"items": {
25+
"type": "object",
26+
"additionalProperties": false,
27+
"required": [
28+
"barrier_category",
29+
"contract_category",
30+
"contract_category_display",
31+
"contract_display",
32+
"contract_type",
33+
"sentiment"
34+
],
35+
"properties": {
36+
"barrier_category": {
37+
"description": "Category of contract barrier.",
38+
"type": "string",
39+
"examples": [
40+
"american",
41+
"asian",
42+
"euro_atm",
43+
"euro_non_atm"
44+
]
45+
},
46+
"contract_category": {
47+
"description": "Category of contract.",
48+
"type": "string",
49+
"examples": [
50+
"asian",
51+
"callput"
52+
]
53+
},
54+
"contract_category_display": {
55+
"description": "Display name for the contract category, localized to selected language.",
56+
"type": "string",
57+
"examples": [
58+
"Asians",
59+
"Up/Down"
60+
]
61+
},
62+
"contract_display": {
63+
"description": "Display name for the contract, localized to selected language.",
64+
"type": "string",
65+
"examples": [
66+
"Asian Up",
67+
"Higher"
68+
]
69+
},
70+
"contract_type": {
71+
"description": "Type of contract.",
72+
"type": "string",
73+
"examples": [
74+
"ASIANU",
75+
"CALL"
76+
]
77+
},
78+
"sentiment": {
79+
"description": "Type of sentiment.",
80+
"type": "string",
81+
"examples": [
82+
"differ",
83+
"down",
84+
"match",
85+
"up"
86+
]
87+
}
88+
}
89+
},
90+
"minItems": 1
91+
},
92+
"hit_count": {
93+
"description": "Count of contracts available",
94+
"type": "number"
95+
}
96+
}
97+
},
98+
"echo_req": {
99+
"description": "Echo of the request made.",
100+
"type": "object"
101+
},
102+
"msg_type": {
103+
"description": "Action name of the request made.",
104+
"type": "string",
105+
"enum": [
106+
"contracts_for_company"
107+
]
108+
},
109+
"req_id": {
110+
"description": "Optional field sent in request to map to response, present only when request contains `req_id`.",
111+
"type": "integer"
112+
}
113+
}
114+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Contracts For Company (request)",
4+
"description": "Get the list of currently available contracts for a given landing company.",
5+
"type": "object",
6+
"auth_required": 0,
7+
"additionalProperties": false,
8+
"required": [
9+
"contracts_for_company"
10+
],
11+
"properties": {
12+
"contracts_for_company": {
13+
"description": "Must be `1`",
14+
"type": "integer",
15+
"enum": [
16+
1
17+
]
18+
},
19+
"landing_company": {
20+
"description": "[Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field.",
21+
"type": "string",
22+
"default": "virtual",
23+
"enum": [
24+
"iom",
25+
"malta",
26+
"maltainvest",
27+
"svg",
28+
"virtual",
29+
"vanuatu"
30+
]
31+
},
32+
"loginid": {
33+
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
34+
"type": "string",
35+
"pattern": "^[A-Za-z]+[0-9]+$"
36+
},
37+
"passthrough": {
38+
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.",
39+
"type": "object"
40+
},
41+
"req_id": {
42+
"description": "[Optional] Used to map request to response.",
43+
"type": "integer"
44+
}
45+
}
46+
}

0 commit comments

Comments
 (0)