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

Commit 7c3993a

Browse files
JSON Schema Update
1 parent a477b4b commit 7c3993a

File tree

4 files changed

+147
-0
lines changed

4 files changed

+147
-0
lines changed

_data/v3.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ groups:
4747
title: 'Copy Trading: Statistics'
4848
- name: document_upload
4949
title: Document Upload
50+
- name: economic_calendar
51+
title: Economic Calendar
5052
- name: exchange_rates
5153
title: Exchange Rates
5254
- name: forget
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"economic_calendar": 1,
3+
"currency": "USD",
4+
"end_date": 1561196696,
5+
"start_date": 1561096696
6+
}
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Economic Calendar (response)",
4+
"description": "A list of economic events.",
5+
"type": "object",
6+
"required": [
7+
"echo_req",
8+
"msg_type"
9+
],
10+
"properties": {
11+
"economic_calendar": {
12+
"title": "economic_calendar",
13+
"description": "Economic calendar.",
14+
"type": "object",
15+
"properties": {
16+
"events": {
17+
"description": "Array of economic events",
18+
"type": "array",
19+
"items": {
20+
"type": "object",
21+
"properties": {
22+
"actual": {
23+
"description": "Actual value.",
24+
"type": "object",
25+
"properties": {
26+
"display_value": {
27+
"description": "Actual value.",
28+
"type": "string"
29+
}
30+
}
31+
},
32+
"currency": {
33+
"description": "Currency symbol.",
34+
"type": "string"
35+
},
36+
"event_name": {
37+
"description": "Event name.",
38+
"type": "string"
39+
},
40+
"forecast": {
41+
"description": "Forecasted value.",
42+
"type": "object",
43+
"properties": {
44+
"display_value": {
45+
"description": "Forecasted value.",
46+
"type": "string"
47+
}
48+
}
49+
},
50+
"impact": {
51+
"description": "Impact.",
52+
"type": "integer",
53+
"maximum": 5,
54+
"minimum": 1
55+
},
56+
"previous": {
57+
"description": "Previous value.",
58+
"type": "object",
59+
"properties": {
60+
"display_value": {
61+
"description": "Previous value.",
62+
"type": "string"
63+
}
64+
}
65+
},
66+
"release_date": {
67+
"description": "Release date.",
68+
"type": "integer",
69+
"examples": [
70+
1441175849
71+
]
72+
}
73+
}
74+
}
75+
}
76+
}
77+
},
78+
"echo_req": {
79+
"description": "Echo of the request made.",
80+
"type": "object"
81+
},
82+
"msg_type": {
83+
"description": "Action name of the request made.",
84+
"type": "string",
85+
"enum": [
86+
"economic_calendar"
87+
]
88+
},
89+
"req_id": {
90+
"description": "Optional field sent in request to map to response, present only when request contains `req_id`.",
91+
"type": "integer"
92+
}
93+
}
94+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Economic Calendar (request)",
4+
"description": "Specify a currency to receive a list of events related to that specific currency. For example, specifying USD will return a list of USD-related events. If the currency is omitted, you will receive a list for all currencies.",
5+
"type": "object",
6+
"auth_required": 0,
7+
"additionalProperties": false,
8+
"required": [
9+
"economic_calendar"
10+
],
11+
"properties": {
12+
"economic_calendar": {
13+
"description": "Must be `1`",
14+
"type": "integer",
15+
"enum": [
16+
1
17+
]
18+
},
19+
"currency": {
20+
"description": "[Optional] Currency symbol.",
21+
"type": "string",
22+
"pattern": "^[a-zA-Z0-9]{2,20}$"
23+
},
24+
"end_date": {
25+
"description": "[Optional] End date.",
26+
"type": "integer",
27+
"maximum": 9999999999,
28+
"minimum": 1
29+
},
30+
"start_date": {
31+
"description": "[Optional] Start date.",
32+
"type": "integer",
33+
"maximum": 9999999999,
34+
"minimum": 1
35+
},
36+
"passthrough": {
37+
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.",
38+
"type": "object"
39+
},
40+
"req_id": {
41+
"description": "[Optional] Used to map request to response.",
42+
"type": "integer"
43+
}
44+
}
45+
}

0 commit comments

Comments
 (0)