Skip to content

Commit 03fd940

Browse files
author
nobody
committed
JSON Schema Update
1 parent 7d08f71 commit 03fd940

File tree

4 files changed

+143
-0
lines changed

4 files changed

+143
-0
lines changed

_data/v3.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ groups:
217217
title: States List
218218
- name: ticks
219219
title: Ticks Stream
220+
- name: ticks_batch
221+
title: Ticks Batch Stream
220222
- name: ticks_history
221223
title: Ticks History
222224
- name: time

config/v3/ticks_batch/example.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"ticks_batch": 1,
3+
"market": "forex",
4+
"subscribe": 1
5+
}

config/v3/ticks_batch/receive.json

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Ticks Batch Stream (response)",
4+
"description": "Latest spot price for a group symbols. Continuous responses with a frequency of up to one second.",
5+
"type": "object",
6+
"required": [
7+
"echo_req",
8+
"msg_type"
9+
],
10+
"properties": {
11+
"ticks_batch": {
12+
"title": "ticks_batch",
13+
"description": "Tick by tick list of streamed data for a group of symbols",
14+
"type": "array",
15+
"items": {
16+
"type": "object",
17+
"additionalProperties": false,
18+
"required": [
19+
"ask",
20+
"bid",
21+
"change",
22+
"epoch",
23+
"quote",
24+
"symbol"
25+
],
26+
"properties": {
27+
"ask": {
28+
"description": "Market ask at the epoch",
29+
"type": "string"
30+
},
31+
"bid": {
32+
"description": "Market bid at the epoch",
33+
"type": "string"
34+
},
35+
"change": {
36+
"description": "Daily percentage change",
37+
"type": "string"
38+
},
39+
"epoch": {
40+
"description": "Epoch time of the tick",
41+
"type": "integer"
42+
},
43+
"quote": {
44+
"description": "Market value at the epoch",
45+
"type": "string"
46+
},
47+
"symbol": {
48+
"description": "Symbol",
49+
"type": "string"
50+
}
51+
}
52+
}
53+
},
54+
"subscription": {
55+
"title": "Subscription information",
56+
"description": "For subscription requests only.",
57+
"type": "object",
58+
"additionalProperties": false,
59+
"required": [
60+
"id"
61+
],
62+
"properties": {
63+
"id": {
64+
"description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.",
65+
"type": "string",
66+
"examples": [
67+
"c84a793b-8a87-7999-ce10-9b22f7ceead3"
68+
]
69+
}
70+
}
71+
},
72+
"echo_req": {
73+
"description": "Echo of the request made.",
74+
"type": "object"
75+
},
76+
"msg_type": {
77+
"description": "Action name of the request made.",
78+
"type": "string",
79+
"enum": [
80+
"ticks_batch"
81+
]
82+
},
83+
"req_id": {
84+
"description": "Optional field sent in request to map to response, present only when request contains `req_id`.",
85+
"type": "integer"
86+
}
87+
}
88+
}

config/v3/ticks_batch/send.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Ticks Batch Stream (request)",
4+
"description": "Initiate a continuous stream of spot price updates for a group symbols.",
5+
"type": "object",
6+
"auth_required": 0,
7+
"additionalProperties": false,
8+
"required": [
9+
"ticks_batch",
10+
"market"
11+
],
12+
"properties": {
13+
"ticks_batch": {
14+
"description": "Must be `1`",
15+
"type": "integer",
16+
"enum": [
17+
1
18+
]
19+
},
20+
"market": {
21+
"description": "The short market name.",
22+
"type": "string",
23+
"enum": [
24+
"forex",
25+
"indices",
26+
"commodities",
27+
"stocks",
28+
"cryptocurrency",
29+
"synthetic_index"
30+
]
31+
},
32+
"subscribe": {
33+
"description": "[Optional] If set to 1, will send updates in batches by market.",
34+
"type": "integer",
35+
"enum": [
36+
1
37+
]
38+
},
39+
"passthrough": {
40+
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.",
41+
"type": "object"
42+
},
43+
"req_id": {
44+
"description": "[Optional] Used to map request to response.",
45+
"type": "integer"
46+
}
47+
}
48+
}

0 commit comments

Comments
 (0)