@apifreaks/openapi-specs 0.4.3 → 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 +70 -41
- package/dist/index.js +70 -41
- package/dist/specs/commodity/commodity-fluctuation.yaml +1 -1
- package/dist/specs/commodity/commodity-prices.yaml +2 -20
- package/dist/specs/commodity/commodity-symbols.yaml +1 -1
- package/dist/specs/commodity/commodity-time-series.yaml +30 -5
- package/dist/specs/commodity/historical-commodity-prices.yaml +18 -6
- package/package.json +1 -1
- package/specs/commodity/commodity-fluctuation.json +1 -1
- package/specs/commodity/commodity-prices.json +2 -23
- package/specs/commodity/commodity-symbols.json +1 -1
- package/specs/commodity/commodity-time-series.json +39 -5
- package/specs/commodity/historical-commodity-prices.json +22 -6
|
@@ -2,7 +2,7 @@ openapi: 3.1.1
|
|
|
2
2
|
info:
|
|
3
3
|
title: 'Commodity Fluctuation API '
|
|
4
4
|
version: 2.0.0
|
|
5
|
-
description:
|
|
5
|
+
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.
|
|
6
6
|
contact:
|
|
7
7
|
name: APIFreaks Support
|
|
8
8
|
url: https://apifreaks.com/contact
|
|
@@ -2,7 +2,7 @@ openapi: 3.1.1
|
|
|
2
2
|
info:
|
|
3
3
|
title: Live Commodity Prices API - Real Time Market Insights
|
|
4
4
|
version: 2.0.0
|
|
5
|
-
description:
|
|
5
|
+
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.
|
|
6
6
|
contact:
|
|
7
7
|
name: APIFreaks Support
|
|
8
8
|
url: https://apifreaks.com/contact
|
|
@@ -34,16 +34,6 @@ paths:
|
|
|
34
34
|
description: Comma-separated list of commodity symbols (e.g., `XAU`, `WTIOIL-SPOT`).
|
|
35
35
|
schema:
|
|
36
36
|
type: string
|
|
37
|
-
- name: updates
|
|
38
|
-
in: query
|
|
39
|
-
required: true
|
|
40
|
-
description: 'Update frequency. Accepted values: `10m` (default), `1m`.'
|
|
41
|
-
schema:
|
|
42
|
-
type: string
|
|
43
|
-
enum:
|
|
44
|
-
- 10m
|
|
45
|
-
- 1m
|
|
46
|
-
default: 10m
|
|
47
37
|
- name: quote
|
|
48
38
|
in: query
|
|
49
39
|
required: false
|
|
@@ -59,7 +49,7 @@ paths:
|
|
|
59
49
|
$ref: '#/components/schemas/LiveCommodityPricesResponse'
|
|
60
50
|
examples:
|
|
61
51
|
success:
|
|
62
|
-
summary: Successful response
|
|
52
|
+
summary: Successful response
|
|
63
53
|
value:
|
|
64
54
|
success: true
|
|
65
55
|
timestamp: 1789375397
|
|
@@ -143,14 +133,6 @@ paths:
|
|
|
143
133
|
path: /v2.0/commodity/rates/latest
|
|
144
134
|
status: 400
|
|
145
135
|
timestamp: '2026-09-14T08:43:43.964Z'
|
|
146
|
-
invalidUpdates:
|
|
147
|
-
summary: updates is not 10m or 1m
|
|
148
|
-
value:
|
|
149
|
-
error: Invalid Param Exception
|
|
150
|
-
message: please pass correct parameters
|
|
151
|
-
path: /v2.0/commodity/rates/latest
|
|
152
|
-
status: 400
|
|
153
|
-
timestamp: '2026-09-14T08:43:44.440Z'
|
|
154
136
|
headers:
|
|
155
137
|
X-AF-Credits-Cost:
|
|
156
138
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
@@ -2,7 +2,7 @@ openapi: 3.1.1
|
|
|
2
2
|
info:
|
|
3
3
|
title: Commodity Symbols API Reference
|
|
4
4
|
version: 2.0.0
|
|
5
|
-
description: '
|
|
5
|
+
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`.'
|
|
6
6
|
contact:
|
|
7
7
|
name: APIFreaks Support
|
|
8
8
|
url: https://apifreaks.com/contact
|
|
@@ -2,7 +2,7 @@ openapi: 3.1.1
|
|
|
2
2
|
info:
|
|
3
3
|
title: Commodities Time Series API
|
|
4
4
|
version: 2.0.0
|
|
5
|
-
description:
|
|
5
|
+
description: Daily OHLC history for one or more commodities over a date range of up to 365 days, indexed by date. Non-trading days are excluded. Monthly-updated commodities only have a closing price — `open`, `high`, and `low` come back as `0`. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.
|
|
6
6
|
contact:
|
|
7
7
|
name: APIFreaks Support
|
|
8
8
|
url: https://apifreaks.com/contact
|
|
@@ -79,6 +79,31 @@ paths:
|
|
|
79
79
|
high: 2674.68
|
|
80
80
|
low: 2668.58
|
|
81
81
|
close: 2671.8
|
|
82
|
+
monthlyCommodity:
|
|
83
|
+
summary: Monthly-updated commodity (open/high/low unavailable)
|
|
84
|
+
value:
|
|
85
|
+
success: true
|
|
86
|
+
startDate: '2025-01-01'
|
|
87
|
+
endDate: '2025-03-01'
|
|
88
|
+
rates:
|
|
89
|
+
'2025-01-01':
|
|
90
|
+
NG-EU:
|
|
91
|
+
open: 0
|
|
92
|
+
high: 0
|
|
93
|
+
low: 0
|
|
94
|
+
close: 14.66
|
|
95
|
+
'2025-02-01':
|
|
96
|
+
NG-EU:
|
|
97
|
+
open: 0
|
|
98
|
+
high: 0
|
|
99
|
+
low: 0
|
|
100
|
+
close: 15.34
|
|
101
|
+
'2025-03-01':
|
|
102
|
+
NG-EU:
|
|
103
|
+
open: 0
|
|
104
|
+
high: 0
|
|
105
|
+
low: 0
|
|
106
|
+
close: 13.24
|
|
82
107
|
headers:
|
|
83
108
|
X-AF-Credits-Cost:
|
|
84
109
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
@@ -267,7 +292,7 @@ components:
|
|
|
267
292
|
$ref: '#/components/schemas/CommodityOhlc'
|
|
268
293
|
CommodityOhlc:
|
|
269
294
|
type: object
|
|
270
|
-
description: OHLC price data for a single commodity on a single trading day.
|
|
295
|
+
description: OHLC price data for a single commodity on a single trading day. For monthly-updated commodities, only `close` is meaningful — `open`, `high`, and `low` are returned as `0`.
|
|
271
296
|
required:
|
|
272
297
|
- open
|
|
273
298
|
- high
|
|
@@ -277,15 +302,15 @@ components:
|
|
|
277
302
|
open:
|
|
278
303
|
type: number
|
|
279
304
|
format: float
|
|
280
|
-
description: Opening price on the given date.
|
|
305
|
+
description: Opening price on the given date. `0` for monthly-updated commodities.
|
|
281
306
|
high:
|
|
282
307
|
type: number
|
|
283
308
|
format: float
|
|
284
|
-
description: Highest price on the given date.
|
|
309
|
+
description: Highest price on the given date. `0` for monthly-updated commodities.
|
|
285
310
|
low:
|
|
286
311
|
type: number
|
|
287
312
|
format: float
|
|
288
|
-
description: Lowest price on the given date.
|
|
313
|
+
description: Lowest price on the given date. `0` for monthly-updated commodities.
|
|
289
314
|
close:
|
|
290
315
|
type: number
|
|
291
316
|
format: float
|
|
@@ -2,7 +2,7 @@ openapi: 3.1.1
|
|
|
2
2
|
info:
|
|
3
3
|
title: Historical Commodity Prices, Delivered Simply.
|
|
4
4
|
version: 2.0.0
|
|
5
|
-
description:
|
|
5
|
+
description: OHLC price data for one or more commodities on a specific date, back to January 1990. Falls back to the nearest earlier rate if none exists for the exact date. Monthly-updated commodities only have a closing price — `open`, `high`, and `low` come back as `0`. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.
|
|
6
6
|
contact:
|
|
7
7
|
name: APIFreaks Support
|
|
8
8
|
url: https://apifreaks.com/contact
|
|
@@ -66,6 +66,18 @@ paths:
|
|
|
66
66
|
high: 2697.85
|
|
67
67
|
low: 2663.61
|
|
68
68
|
close: 2689.44
|
|
69
|
+
monthlyCommodity:
|
|
70
|
+
summary: Monthly-updated commodity (open/high/low unavailable)
|
|
71
|
+
value:
|
|
72
|
+
success: true
|
|
73
|
+
date: '2025-01-10'
|
|
74
|
+
rates:
|
|
75
|
+
NG-EU:
|
|
76
|
+
date: '2025-01-01'
|
|
77
|
+
open: 0
|
|
78
|
+
high: 0
|
|
79
|
+
low: 0
|
|
80
|
+
close: 14.66
|
|
69
81
|
headers:
|
|
70
82
|
X-AF-Credits-Cost:
|
|
71
83
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
@@ -228,7 +240,7 @@ components:
|
|
|
228
240
|
- symbol
|
|
229
241
|
HistoricalCommodityRate:
|
|
230
242
|
type: object
|
|
231
|
-
description: OHLC price data for a single commodity on a specific date.
|
|
243
|
+
description: OHLC price data for a single commodity on a specific date. For monthly-updated commodities, only `close` is meaningful — `open`, `high`, and `low` are returned as `0`.
|
|
232
244
|
required:
|
|
233
245
|
- date
|
|
234
246
|
- open
|
|
@@ -238,19 +250,19 @@ components:
|
|
|
238
250
|
properties:
|
|
239
251
|
date:
|
|
240
252
|
type: string
|
|
241
|
-
description: Date for which prices were fetched (YYYY-MM-DD). May differ from the requested `date` when the API falls back to the last available rate before it.
|
|
253
|
+
description: Date for which prices were fetched (YYYY-MM-DD). May differ from the requested `date` when the API falls back to the last available rate before it, or snaps to the first day of the month for monthly-updated commodities.
|
|
242
254
|
open:
|
|
243
255
|
type: number
|
|
244
256
|
format: float
|
|
245
|
-
description: Opening price on the given date.
|
|
257
|
+
description: Opening price on the given date. `0` for monthly-updated commodities.
|
|
246
258
|
high:
|
|
247
259
|
type: number
|
|
248
260
|
format: float
|
|
249
|
-
description: Highest price recorded on the given date.
|
|
261
|
+
description: Highest price recorded on the given date. `0` for monthly-updated commodities.
|
|
250
262
|
low:
|
|
251
263
|
type: number
|
|
252
264
|
format: float
|
|
253
|
-
description: Lowest price recorded on the given date.
|
|
265
|
+
description: Lowest price recorded on the given date. `0` for monthly-updated commodities.
|
|
254
266
|
close:
|
|
255
267
|
type: number
|
|
256
268
|
format: float
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Commodity Fluctuation API ",
|
|
5
5
|
"version": "2.0.0",
|
|
6
|
-
"description": "
|
|
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",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Live Commodity Prices API - Real Time Market Insights",
|
|
5
5
|
"version": "2.0.0",
|
|
6
|
-
"description": "
|
|
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",
|
|
@@ -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: `10m` (default), `1m`.",
|
|
52
|
-
"schema": {
|
|
53
|
-
"type": "string",
|
|
54
|
-
"enum": ["10m", "1m"],
|
|
55
|
-
"default": "10m"
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
47
|
{
|
|
59
48
|
"name": "quote",
|
|
60
49
|
"in": "query",
|
|
@@ -75,7 +64,7 @@
|
|
|
75
64
|
},
|
|
76
65
|
"examples": {
|
|
77
66
|
"success": {
|
|
78
|
-
"summary": "Successful response
|
|
67
|
+
"summary": "Successful response",
|
|
79
68
|
"value": {
|
|
80
69
|
"success": true,
|
|
81
70
|
"timestamp": 1789375397,
|
|
@@ -197,16 +186,6 @@
|
|
|
197
186
|
"status": 400,
|
|
198
187
|
"timestamp": "2026-09-14T08:43:43.964Z"
|
|
199
188
|
}
|
|
200
|
-
},
|
|
201
|
-
"invalidUpdates": {
|
|
202
|
-
"summary": "updates is not 10m or 1m",
|
|
203
|
-
"value": {
|
|
204
|
-
"error": "Invalid Param Exception",
|
|
205
|
-
"message": "please pass correct parameters",
|
|
206
|
-
"path": "/v2.0/commodity/rates/latest",
|
|
207
|
-
"status": 400,
|
|
208
|
-
"timestamp": "2026-09-14T08:43:44.440Z"
|
|
209
|
-
}
|
|
210
189
|
}
|
|
211
190
|
}
|
|
212
191
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Commodity Symbols API Reference",
|
|
5
5
|
"version": "2.0.0",
|
|
6
|
-
"description": "
|
|
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",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Commodities Time Series API",
|
|
5
5
|
"version": "2.0.0",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Daily OHLC history for one or more commodities over a date range of up to 365 days, indexed by date. Non-trading days are excluded. Monthly-updated commodities only have a closing price — `open`, `high`, and `low` come back as `0`. 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",
|
|
@@ -105,6 +105,40 @@
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
+
},
|
|
109
|
+
"monthlyCommodity": {
|
|
110
|
+
"summary": "Monthly-updated commodity (open/high/low unavailable)",
|
|
111
|
+
"value": {
|
|
112
|
+
"success": true,
|
|
113
|
+
"startDate": "2025-01-01",
|
|
114
|
+
"endDate": "2025-03-01",
|
|
115
|
+
"rates": {
|
|
116
|
+
"2025-01-01": {
|
|
117
|
+
"NG-EU": {
|
|
118
|
+
"open": 0,
|
|
119
|
+
"high": 0,
|
|
120
|
+
"low": 0,
|
|
121
|
+
"close": 14.66
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"2025-02-01": {
|
|
125
|
+
"NG-EU": {
|
|
126
|
+
"open": 0,
|
|
127
|
+
"high": 0,
|
|
128
|
+
"low": 0,
|
|
129
|
+
"close": 15.34
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"2025-03-01": {
|
|
133
|
+
"NG-EU": {
|
|
134
|
+
"open": 0,
|
|
135
|
+
"high": 0,
|
|
136
|
+
"low": 0,
|
|
137
|
+
"close": 13.24
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
108
142
|
}
|
|
109
143
|
}
|
|
110
144
|
}
|
|
@@ -373,23 +407,23 @@
|
|
|
373
407
|
},
|
|
374
408
|
"CommodityOhlc": {
|
|
375
409
|
"type": "object",
|
|
376
|
-
"description": "OHLC price data for a single commodity on a single trading day.",
|
|
410
|
+
"description": "OHLC price data for a single commodity on a single trading day. For monthly-updated commodities, only `close` is meaningful — `open`, `high`, and `low` are returned as `0`.",
|
|
377
411
|
"required": ["open", "high", "low", "close"],
|
|
378
412
|
"properties": {
|
|
379
413
|
"open": {
|
|
380
414
|
"type": "number",
|
|
381
415
|
"format": "float",
|
|
382
|
-
"description": "Opening price on the given date."
|
|
416
|
+
"description": "Opening price on the given date. `0` for monthly-updated commodities."
|
|
383
417
|
},
|
|
384
418
|
"high": {
|
|
385
419
|
"type": "number",
|
|
386
420
|
"format": "float",
|
|
387
|
-
"description": "Highest price on the given date."
|
|
421
|
+
"description": "Highest price on the given date. `0` for monthly-updated commodities."
|
|
388
422
|
},
|
|
389
423
|
"low": {
|
|
390
424
|
"type": "number",
|
|
391
425
|
"format": "float",
|
|
392
|
-
"description": "Lowest price on the given date."
|
|
426
|
+
"description": "Lowest price on the given date. `0` for monthly-updated commodities."
|
|
393
427
|
},
|
|
394
428
|
"close": {
|
|
395
429
|
"type": "number",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Historical Commodity Prices, Delivered Simply.",
|
|
5
5
|
"version": "2.0.0",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "OHLC price data for one or more commodities on a specific date, back to January 1990. Falls back to the nearest earlier rate if none exists for the exact date. Monthly-updated commodities only have a closing price — `open`, `high`, and `low` come back as `0`. 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",
|
|
@@ -85,6 +85,22 @@
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
+
},
|
|
89
|
+
"monthlyCommodity": {
|
|
90
|
+
"summary": "Monthly-updated commodity (open/high/low unavailable)",
|
|
91
|
+
"value": {
|
|
92
|
+
"success": true,
|
|
93
|
+
"date": "2025-01-10",
|
|
94
|
+
"rates": {
|
|
95
|
+
"NG-EU": {
|
|
96
|
+
"date": "2025-01-01",
|
|
97
|
+
"open": 0,
|
|
98
|
+
"high": 0,
|
|
99
|
+
"low": 0,
|
|
100
|
+
"close": 14.66
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
88
104
|
}
|
|
89
105
|
}
|
|
90
106
|
}
|
|
@@ -319,27 +335,27 @@
|
|
|
319
335
|
},
|
|
320
336
|
"HistoricalCommodityRate": {
|
|
321
337
|
"type": "object",
|
|
322
|
-
"description": "OHLC price data for a single commodity on a specific date.",
|
|
338
|
+
"description": "OHLC price data for a single commodity on a specific date. For monthly-updated commodities, only `close` is meaningful — `open`, `high`, and `low` are returned as `0`.",
|
|
323
339
|
"required": ["date", "open", "high", "low", "close"],
|
|
324
340
|
"properties": {
|
|
325
341
|
"date": {
|
|
326
342
|
"type": "string",
|
|
327
|
-
"description": "Date for which prices were fetched (YYYY-MM-DD). May differ from the requested `date` when the API falls back to the last available rate before it."
|
|
343
|
+
"description": "Date for which prices were fetched (YYYY-MM-DD). May differ from the requested `date` when the API falls back to the last available rate before it, or snaps to the first day of the month for monthly-updated commodities."
|
|
328
344
|
},
|
|
329
345
|
"open": {
|
|
330
346
|
"type": "number",
|
|
331
347
|
"format": "float",
|
|
332
|
-
"description": "Opening price on the given date."
|
|
348
|
+
"description": "Opening price on the given date. `0` for monthly-updated commodities."
|
|
333
349
|
},
|
|
334
350
|
"high": {
|
|
335
351
|
"type": "number",
|
|
336
352
|
"format": "float",
|
|
337
|
-
"description": "Highest price recorded on the given date."
|
|
353
|
+
"description": "Highest price recorded on the given date. `0` for monthly-updated commodities."
|
|
338
354
|
},
|
|
339
355
|
"low": {
|
|
340
356
|
"type": "number",
|
|
341
357
|
"format": "float",
|
|
342
|
-
"description": "Lowest price recorded on the given date."
|
|
358
|
+
"description": "Lowest price recorded on the given date. `0` for monthly-updated commodities."
|
|
343
359
|
},
|
|
344
360
|
"close": {
|
|
345
361
|
"type": "number",
|