@apifreaks/openapi-specs 0.1.0

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.
Files changed (109) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +156 -0
  3. package/dist/index.cjs +44663 -0
  4. package/dist/index.d.cts +30 -0
  5. package/dist/index.d.ts +30 -0
  6. package/dist/index.js +44631 -0
  7. package/package.json +81 -0
  8. package/specs/commodity/commodity-fluctuation.json +301 -0
  9. package/specs/commodity/commodity-prices.json +317 -0
  10. package/specs/commodity/commodity-symbols.json +215 -0
  11. package/specs/commodity/commodity-time-series.json +329 -0
  12. package/specs/commodity/historical-commodity-prices.json +273 -0
  13. package/specs/currency/currency-converter.json +261 -0
  14. package/specs/currency/currency-fluctuation.json +282 -0
  15. package/specs/currency/currency-historical-data-limit.json +158 -0
  16. package/specs/currency/currency-rate.json +229 -0
  17. package/specs/currency/currency-supported.json +234 -0
  18. package/specs/currency/currency-symbols.json +161 -0
  19. package/specs/currency/currency-time-series.json +325 -0
  20. package/specs/currency/geolocalized-currency-conversion.json +287 -0
  21. package/specs/currency/historical-currency-converter.json +269 -0
  22. package/specs/currency/historical-currency-rate.json +246 -0
  23. package/specs/dns/bulk-dns-lookup.json +624 -0
  24. package/specs/dns/dns-history-lookup.json +579 -0
  25. package/specs/dns/dns-lookup.json +466 -0
  26. package/specs/dns/reverse-dns-lookup.json +414 -0
  27. package/specs/domain/bulk-domain-checker.json +284 -0
  28. package/specs/domain/domain-search-with-suggestions.json +280 -0
  29. package/specs/domain/domain-search.json +206 -0
  30. package/specs/domain/subdomain-lookup.json +343 -0
  31. package/specs/email-validation/bulk-email-validation.json +534 -0
  32. package/specs/email-validation/email-checker.json +586 -0
  33. package/specs/financial/bulk-vat-rates-country.json +341 -0
  34. package/specs/financial/financial-apis-supported-countries.json +204 -0
  35. package/specs/financial/iban-validation.json +328 -0
  36. package/specs/financial/swift-code-finder.json +192 -0
  37. package/specs/financial/swift-code-lookup.json +220 -0
  38. package/specs/financial/vat-number-validation.json +283 -0
  39. package/specs/financial/vat-rates-by-ip.json +275 -0
  40. package/specs/financial/vat-rates-country.json +288 -0
  41. package/specs/general/usage-credits.json +218 -0
  42. package/specs/geocoding/forward-geocoding.json +402 -0
  43. package/specs/geocoding/reverse-geocoding.json +326 -0
  44. package/specs/geodb/administrative-units-details.json +250 -0
  45. package/specs/geodb/administrative-units-levels.json +198 -0
  46. package/specs/geodb/administrative-units.json +237 -0
  47. package/specs/geodb/cities.json +288 -0
  48. package/specs/geodb/countries-details.json +274 -0
  49. package/specs/geodb/countries.json +276 -0
  50. package/specs/geodb/flags-supported.json +166 -0
  51. package/specs/geodb/flags.json +227 -0
  52. package/specs/geodb/regions.json +109 -0
  53. package/specs/geodb/subregions.json +217 -0
  54. package/specs/ip-intelligence/bulk-ip-lookup.json +1162 -0
  55. package/specs/ip-intelligence/bulk-ip-threat-intelligence.json +417 -0
  56. package/specs/ip-intelligence/ip-locator.json +941 -0
  57. package/specs/ip-intelligence/ip-threat-intelligence.json +316 -0
  58. package/specs/other/astronomy-data.json +803 -0
  59. package/specs/pdf/delete-pdf-page.json +286 -0
  60. package/specs/pdf/linearize-pdf.json +277 -0
  61. package/specs/pdf/merge-pdf.json +285 -0
  62. package/specs/pdf/pdf-compress.json +304 -0
  63. package/specs/pdf/pdf-decrypt.json +297 -0
  64. package/specs/pdf/pdf-encrypt.json +314 -0
  65. package/specs/pdf/pdf-extract-pages.json +295 -0
  66. package/specs/pdf/pdf-file-status.json +208 -0
  67. package/specs/pdf/pdf-file.json +190 -0
  68. package/specs/pdf/pdf-files.json +126 -0
  69. package/specs/pdf/pdf-resource-download.json +168 -0
  70. package/specs/pdf/pdf-resource-upload-binary.json +218 -0
  71. package/specs/pdf/pdf-resource-upload.json +248 -0
  72. package/specs/pdf/pdf-restrict.json +343 -0
  73. package/specs/pdf/pdf-split-pages.json +281 -0
  74. package/specs/pdf/pdf-task-status.json +252 -0
  75. package/specs/pdf/pdf-to-image.json +1219 -0
  76. package/specs/pdf/pdf-unrestrict.json +324 -0
  77. package/specs/pdf/rotate-pdf-pages.json +305 -0
  78. package/specs/phone-validation/bulk-phone-number-validation.json +518 -0
  79. package/specs/phone-validation/phone-number-validation.json +456 -0
  80. package/specs/scraper/web-scraper.json +674 -0
  81. package/specs/screenshot/bulk-screenshot.json +949 -0
  82. package/specs/screenshot/website-screenshot.json +1147 -0
  83. package/specs/ssl/ssl-certificate-chain-lookup.json +756 -0
  84. package/specs/ssl/ssl-certificate-lookup.json +634 -0
  85. package/specs/timezone/timezone-converter.json +362 -0
  86. package/specs/timezone/timezone-lookup.json +910 -0
  87. package/specs/user-agent/bulk-user-agent-parser.json +441 -0
  88. package/specs/user-agent/user-agent-parser.json +346 -0
  89. package/specs/weather/air-quality.json +779 -0
  90. package/specs/weather/bulk-live-weather.json +834 -0
  91. package/specs/weather/flood-forecast.json +693 -0
  92. package/specs/weather/historical-weather.json +1019 -0
  93. package/specs/weather/live-weather.json +789 -0
  94. package/specs/weather/marine-weather.json +940 -0
  95. package/specs/weather/time-series-weather.json +1056 -0
  96. package/specs/weather/weather-forecast.json +1202 -0
  97. package/specs/whois/asn-lookup.json +729 -0
  98. package/specs/whois/bulk-whois-lookup.json +698 -0
  99. package/specs/whois/domain-whois-history-lookup.json +500 -0
  100. package/specs/whois/reverse-whois.json +625 -0
  101. package/specs/whois/whois-domain-lookup.json +533 -0
  102. package/specs/whois/whois-ip-lookup.json +1110 -0
  103. package/specs/zip-code/bulk-zip-code-lookup.json +318 -0
  104. package/specs/zip-code/zip-code-api.json +299 -0
  105. package/specs/zip-code/zip-code-distance-match.json +311 -0
  106. package/specs/zip-code/zip-code-distance.json +307 -0
  107. package/specs/zip-code/zip-codes-by-city.json +279 -0
  108. package/specs/zip-code/zip-codes-by-region.json +278 -0
  109. package/specs/zip-code/zip-codes-radius-search.json +349 -0
@@ -0,0 +1,329 @@
1
+ {
2
+ "openapi": "3.1.1",
3
+ "info": {
4
+ "title": "Commodities Time Series API",
5
+ "version": "1.0.0",
6
+ "description": "Retrieve daily OHLC (open, high, low, close) price data for any supported commodity over a date range of up to 365 days. Accepts one or more comma-separated commodity symbols with a start and end date in YYYY-MM-DD format. Returns a date-indexed object where each date key maps to per-symbol OHLC data. Non-trading days are automatically excluded. Returns a 400 error for invalid dates or a range exceeding 365 days, and a 404 error for unsupported symbols or a date range with no available data.",
7
+ "contact": {
8
+ "name": "APIFreaks Support",
9
+ "url": "https://apifreaks.com/contact",
10
+ "email": "support@apifreaks.com"
11
+ }
12
+ },
13
+ "servers": [
14
+ {
15
+ "url": "https://api.apifreaks.com/v1.0",
16
+ "description": "Commodity Time Series API Server"
17
+ }
18
+ ],
19
+ "paths": {
20
+ "/commodity/time-series": {
21
+ "get": {
22
+ "tags": [
23
+ "Commodity APIs"
24
+ ],
25
+ "summary": "Get commodity price time series",
26
+ "description": "Returns day-by-day OHLC data for the requested commodity symbols within a date range.",
27
+ "operationId": "getCommodityTimeSeries",
28
+ "parameters": [
29
+ {
30
+ "name": "format",
31
+ "in": "query",
32
+ "required": false,
33
+ "description": "Response format. Currently only `json` is supported.",
34
+ "schema": {
35
+ "type": "string",
36
+ "default": "json",
37
+ "enum": [
38
+ "json"
39
+ ]
40
+ }
41
+ },
42
+ {
43
+ "name": "symbols",
44
+ "in": "query",
45
+ "required": true,
46
+ "description": "Comma-separated list of commodity symbols.",
47
+ "schema": {
48
+ "type": "string"
49
+ }
50
+ },
51
+ {
52
+ "name": "startDate",
53
+ "in": "query",
54
+ "required": true,
55
+ "description": "Start date in `YYYY-MM-DD` format.",
56
+ "schema": {
57
+ "type": "string"
58
+ }
59
+ },
60
+ {
61
+ "name": "endDate",
62
+ "in": "query",
63
+ "required": true,
64
+ "description": "End date in `YYYY-MM-DD` format. Maximum range is 365 days.",
65
+ "schema": {
66
+ "type": "string"
67
+ }
68
+ }
69
+ ],
70
+ "responses": {
71
+ "200": {
72
+ "description": "Successful operation",
73
+ "content": {
74
+ "application/json": {
75
+ "schema": {
76
+ "$ref": "#/components/schemas/CommodityTimeSeriesResponse"
77
+ },
78
+ "examples": {
79
+ "success": {
80
+ "summary": "Successful response",
81
+ "value": {
82
+ "success": true,
83
+ "startDate": "2025-01-06",
84
+ "endDate": "2025-01-08",
85
+ "rates": {
86
+ "2025-01-06": {
87
+ "XAU": {
88
+ "open": 2649.01,
89
+ "high": 2651.33,
90
+ "low": 2645.36,
91
+ "close": 2646.91
92
+ }
93
+ },
94
+ "2025-01-07": {
95
+ "XAU": {
96
+ "open": 2662.45,
97
+ "high": 2663.06,
98
+ "low": 2655.66,
99
+ "close": 2658.9
100
+ }
101
+ },
102
+ "2025-01-08": {
103
+ "XAU": {
104
+ "open": 2669.69,
105
+ "high": 2674.68,
106
+ "low": 2668.58,
107
+ "close": 2671.8
108
+ }
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
116
+ },
117
+ "400": {
118
+ "description": "Bad Request \u2014 Missing parameters, invalid dates, or date range exceeded",
119
+ "content": {
120
+ "application/json": {
121
+ "examples": {
122
+ "missingSymbols": {
123
+ "summary": "Missing required symbols parameter",
124
+ "value": {
125
+ "error": "Invalid Param Exception",
126
+ "message": "please pass correct parameters",
127
+ "path": "/v1.0/commodity/time-series",
128
+ "status": 400,
129
+ "timestamp": "2026-07-27T11:38:40.063Z"
130
+ }
131
+ },
132
+ "invalidDate": {
133
+ "summary": "Date does not exist on the calendar",
134
+ "value": {
135
+ "timestamp": "2026-07-27T11:38:41.234Z",
136
+ "path": "/rates/time-series",
137
+ "code": 400,
138
+ "error": "VALIDATION_ERROR",
139
+ "message": "Invalid Date: The provided start date or end date does not exist."
140
+ }
141
+ },
142
+ "startAfterEnd": {
143
+ "summary": "startDate is after endDate",
144
+ "value": {
145
+ "timestamp": "2026-07-27T11:38:41.234Z",
146
+ "path": "/rates/time-series",
147
+ "code": 400,
148
+ "error": "VALIDATION_ERROR",
149
+ "message": "start date cannot be after end date"
150
+ }
151
+ },
152
+ "dateRangeExceeded": {
153
+ "summary": "Date range exceeds 365 days",
154
+ "value": {
155
+ "timestamp": "2026-07-27T11:38:40.699Z",
156
+ "path": "/rates/time-series",
157
+ "code": 400,
158
+ "error": "VALIDATION_ERROR",
159
+ "message": "Date range exceeds the allowed limit."
160
+ }
161
+ }
162
+ },
163
+ "schema": {
164
+ "$ref": "#/components/schemas/ErrorResponse"
165
+ }
166
+ }
167
+ }
168
+ },
169
+ "404": {
170
+ "description": "Not found - Symbol or data not available",
171
+ "content": {
172
+ "application/json": {
173
+ "schema": {
174
+ "$ref": "#/components/schemas/ErrorResponse"
175
+ },
176
+ "examples": {
177
+ "symbolNotFound": {
178
+ "summary": "Symbol Not Found",
179
+ "value": {
180
+ "timestamp": "2026-07-27T11:38:41.234Z",
181
+ "path": "/rates/time-series",
182
+ "code": 404,
183
+ "error": "SYMBOL_NOT_FOUND",
184
+ "message": "The symbol is not supported, please visit the documentation for a list of supported symbols"
185
+ }
186
+ },
187
+ "dataNotFound": {
188
+ "summary": "No data available for the given date range",
189
+ "value": {
190
+ "timestamp": "2026-07-27T11:38:41.234Z",
191
+ "path": "/rates/time-series",
192
+ "code": 404,
193
+ "error": "DATA_NOT_FOUND",
194
+ "message": "No data found for the specified date range"
195
+ }
196
+ }
197
+ }
198
+ }
199
+ }
200
+ }
201
+ }
202
+ }
203
+ }
204
+ },
205
+ "components": {
206
+ "securitySchemes": {
207
+ "ApiKeyAuthHeader": {
208
+ "type": "apiKey",
209
+ "in": "header",
210
+ "name": "X-apiKey",
211
+ "description": "Pass your API key via the X-apiKey request header."
212
+ },
213
+ "ApiKeyAuthQuery": {
214
+ "type": "apiKey",
215
+ "in": "query",
216
+ "name": "apiKey",
217
+ "description": "Pass your API key via the apiKey query parameter."
218
+ }
219
+ },
220
+ "schemas": {
221
+ "CommodityTimeSeriesResponse": {
222
+ "type": "object",
223
+ "required": [
224
+ "success",
225
+ "startDate",
226
+ "endDate",
227
+ "rates"
228
+ ],
229
+ "properties": {
230
+ "success": {
231
+ "type": "boolean",
232
+ "description": "`true` for successful requests."
233
+ },
234
+ "startDate": {
235
+ "type": "string",
236
+ "description": "Start date of the time series (YYYY-MM-DD)."
237
+ },
238
+ "endDate": {
239
+ "type": "string",
240
+ "description": "End date of the time series (YYYY-MM-DD)."
241
+ },
242
+ "rates": {
243
+ "$ref": "#/components/schemas/CommodityTimeSeriesRates"
244
+ }
245
+ },
246
+ "description": "Commodity time series response containing date-indexed OHLC data per symbol."
247
+ },
248
+ "CommodityTimeSeriesRates": {
249
+ "type": "object",
250
+ "description": "Map of trading dates to per-symbol OHLC data. Each key is a trading date (YYYY-MM-DD); non-trading days are excluded.",
251
+ "additionalProperties": {
252
+ "title": "CommodityTimeSeriesSymbolData",
253
+ "type": "object",
254
+ "description": "Map of commodity symbols to their OHLC data for a single trading date. Each key is a commodity symbol (e.g. XAU).",
255
+ "additionalProperties": {
256
+ "$ref": "#/components/schemas/CommodityOhlc"
257
+ }
258
+ }
259
+ },
260
+ "CommodityOhlc": {
261
+ "type": "object",
262
+ "description": "OHLC price data for a single commodity on a single trading day.",
263
+ "required": ["open", "high", "low", "close"],
264
+ "properties": {
265
+ "open": {
266
+ "type": "number",
267
+ "format": "float",
268
+ "description": "Opening price on the given date."
269
+ },
270
+ "high": {
271
+ "type": "number",
272
+ "format": "float",
273
+ "description": "Highest price on the given date."
274
+ },
275
+ "low": {
276
+ "type": "number",
277
+ "format": "float",
278
+ "description": "Lowest price on the given date."
279
+ },
280
+ "close": {
281
+ "type": "number",
282
+ "format": "float",
283
+ "description": "Closing price on the given date."
284
+ }
285
+ }
286
+ },
287
+ "ErrorResponse": {
288
+ "type": "object",
289
+ "description": "Standard error envelope returned by the API on failed requests. Gateway-level validation errors populate status; commodity-service errors (date/symbol/data validation) populate code instead — check whichever is present.",
290
+ "required": ["message"],
291
+ "properties": {
292
+ "error": {
293
+ "type": "string",
294
+ "description": "Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, DATA_NOT_FOUND)."
295
+ },
296
+ "message": {
297
+ "type": "string",
298
+ "description": "Human-readable error message describing the failure."
299
+ },
300
+ "path": {
301
+ "type": "string",
302
+ "description": "API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error."
303
+ },
304
+ "status": {
305
+ "type": "integer",
306
+ "description": "HTTP status code. Present on gateway-level errors."
307
+ },
308
+ "code": {
309
+ "type": "integer",
310
+ "description": "HTTP status code. Present on commodity-service errors instead of status."
311
+ },
312
+ "timestamp": {
313
+ "type": "string",
314
+ "format": "date-time",
315
+ "description": "Timestamp when the error occurred (ISO 8601)."
316
+ }
317
+ }
318
+ }
319
+ }
320
+ },
321
+ "security": [
322
+ {
323
+ "ApiKeyAuthHeader": []
324
+ },
325
+ {
326
+ "ApiKeyAuthQuery": []
327
+ }
328
+ ]
329
+ }
@@ -0,0 +1,273 @@
1
+ {
2
+ "openapi": "3.1.1",
3
+ "info": {
4
+ "title": "Historical Commodity Prices, Delivered Simply.",
5
+ "version": "1.0.0",
6
+ "description": "Retrieve OHLC (open, high, low, close) price data for any supported commodity on a specific date. Data is available from January 1990 onwards for 130+ commodities. Accepts one or more comma-separated commodity symbols and a date in YYYY-MM-DD format. The response contains the opening, high, low, and closing price for each symbol on the given date. Returns a 400 error for invalid dates and a 404 error for unsupported symbols or missing rates.",
7
+ "contact": {
8
+ "name": "APIFreaks Support",
9
+ "url": "https://apifreaks.com/contact",
10
+ "email": "support@apifreaks.com"
11
+ }
12
+ },
13
+ "servers": [
14
+ {
15
+ "url": "https://api.apifreaks.com/v1.0",
16
+ "description": "Historical Commodity Prices API Server"
17
+ }
18
+ ],
19
+ "paths": {
20
+ "/commodity/rates/historical": {
21
+ "get": {
22
+ "tags": ["Commodity APIs"],
23
+ "summary": "Get historical commodity prices",
24
+ "description": "Returns OHLC price data for the requested commodity symbols on a specific date.",
25
+ "operationId": "getHistoricalCommodityPrices",
26
+ "parameters": [
27
+ {
28
+ "name": "format",
29
+ "in": "query",
30
+ "required": false,
31
+ "description": "Response format. Currently only `json` is supported.",
32
+ "schema": {
33
+ "type": "string",
34
+ "default": "json",
35
+ "enum": ["json"]
36
+ }
37
+ },
38
+ {
39
+ "name": "symbols",
40
+ "in": "query",
41
+ "required": true,
42
+ "description": "Comma-separated list of commodity symbols.",
43
+ "schema": {
44
+ "type": "string"
45
+ }
46
+ },
47
+ {
48
+ "name": "date",
49
+ "in": "query",
50
+ "required": true,
51
+ "description": "Date in `YYYY-MM-DD` format. Data available from 1990 onwards.",
52
+ "schema": {
53
+ "type": "string"
54
+ }
55
+ }
56
+ ],
57
+ "responses": {
58
+ "200": {
59
+ "description": "Successful operation",
60
+ "content": {
61
+ "application/json": {
62
+ "schema": {
63
+ "$ref": "#/components/schemas/HistoricalCommodityPricesResponse"
64
+ },
65
+ "examples": {
66
+ "success": {
67
+ "summary": "Successful response",
68
+ "value": {
69
+ "success": true,
70
+ "date": "2025-01-10",
71
+ "rates": {
72
+ "WTIOIL-SPOT": {
73
+ "date": "2025-01-10",
74
+ "open": 73.77,
75
+ "high": 77.16,
76
+ "low": 73.55,
77
+ "close": 75.97
78
+ },
79
+ "XAU": {
80
+ "date": "2025-01-10",
81
+ "open": 2669.93,
82
+ "high": 2697.85,
83
+ "low": 2663.61,
84
+ "close": 2689.44
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
92
+ },
93
+ "400": {
94
+ "description": "Bad request - Invalid date format",
95
+ "content": {
96
+ "application/json": {
97
+ "schema": {
98
+ "$ref": "#/components/schemas/ErrorResponse"
99
+ },
100
+ "examples": {
101
+ "invalidDateFormat": {
102
+ "summary": "Invalid date format",
103
+ "value": {
104
+ "timestamp": 1781792620618,
105
+ "status": 400,
106
+ "error": "VALIDATION_ERROR",
107
+ "message": "Invalid Date Format (YYYY-MM-DD).",
108
+ "path": "/v1.0/commodity/rates/historical"
109
+ }
110
+ },
111
+ "dateNotExist": {
112
+ "summary": "Date does not exist",
113
+ "value": {
114
+ "timestamp": 1781792620618,
115
+ "status": 400,
116
+ "error": "VALIDATION_ERROR",
117
+ "message": "Invalid Date: The provided date does not exist.",
118
+ "path": "/v1.0/commodity/rates/historical"
119
+ }
120
+ }
121
+ }
122
+ }
123
+ }
124
+ },
125
+ "404": {
126
+ "description": "Not found - Symbol or rate not available",
127
+ "content": {
128
+ "application/json": {
129
+ "schema": {
130
+ "$ref": "#/components/schemas/ErrorResponse"
131
+ },
132
+ "examples": {
133
+ "symbolNotFound": {
134
+ "summary": "Symbol Not Found",
135
+ "value": {
136
+ "timestamp": 1781792620618,
137
+ "status": 404,
138
+ "error": "SYMBOL_NOT_FOUND",
139
+ "message": "The symbol is not supported, please visit the documentation for a list of supported symbols",
140
+ "path": "/v1.0/commodity/rates/historical"
141
+ }
142
+ },
143
+ "rateNotFound": {
144
+ "summary": "Rate Not Found",
145
+ "value": {
146
+ "timestamp": 1781792620618,
147
+ "status": 404,
148
+ "error": "RATE_NOT_FOUND",
149
+ "message": "no rates found for the specified date",
150
+ "path": "/v1.0/commodity/rates/historical"
151
+ }
152
+ }
153
+ }
154
+ }
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+ },
161
+ "components": {
162
+ "securitySchemes": {
163
+ "ApiKeyAuthHeader": {
164
+ "type": "apiKey",
165
+ "in": "header",
166
+ "name": "X-apiKey",
167
+ "description": "Pass your API key via the X-apiKey request header."
168
+ },
169
+ "ApiKeyAuthQuery": {
170
+ "type": "apiKey",
171
+ "in": "query",
172
+ "name": "apiKey",
173
+ "description": "Pass your API key via the apiKey query parameter."
174
+ }
175
+ },
176
+ "schemas": {
177
+ "HistoricalCommodityPricesResponse": {
178
+ "type": "object",
179
+ "required": ["success", "date", "rates"],
180
+ "properties": {
181
+ "success": {
182
+ "type": "boolean",
183
+ "description": "`true` for successful requests."
184
+ },
185
+ "date": {
186
+ "type": "string",
187
+ "description": "Date for which prices were fetched (YYYY-MM-DD)."
188
+ },
189
+ "rates": {
190
+ "$ref": "#/components/schemas/HistoricalCommodityRates"
191
+ }
192
+ },
193
+ "description": "Historical commodity prices response containing success status, date, and OHLC rate data."
194
+ },
195
+ "HistoricalCommodityRates": {
196
+ "type": "object",
197
+ "description": "Object of commodity symbols to their OHLC price data. Each key is a commodity symbol and the value contains date, open, high, low, and close prices.",
198
+ "properties": {
199
+ "symbol": {
200
+ "$ref": "#/components/schemas/HistoricalCommodityRate"
201
+ }
202
+ },
203
+ "required": ["symbol"]
204
+ },
205
+ "HistoricalCommodityRate": {
206
+ "type": "object",
207
+ "description": "OHLC price data for a single commodity on a specific date.",
208
+ "required": ["date", "open", "high", "low", "close"],
209
+ "properties": {
210
+ "date": {
211
+ "type": "string",
212
+ "description": "Date for which prices were fetched (YYYY-MM-DD)."
213
+ },
214
+ "open": {
215
+ "type": "number",
216
+ "format": "float",
217
+ "description": "Opening price on the given date."
218
+ },
219
+ "high": {
220
+ "type": "number",
221
+ "format": "float",
222
+ "description": "Highest price recorded on the given date."
223
+ },
224
+ "low": {
225
+ "type": "number",
226
+ "format": "float",
227
+ "description": "Lowest price recorded on the given date."
228
+ },
229
+ "close": {
230
+ "type": "number",
231
+ "format": "float",
232
+ "description": "Closing price on the given date."
233
+ }
234
+ }
235
+ },
236
+ "ErrorResponse": {
237
+ "type": "object",
238
+ "required": ["timestamp", "status", "error", "message", "path"],
239
+ "properties": {
240
+ "timestamp": {
241
+ "type": "integer",
242
+ "description": "Unix timestamp in milliseconds when the error occurred."
243
+ },
244
+ "status": {
245
+ "type": "integer",
246
+ "description": "HTTP status code returned with the error."
247
+ },
248
+ "error": {
249
+ "type": "string",
250
+ "description": "Specific error type (e.g., SYMBOL_NOT_FOUND, VALIDATION_ERROR)."
251
+ },
252
+ "message": {
253
+ "type": "string",
254
+ "description": "Human-readable error message describing the failure."
255
+ },
256
+ "path": {
257
+ "type": "string",
258
+ "description": "API endpoint path that produced the error."
259
+ }
260
+ },
261
+ "description": "Standard error envelope returned by the API on failed requests."
262
+ }
263
+ }
264
+ },
265
+ "security": [
266
+ {
267
+ "ApiKeyAuthHeader": []
268
+ },
269
+ {
270
+ "ApiKeyAuthQuery": []
271
+ }
272
+ ]
273
+ }