-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathcommodity-v3.0.json
183 lines (183 loc) · 8.46 KB
/
commodity-v3.0.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
{
"$schema" : "http://json-schema.org/draft-04/schema#",
"id" : "https://eddn.edcd.io/schemas/commodity/3#",
"type" : "object",
"additionalProperties" : false,
"required": [ "$schemaRef", "header", "message" ],
"properties": {
"$schemaRef": {
"type" : "string"
},
"header": {
"type" : "object",
"additionalProperties" : true,
"required" : [ "uploaderID", "softwareName", "softwareVersion" ],
"properties" : {
"uploaderID": {
"type" : "string"
},
"gameversion": {
"type" : "string",
"description" : "Fileheader->gameversion, else LoadGame->gameversion, else 'CAPI-market', else ''."
},
"gamebuild": {
"type" : "string",
"description" : "Fileheader->build, else LoadGame->build, else 'CAPI-market', else ''."
},
"softwareName": {
"type" : "string"
},
"softwareVersion": {
"type" : "string"
},
"gatewayTimestamp": {
"type" : "string",
"format" : "date-time",
"description" : "Timestamp upon receipt at the gateway. If present, this property will be overwritten by the gateway; submitters are not intended to populate this property."
}
}
},
"message": {
"type" : "object",
"additionalProperties" : false,
"required" : [ "systemName", "stationName", "marketId", "timestamp", "commodities" ],
"properties" : {
"systemName": {
"type" : "string",
"renamed" : "StarSystem",
"minLength" : 1
},
"stationName": {
"type" : "string",
"renamed" : "StationName",
"minLength" : 1
},
"stationType": {
"type" : "string",
"renamed" : "StationType"
},
"carrierDockingAccess": {
"type" : "string",
"renamed" : "CarrierDockingAccess"
},
"marketId": {
"type" : "integer",
"renamed" : "MarketID"
},
"horizons": {
"type" : "boolean",
"description" : "Whether the sending Cmdr has a Horizons pass."
},
"odyssey": {
"type" : "boolean",
"description" : "Whether the sending Cmdr has an Odyssey expansion."
},
"timestamp": {
"type" : "string",
"format" : "date-time"
},
"commodities": {
"type" : "array",
"description" : "Commodities returned by the Companion API, with illegal commodities omitted",
"items" : {
"type" : "object",
"additionalProperties" : false,
"required" : [ "name", "meanPrice", "buyPrice", "stock", "stockBracket", "sellPrice", "demand", "demandBracket" ],
"properties" : {
"name": {
"type" : "string",
"renamed" : "Name",
"minLength" : 1,
"description" : "Symbolic name as returned by the Companion API"
},
"meanPrice": {
"type" : "integer",
"renamed" : "MeanPrice"
},
"buyPrice": {
"type" : "integer",
"renamed" : "BuyPrice",
"description" : "Price to buy from the market"
},
"stock": {
"type" : "integer",
"renamed" : "Stock"
},
"stockBracket": {
"$ref" : "#/definitions/levelType",
"renamed" : "StockBracket"
},
"sellPrice": {
"type" : "integer",
"renamed" : "SellPrice",
"description" : "Price to sell to the market"
},
"demand": {
"type" : "integer",
"renamed" : "Demand"
},
"demandBracket": {
"$ref" : "#/definitions/levelType",
"renamed" : "DemandBracket"
},
"statusFlags": {
"type" : "array",
"minItems" : 1,
"uniqueItems" : true,
"items" : {
"type" : "string",
"minLength" : 1
}
},
"Producer": {
"$ref" : "#/definitions/disallowed",
"description" : "Not present in CAPI data, so removed from Journal-sourced data"
},
"Rare" : {
"$ref" : "#/definitions/disallowed",
"description" : "Not present in CAPI data, so removed from Journal-sourced data"
},
"id": {
"$ref" : "#/definitions/disallowed",
"description" : "Not wanted for historical reasons?"
}
}
}
},
"economies": {
"type" : "array",
"items" : {
"type" : "object",
"additionalProperties" : false,
"required" : [ "name", "proportion" ],
"properties" : {
"name": {
"type" : "string",
"minLength" : 1,
"description" : "Economy type as returned by the Companion API"
},
"proportion": {
"type" : "number"
}
}
}
},
"prohibited": {
"type" : "array",
"uniqueItems" : true,
"items" : {
"type" : "string",
"minLength" : 1
}
}
}
}
},
"definitions": {
"disallowed" : { "not" : { "type": [ "array", "boolean", "integer", "number", "null", "object", "string" ] } },
"levelType": {
"enum" : [0, 1, 2, 3, ""],
"description" : "Note: A value of \"\" indicates that the commodity is not normally sold/purchased at this station, but is currently temporarily for sale/purchase"
}
}
}