@apifreaks/openapi-specs 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +706 -104
- package/dist/index.js +706 -104
- package/dist/specs/commodity/commodity-fluctuation.yaml +81 -7
- package/dist/specs/commodity/commodity-prices.yaml +122 -32
- package/dist/specs/commodity/commodity-symbols.yaml +54 -7
- package/dist/specs/commodity/commodity-time-series.yaml +123 -11
- package/dist/specs/commodity/historical-commodity-prices.yaml +128 -34
- package/package.json +1 -1
- package/specs/README.md +1 -1
- package/specs/commodity/commodity-fluctuation.json +118 -8
- package/specs/commodity/commodity-prices.json +167 -35
- package/specs/commodity/commodity-symbols.json +64 -7
- package/specs/commodity/commodity-time-series.json +174 -12
- package/specs/commodity/historical-commodity-prices.json +178 -37
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"openapi": "3.1.1",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Commodity Fluctuation API ",
|
|
5
|
-
"version": "
|
|
6
|
-
"description": "
|
|
5
|
+
"version": "2.0.0",
|
|
6
|
+
"description": "Price change and percentage movement for one or more commodities over a custom date range, with no limit on range length. For monthly-updated commodities the range snaps to month boundaries. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.",
|
|
7
7
|
"contact": {
|
|
8
8
|
"name": "APIFreaks Support",
|
|
9
9
|
"url": "https://apifreaks.com/contact",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"servers": [
|
|
14
14
|
{
|
|
15
|
-
"url": "https://api.apifreaks.com/
|
|
15
|
+
"url": "https://api.apifreaks.com/v2.0",
|
|
16
16
|
"description": "Commodity Fluctuation API Server"
|
|
17
17
|
}
|
|
18
18
|
],
|
|
@@ -103,6 +103,44 @@
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
|
+
"206": {
|
|
107
|
+
"description": "Partial Content — Some requested symbols could not be resolved",
|
|
108
|
+
"content": {
|
|
109
|
+
"application/json": {
|
|
110
|
+
"schema": {
|
|
111
|
+
"$ref": "#/components/schemas/CommodityFluctuationResponse"
|
|
112
|
+
},
|
|
113
|
+
"examples": {
|
|
114
|
+
"partial": {
|
|
115
|
+
"summary": "One valid symbol, one unresolved symbol",
|
|
116
|
+
"value": {
|
|
117
|
+
"success": true,
|
|
118
|
+
"startDate": "2024-01-01",
|
|
119
|
+
"endDate": "2024-01-31",
|
|
120
|
+
"rates": {
|
|
121
|
+
"XAU": {
|
|
122
|
+
"startRate": 2063.63,
|
|
123
|
+
"endRate": 2039.83,
|
|
124
|
+
"change": -23.8,
|
|
125
|
+
"changePercent": -1.15
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"unresolved": {
|
|
129
|
+
"FAKESYM": {
|
|
130
|
+
"message": "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"headers": {
|
|
139
|
+
"X-AF-Credits-Cost": {
|
|
140
|
+
"$ref": "#/components/headers/X-AF-Credits-Cost"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
106
144
|
"400": {
|
|
107
145
|
"description": "Bad Request — Missing parameters or invalid dates",
|
|
108
146
|
"content": {
|
|
@@ -113,9 +151,9 @@
|
|
|
113
151
|
"value": {
|
|
114
152
|
"error": "Invalid Param Exception",
|
|
115
153
|
"message": "please pass correct parameters",
|
|
116
|
-
"path": "/
|
|
154
|
+
"path": "/v2.0/commodity/fluctuation",
|
|
117
155
|
"status": 400,
|
|
118
|
-
"timestamp": "2026-
|
|
156
|
+
"timestamp": "2026-09-14T08:43:46.481Z"
|
|
119
157
|
}
|
|
120
158
|
},
|
|
121
159
|
"invalidDateFormat": {
|
|
@@ -160,6 +198,33 @@
|
|
|
160
198
|
}
|
|
161
199
|
}
|
|
162
200
|
},
|
|
201
|
+
"402": {
|
|
202
|
+
"description": "Payment Required — Maximum symbols per request exceeded",
|
|
203
|
+
"content": {
|
|
204
|
+
"application/json": {
|
|
205
|
+
"schema": {
|
|
206
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
207
|
+
},
|
|
208
|
+
"examples": {
|
|
209
|
+
"maxSymbolsExceeded": {
|
|
210
|
+
"summary": "Too many symbols requested",
|
|
211
|
+
"value": {
|
|
212
|
+
"timestamp": "2026-09-14T08:43:48.408Z",
|
|
213
|
+
"path": "/rates/fluctuation",
|
|
214
|
+
"code": 402,
|
|
215
|
+
"error": "PAYMENT_REQUIRED",
|
|
216
|
+
"message": "Maximum symbols per request exceeded"
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"headers": {
|
|
223
|
+
"X-AF-Credits-Cost": {
|
|
224
|
+
"$ref": "#/components/headers/X-AF-Credits-Cost"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
163
228
|
"404": {
|
|
164
229
|
"description": "Not found - Symbol or data not available",
|
|
165
230
|
"content": {
|
|
@@ -171,17 +236,22 @@
|
|
|
171
236
|
"symbolNotFound": {
|
|
172
237
|
"summary": "Symbol Not Found",
|
|
173
238
|
"value": {
|
|
174
|
-
"timestamp": "2026-
|
|
239
|
+
"timestamp": "2026-09-14T08:43:48.408Z",
|
|
175
240
|
"path": "/rates/fluctuation",
|
|
176
241
|
"code": 404,
|
|
177
242
|
"error": "SYMBOL_NOT_FOUND",
|
|
178
|
-
"message": "The symbol is not supported, please visit the documentation for a list of supported symbols"
|
|
243
|
+
"message": "The symbol is not supported, please visit the documentation for a list of supported symbols",
|
|
244
|
+
"unresolved": {
|
|
245
|
+
"FAKESYM": {
|
|
246
|
+
"message": "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
247
|
+
}
|
|
248
|
+
}
|
|
179
249
|
}
|
|
180
250
|
},
|
|
181
251
|
"noData": {
|
|
182
252
|
"summary": "No data available for the given date range",
|
|
183
253
|
"value": {
|
|
184
|
-
"timestamp": "2026-
|
|
254
|
+
"timestamp": "2026-09-14T08:44:31.022Z",
|
|
185
255
|
"path": "/rates/fluctuation",
|
|
186
256
|
"code": 404,
|
|
187
257
|
"error": "DATA_NOT_FOUND",
|
|
@@ -235,6 +305,26 @@
|
|
|
235
305
|
},
|
|
236
306
|
"rates": {
|
|
237
307
|
"$ref": "#/components/schemas/CommodityFluctuationRates"
|
|
308
|
+
},
|
|
309
|
+
"unresolved": {
|
|
310
|
+
"type": "object",
|
|
311
|
+
"description": "Present only on a 206 Partial Content response, when some requested symbols could not be resolved. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
|
|
312
|
+
"additionalProperties": {
|
|
313
|
+
"type": "object",
|
|
314
|
+
"properties": {
|
|
315
|
+
"message": {
|
|
316
|
+
"type": "string",
|
|
317
|
+
"description": "Detail message explaining why this symbol was not resolved."
|
|
318
|
+
},
|
|
319
|
+
"suggestions": {
|
|
320
|
+
"type": "array",
|
|
321
|
+
"description": "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
322
|
+
"items": {
|
|
323
|
+
"type": "string"
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
238
328
|
}
|
|
239
329
|
},
|
|
240
330
|
"description": "Commodity fluctuation response containing price change data per symbol over a date range."
|
|
@@ -300,6 +390,26 @@
|
|
|
300
390
|
"type": "string",
|
|
301
391
|
"format": "date-time",
|
|
302
392
|
"description": "Timestamp when the error occurred (ISO 8601)."
|
|
393
|
+
},
|
|
394
|
+
"unresolved": {
|
|
395
|
+
"type": "object",
|
|
396
|
+
"description": "Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
|
|
397
|
+
"additionalProperties": {
|
|
398
|
+
"type": "object",
|
|
399
|
+
"properties": {
|
|
400
|
+
"message": {
|
|
401
|
+
"type": "string",
|
|
402
|
+
"description": "Detail message explaining why this symbol was not resolved."
|
|
403
|
+
},
|
|
404
|
+
"suggestions": {
|
|
405
|
+
"type": "array",
|
|
406
|
+
"description": "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
407
|
+
"items": {
|
|
408
|
+
"type": "string"
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
303
413
|
}
|
|
304
414
|
}
|
|
305
415
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"openapi": "3.1.1",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Live Commodity Prices API - Real Time Market Insights",
|
|
5
|
-
"version": "
|
|
6
|
-
"description": "
|
|
5
|
+
"version": "2.0.0",
|
|
6
|
+
"description": "Real-time prices for 245+ commodities in a single request, updated on a rolling ~10 minute cadence. Optionally convert prices into a target quote currency. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.",
|
|
7
7
|
"contact": {
|
|
8
8
|
"name": "APIFreaks Support",
|
|
9
9
|
"url": "https://apifreaks.com/contact",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"servers": [
|
|
14
14
|
{
|
|
15
|
-
"url": "https://api.apifreaks.com/
|
|
15
|
+
"url": "https://api.apifreaks.com/v2.0",
|
|
16
16
|
"description": "Live Commodity Prices API Server"
|
|
17
17
|
}
|
|
18
18
|
],
|
|
@@ -44,17 +44,6 @@
|
|
|
44
44
|
"type": "string"
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
|
-
{
|
|
48
|
-
"name": "updates",
|
|
49
|
-
"in": "query",
|
|
50
|
-
"required": true,
|
|
51
|
-
"description": "Update frequency. Accepted values: `1m` (default), `10m`.",
|
|
52
|
-
"schema": {
|
|
53
|
-
"type": "string",
|
|
54
|
-
"enum": ["1m", "10m"],
|
|
55
|
-
"default": "1m"
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
47
|
{
|
|
59
48
|
"name": "quote",
|
|
60
49
|
"in": "query",
|
|
@@ -78,10 +67,10 @@
|
|
|
78
67
|
"summary": "Successful response",
|
|
79
68
|
"value": {
|
|
80
69
|
"success": true,
|
|
81
|
-
"timestamp":
|
|
70
|
+
"timestamp": 1789375397,
|
|
82
71
|
"rates": {
|
|
83
|
-
"XAU":
|
|
84
|
-
"WTIOIL-SPOT":
|
|
72
|
+
"XAU": 4313.04,
|
|
73
|
+
"WTIOIL-SPOT": 100
|
|
85
74
|
},
|
|
86
75
|
"metadata": {
|
|
87
76
|
"XAU": {
|
|
@@ -99,9 +88,9 @@
|
|
|
99
88
|
"summary": "Price converted to a target quote currency",
|
|
100
89
|
"value": {
|
|
101
90
|
"success": true,
|
|
102
|
-
"timestamp":
|
|
91
|
+
"timestamp": 1789375426,
|
|
103
92
|
"rates": {
|
|
104
|
-
"XAU":
|
|
93
|
+
"XAU": 3739.023
|
|
105
94
|
},
|
|
106
95
|
"metadata": {
|
|
107
96
|
"XAU": {
|
|
@@ -120,6 +109,66 @@
|
|
|
120
109
|
}
|
|
121
110
|
}
|
|
122
111
|
},
|
|
112
|
+
"206": {
|
|
113
|
+
"description": "Partial Content — Some requested symbols could not be resolved",
|
|
114
|
+
"content": {
|
|
115
|
+
"application/json": {
|
|
116
|
+
"schema": {
|
|
117
|
+
"$ref": "#/components/schemas/LiveCommodityPricesResponse"
|
|
118
|
+
},
|
|
119
|
+
"examples": {
|
|
120
|
+
"partial": {
|
|
121
|
+
"summary": "One valid symbol, one unresolved symbol",
|
|
122
|
+
"value": {
|
|
123
|
+
"success": true,
|
|
124
|
+
"timestamp": 1789376193,
|
|
125
|
+
"rates": {
|
|
126
|
+
"XAU": 4311.88
|
|
127
|
+
},
|
|
128
|
+
"metadata": {
|
|
129
|
+
"XAU": {
|
|
130
|
+
"unit": "T.oz",
|
|
131
|
+
"quote": "USD"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"unresolved": {
|
|
135
|
+
"FAKESYM": {
|
|
136
|
+
"message": "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"partialWithSuggestions": {
|
|
142
|
+
"summary": "Unresolved symbol with close-match suggestions",
|
|
143
|
+
"value": {
|
|
144
|
+
"success": true,
|
|
145
|
+
"timestamp": 1789376644,
|
|
146
|
+
"rates": {
|
|
147
|
+
"XAU": 4306.06
|
|
148
|
+
},
|
|
149
|
+
"metadata": {
|
|
150
|
+
"XAU": {
|
|
151
|
+
"unit": "T.oz",
|
|
152
|
+
"quote": "USD"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"unresolved": {
|
|
156
|
+
"ZW": {
|
|
157
|
+
"message": "Did you mean ZW-SPOT (Wheat Spot) or ZW-FUT (Wheat Futures)?",
|
|
158
|
+
"suggestions": ["ZW-SPOT", "ZW-FUT"]
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"headers": {
|
|
167
|
+
"X-AF-Credits-Cost": {
|
|
168
|
+
"$ref": "#/components/headers/X-AF-Credits-Cost"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
123
172
|
"400": {
|
|
124
173
|
"description": "Bad Request — Missing or invalid query parameters",
|
|
125
174
|
"content": {
|
|
@@ -133,19 +182,36 @@
|
|
|
133
182
|
"value": {
|
|
134
183
|
"error": "Invalid Param Exception",
|
|
135
184
|
"message": "please pass correct parameters",
|
|
136
|
-
"path": "/
|
|
185
|
+
"path": "/v2.0/commodity/rates/latest",
|
|
137
186
|
"status": 400,
|
|
138
|
-
"timestamp": "2026-
|
|
187
|
+
"timestamp": "2026-09-14T08:43:43.964Z"
|
|
139
188
|
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"headers": {
|
|
194
|
+
"X-AF-Credits-Cost": {
|
|
195
|
+
"$ref": "#/components/headers/X-AF-Credits-Cost"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"402": {
|
|
200
|
+
"description": "Payment Required — Maximum symbols per request exceeded",
|
|
201
|
+
"content": {
|
|
202
|
+
"application/json": {
|
|
203
|
+
"schema": {
|
|
204
|
+
"$ref": "#/components/schemas/CommodityNotFoundError"
|
|
205
|
+
},
|
|
206
|
+
"examples": {
|
|
207
|
+
"maxSymbolsExceeded": {
|
|
208
|
+
"summary": "Too many symbols requested",
|
|
143
209
|
"value": {
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
210
|
+
"timestamp": "2026-09-14T08:43:44.957Z",
|
|
211
|
+
"path": "/rates/latestRates",
|
|
212
|
+
"code": 402,
|
|
213
|
+
"error": "PAYMENT_REQUIRED",
|
|
214
|
+
"message": "Maximum symbols per request exceeded"
|
|
149
215
|
}
|
|
150
216
|
}
|
|
151
217
|
}
|
|
@@ -168,17 +234,38 @@
|
|
|
168
234
|
"symbolNotFound": {
|
|
169
235
|
"summary": "Symbol Not Found",
|
|
170
236
|
"value": {
|
|
171
|
-
"timestamp":
|
|
237
|
+
"timestamp": "2026-09-14T08:43:44.957Z",
|
|
172
238
|
"path": "/rates/latestRates",
|
|
173
239
|
"code": 404,
|
|
174
240
|
"error": "SYMBOL_NOT_FOUND",
|
|
175
|
-
"message": "The symbol is not supported, please visit the documentation for a list of supported symbols"
|
|
241
|
+
"message": "The symbol is not supported, please visit the documentation for a list of supported symbols",
|
|
242
|
+
"unresolved": {
|
|
243
|
+
"FAKESYM": {
|
|
244
|
+
"message": "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"symbolNotFoundWithSuggestions": {
|
|
250
|
+
"summary": "Symbol Not Found, with close-match suggestions",
|
|
251
|
+
"value": {
|
|
252
|
+
"timestamp": "2026-09-14T09:04:04.878Z",
|
|
253
|
+
"path": "/rates/latestRates",
|
|
254
|
+
"code": 404,
|
|
255
|
+
"error": "SYMBOL_NOT_FOUND",
|
|
256
|
+
"message": "The symbol is not supported, please visit the documentation for a list of supported symbols",
|
|
257
|
+
"unresolved": {
|
|
258
|
+
"ZW": {
|
|
259
|
+
"message": "Did you mean ZW-SPOT (Wheat Spot) or ZW-FUT (Wheat Futures)?",
|
|
260
|
+
"suggestions": ["ZW-SPOT", "ZW-FUT"]
|
|
261
|
+
}
|
|
262
|
+
}
|
|
176
263
|
}
|
|
177
264
|
},
|
|
178
265
|
"quoteNotFound": {
|
|
179
266
|
"summary": "Quote Currency Not Found",
|
|
180
267
|
"value": {
|
|
181
|
-
"timestamp":
|
|
268
|
+
"timestamp": "2026-09-14T08:43:45.461Z",
|
|
182
269
|
"path": "/rates/latestRates",
|
|
183
270
|
"code": 404,
|
|
184
271
|
"error": "QUOTE_NOT_FOUND",
|
|
@@ -231,6 +318,30 @@
|
|
|
231
318
|
},
|
|
232
319
|
"metadata": {
|
|
233
320
|
"$ref": "#/components/schemas/CommodityMetadata"
|
|
321
|
+
},
|
|
322
|
+
"unresolved": {
|
|
323
|
+
"type": "object",
|
|
324
|
+
"description": "Present only on a 206 Partial Content response, when some requested symbols could not be resolved. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
|
|
325
|
+
"additionalProperties": {
|
|
326
|
+
"type": "object",
|
|
327
|
+
"properties": {
|
|
328
|
+
"message": {
|
|
329
|
+
"type": "string",
|
|
330
|
+
"description": "Detail message explaining why this symbol was not resolved."
|
|
331
|
+
},
|
|
332
|
+
"suggestions": {
|
|
333
|
+
"type": "array",
|
|
334
|
+
"description": "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
335
|
+
"items": {
|
|
336
|
+
"type": "string"
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
"warning": {
|
|
343
|
+
"type": "string",
|
|
344
|
+
"description": "Present only when currency conversion for the requested `quote` is temporarily unavailable; rates are returned in each commodity's default currency instead."
|
|
234
345
|
}
|
|
235
346
|
},
|
|
236
347
|
"description": "Live commodity prices response containing success status, timestamp, rates, and metadata."
|
|
@@ -294,12 +405,13 @@
|
|
|
294
405
|
},
|
|
295
406
|
"CommodityNotFoundError": {
|
|
296
407
|
"type": "object",
|
|
297
|
-
"description": "Error envelope returned by the commodity pricing service specifically for unresolvable symbol/quote errors. Uses `code` instead of `status` and
|
|
408
|
+
"description": "Error envelope returned by the commodity pricing service specifically for unresolvable symbol/quote errors. Uses `code` instead of `status` and an ISO 8601 `timestamp`, unlike the standard ErrorResponse.",
|
|
298
409
|
"required": ["code", "error", "message"],
|
|
299
410
|
"properties": {
|
|
300
411
|
"timestamp": {
|
|
301
|
-
"type": "
|
|
302
|
-
"
|
|
412
|
+
"type": "string",
|
|
413
|
+
"format": "date-time",
|
|
414
|
+
"description": "Timestamp when the error occurred (ISO 8601)."
|
|
303
415
|
},
|
|
304
416
|
"path": {
|
|
305
417
|
"type": "string",
|
|
@@ -316,6 +428,26 @@
|
|
|
316
428
|
"message": {
|
|
317
429
|
"type": "string",
|
|
318
430
|
"description": "Human-readable error message describing the failure."
|
|
431
|
+
},
|
|
432
|
+
"unresolved": {
|
|
433
|
+
"type": "object",
|
|
434
|
+
"description": "Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
|
|
435
|
+
"additionalProperties": {
|
|
436
|
+
"type": "object",
|
|
437
|
+
"properties": {
|
|
438
|
+
"message": {
|
|
439
|
+
"type": "string",
|
|
440
|
+
"description": "Detail message explaining why this symbol was not resolved."
|
|
441
|
+
},
|
|
442
|
+
"suggestions": {
|
|
443
|
+
"type": "array",
|
|
444
|
+
"description": "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
445
|
+
"items": {
|
|
446
|
+
"type": "string"
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
319
451
|
}
|
|
320
452
|
}
|
|
321
453
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"openapi": "3.1.1",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Commodity Symbols API Reference",
|
|
5
|
-
"version": "
|
|
6
|
-
"description": "
|
|
5
|
+
"version": "2.0.0",
|
|
6
|
+
"description": "Full catalog of 245+ supported commodities across Metals, Energy, Agriculture, Industrial, Raw Materials, Oils and Meals, Textiles, Meats, Poultry, and Livestock, with pricing currency, unit, and update interval per symbol. Deprecated symbols stay listed with `status: \"inactive\"` and a `deprecationDate`.",
|
|
7
7
|
"contact": {
|
|
8
8
|
"name": "APIFreaks Support",
|
|
9
9
|
"url": "https://apifreaks.com/contact",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"servers": [
|
|
14
14
|
{
|
|
15
|
-
"url": "https://api.apifreaks.com/
|
|
15
|
+
"url": "https://api.apifreaks.com/v2.0",
|
|
16
16
|
"description": "Commodity Symbols API Server"
|
|
17
17
|
}
|
|
18
18
|
],
|
|
@@ -81,6 +81,40 @@
|
|
|
81
81
|
"symbol": "MMBtu",
|
|
82
82
|
"name": "Million British Thermal Units"
|
|
83
83
|
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"symbol": "NG-EU",
|
|
87
|
+
"name": "Natural Gas, Europe",
|
|
88
|
+
"category": "Energy",
|
|
89
|
+
"status": "active",
|
|
90
|
+
"updateInterval": "PER_MONTH",
|
|
91
|
+
"exchange": "World Bank",
|
|
92
|
+
"currency": {
|
|
93
|
+
"code": "USD",
|
|
94
|
+
"name": "US Dollar",
|
|
95
|
+
"symbol": "$"
|
|
96
|
+
},
|
|
97
|
+
"unit": {
|
|
98
|
+
"symbol": "MMBtu",
|
|
99
|
+
"name": "Million British Thermal Units"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"symbol": "UANEU",
|
|
104
|
+
"name": "Urea Ammonium Nitrate",
|
|
105
|
+
"category": "Industrial",
|
|
106
|
+
"status": "inactive",
|
|
107
|
+
"updateInterval": "PER_MINUTE",
|
|
108
|
+
"deprecationDate": "2024-04-14",
|
|
109
|
+
"currency": {
|
|
110
|
+
"code": "USD",
|
|
111
|
+
"name": "US Dollar",
|
|
112
|
+
"symbol": "$"
|
|
113
|
+
},
|
|
114
|
+
"unit": {
|
|
115
|
+
"symbol": "T",
|
|
116
|
+
"name": "Metric Ton"
|
|
117
|
+
}
|
|
84
118
|
}
|
|
85
119
|
]
|
|
86
120
|
}
|
|
@@ -147,23 +181,46 @@
|
|
|
147
181
|
"properties": {
|
|
148
182
|
"symbol": {
|
|
149
183
|
"type": "string",
|
|
150
|
-
"description": "Unique identifier/ticker symbol for the commodity (e.g., XAU, NG-FUT)."
|
|
184
|
+
"description": "Unique identifier/ticker symbol for the commodity (e.g., XAU, NG-FUT). Use this value in the `symbols` parameter of the rate endpoints."
|
|
151
185
|
},
|
|
152
186
|
"name": {
|
|
153
187
|
"type": "string",
|
|
154
188
|
"description": "Full name of the commodity (e.g., Gold, Natural Gas Futures)."
|
|
155
189
|
},
|
|
190
|
+
"description": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"description": "Short description of the commodity. May be an empty string for some symbols."
|
|
193
|
+
},
|
|
156
194
|
"category": {
|
|
157
195
|
"type": "string",
|
|
158
|
-
"description": "Category the commodity belongs to (e.g., Metals, Energy)."
|
|
196
|
+
"description": "Category the commodity belongs to (e.g., Metals, Energy, Agriculture, Industrial, Raw Materials, Oils and Meals, Textiles, Meats, Poultry, Livestock)."
|
|
159
197
|
},
|
|
160
198
|
"status": {
|
|
161
199
|
"type": "string",
|
|
162
|
-
"
|
|
200
|
+
"enum": ["active", "inactive"],
|
|
201
|
+
"description": "Current status of the commodity. `inactive` means the symbol is deprecated: latest rates are unavailable, but historical rates remain available up to its `deprecationDate`."
|
|
163
202
|
},
|
|
164
203
|
"updateInterval": {
|
|
165
204
|
"type": "string",
|
|
166
|
-
"
|
|
205
|
+
"enum": [
|
|
206
|
+
"PER_SECOND",
|
|
207
|
+
"PER_MINUTE",
|
|
208
|
+
"PER_10_MINUTES",
|
|
209
|
+
"PER_HOUR",
|
|
210
|
+
"PER_DAY",
|
|
211
|
+
"PER_WEEK",
|
|
212
|
+
"PER_MONTH"
|
|
213
|
+
],
|
|
214
|
+
"description": "Rate at which the price is updated."
|
|
215
|
+
},
|
|
216
|
+
"exchange": {
|
|
217
|
+
"type": "string",
|
|
218
|
+
"description": "Optional. Data source for the symbol (e.g., World Bank). Present only for some symbols."
|
|
219
|
+
},
|
|
220
|
+
"deprecationDate": {
|
|
221
|
+
"type": "string",
|
|
222
|
+
"format": "date",
|
|
223
|
+
"description": "Optional. Present only when `status` is `inactive`. Date the symbol was deprecated (YYYY-MM-DD)."
|
|
167
224
|
},
|
|
168
225
|
"currency": {
|
|
169
226
|
"$ref": "#/components/schemas/CommodityCurrency"
|