@apifreaks/openapi-specs 0.4.1 → 0.4.3
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 +693 -116
- package/dist/index.js +693 -116
- package/dist/specs/commodity/commodity-fluctuation.yaml +81 -7
- package/dist/specs/commodity/commodity-prices.yaml +130 -22
- package/dist/specs/commodity/commodity-symbols.yaml +54 -7
- package/dist/specs/commodity/commodity-time-series.yaml +94 -7
- package/dist/specs/commodity/historical-commodity-prices.yaml +112 -30
- package/dist/specs/whois/bulk-whois-lookup.yaml +21 -9
- package/dist/specs/whois/domain-whois-history-lookup.yaml +12 -6
- package/dist/specs/whois/reverse-whois.yaml +9 -4
- package/dist/specs/whois/whois-domain-lookup.yaml +21 -9
- package/package.json +1 -1
- package/specs/README.md +3 -1
- package/specs/commodity/commodity-fluctuation.json +118 -8
- package/specs/commodity/commodity-prices.json +176 -23
- package/specs/commodity/commodity-symbols.json +64 -7
- package/specs/commodity/commodity-time-series.json +136 -8
- package/specs/commodity/historical-commodity-prices.json +158 -33
- package/specs/whois/bulk-whois-lookup.json +9 -9
- package/specs/whois/domain-whois-history-lookup.json +6 -6
- package/specs/whois/reverse-whois.json +8 -4
- package/specs/whois/whois-domain-lookup.json +9 -9
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"openapi": "3.1.1",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Historical Commodity Prices, Delivered Simply.",
|
|
5
|
-
"version": "
|
|
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
|
|
5
|
+
"version": "2.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 245+ commodities, and only closing rates are available for monthly-updated commodities. If a commodity has no rate on the requested date, the API falls back to the last available rate before that date and returns it along with its actual date. Accepts one or more comma-separated commodity symbols and a date in YYYY-MM-DD format. If some requested symbols can't be resolved (unsupported, or no rate on or before the requested date), a 206 Partial Content response is returned with the resolved rates plus an `unresolved` object. Returns a 400 error for invalid dates and a 404 error for unsupported symbols or missing rates.",
|
|
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": "Historical Commodity Prices API Server"
|
|
17
17
|
}
|
|
18
18
|
],
|
|
@@ -95,32 +95,107 @@
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
|
+
"206": {
|
|
99
|
+
"description": "Partial Content — Some requested symbols could not be resolved",
|
|
100
|
+
"content": {
|
|
101
|
+
"application/json": {
|
|
102
|
+
"schema": {
|
|
103
|
+
"$ref": "#/components/schemas/HistoricalCommodityPricesResponse"
|
|
104
|
+
},
|
|
105
|
+
"examples": {
|
|
106
|
+
"partial": {
|
|
107
|
+
"summary": "One valid symbol, one unresolved symbol",
|
|
108
|
+
"value": {
|
|
109
|
+
"success": true,
|
|
110
|
+
"date": "2025-01-10",
|
|
111
|
+
"rates": {
|
|
112
|
+
"XAU": {
|
|
113
|
+
"date": "2025-01-10",
|
|
114
|
+
"open": 2669.93,
|
|
115
|
+
"high": 2697.85,
|
|
116
|
+
"low": 2663.61,
|
|
117
|
+
"close": 2689.44
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"unresolved": {
|
|
121
|
+
"FAKESYM": {
|
|
122
|
+
"message": "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"headers": {
|
|
131
|
+
"X-AF-Credits-Cost": {
|
|
132
|
+
"$ref": "#/components/headers/X-AF-Credits-Cost"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
98
136
|
"400": {
|
|
99
|
-
"description": "Bad
|
|
137
|
+
"description": "Bad Request — Missing parameters or invalid date",
|
|
100
138
|
"content": {
|
|
101
139
|
"application/json": {
|
|
102
140
|
"schema": {
|
|
103
141
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
104
142
|
},
|
|
105
143
|
"examples": {
|
|
144
|
+
"missingSymbols": {
|
|
145
|
+
"summary": "Missing required symbols parameter",
|
|
146
|
+
"value": {
|
|
147
|
+
"error": "Invalid Param Exception",
|
|
148
|
+
"message": "please pass correct parameters",
|
|
149
|
+
"path": "/v2.0/commodity/rates/historical",
|
|
150
|
+
"status": 400,
|
|
151
|
+
"timestamp": "2026-09-14T08:44:32.013Z"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
106
154
|
"invalidDateFormat": {
|
|
107
155
|
"summary": "Invalid date format",
|
|
108
156
|
"value": {
|
|
109
|
-
"timestamp":
|
|
110
|
-
"
|
|
157
|
+
"timestamp": "2026-09-14T08:45:13.934Z",
|
|
158
|
+
"path": "/rates/historical",
|
|
159
|
+
"code": 400,
|
|
111
160
|
"error": "VALIDATION_ERROR",
|
|
112
|
-
"message": "Invalid Date Format (YYYY-MM-DD)."
|
|
113
|
-
"path": "/v1.0/commodity/rates/historical"
|
|
161
|
+
"message": "Invalid Date Format (YYYY-MM-DD)."
|
|
114
162
|
}
|
|
115
163
|
},
|
|
116
164
|
"dateNotExist": {
|
|
117
165
|
"summary": "Date does not exist",
|
|
118
166
|
"value": {
|
|
119
|
-
"timestamp":
|
|
120
|
-
"
|
|
167
|
+
"timestamp": "2026-09-14T08:44:01.487Z",
|
|
168
|
+
"path": "/rates/historical",
|
|
169
|
+
"code": 400,
|
|
121
170
|
"error": "VALIDATION_ERROR",
|
|
122
|
-
"message": "Invalid Date: The provided date does not exist."
|
|
123
|
-
|
|
171
|
+
"message": "Invalid Date: The provided date does not exist."
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"headers": {
|
|
178
|
+
"X-AF-Credits-Cost": {
|
|
179
|
+
"$ref": "#/components/headers/X-AF-Credits-Cost"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"402": {
|
|
184
|
+
"description": "Payment Required — Maximum symbols per request exceeded",
|
|
185
|
+
"content": {
|
|
186
|
+
"application/json": {
|
|
187
|
+
"schema": {
|
|
188
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
189
|
+
},
|
|
190
|
+
"examples": {
|
|
191
|
+
"maxSymbolsExceeded": {
|
|
192
|
+
"summary": "Too many symbols requested",
|
|
193
|
+
"value": {
|
|
194
|
+
"timestamp": "2026-09-14T08:44:01.978Z",
|
|
195
|
+
"path": "/rates/historical",
|
|
196
|
+
"code": 402,
|
|
197
|
+
"error": "PAYMENT_REQUIRED",
|
|
198
|
+
"message": "Maximum symbols per request exceeded"
|
|
124
199
|
}
|
|
125
200
|
}
|
|
126
201
|
}
|
|
@@ -143,21 +218,26 @@
|
|
|
143
218
|
"symbolNotFound": {
|
|
144
219
|
"summary": "Symbol Not Found",
|
|
145
220
|
"value": {
|
|
146
|
-
"timestamp":
|
|
147
|
-
"
|
|
221
|
+
"timestamp": "2026-09-14T08:44:01.978Z",
|
|
222
|
+
"path": "/rates/historical",
|
|
223
|
+
"code": 404,
|
|
148
224
|
"error": "SYMBOL_NOT_FOUND",
|
|
149
225
|
"message": "The symbol is not supported, please visit the documentation for a list of supported symbols",
|
|
150
|
-
"
|
|
226
|
+
"unresolved": {
|
|
227
|
+
"FAKESYM": {
|
|
228
|
+
"message": "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
229
|
+
}
|
|
230
|
+
}
|
|
151
231
|
}
|
|
152
232
|
},
|
|
153
233
|
"rateNotFound": {
|
|
154
234
|
"summary": "Rate Not Found",
|
|
155
235
|
"value": {
|
|
156
|
-
"timestamp":
|
|
157
|
-
"
|
|
236
|
+
"timestamp": "2026-09-14T08:44:02.528Z",
|
|
237
|
+
"path": "/rates/historical",
|
|
238
|
+
"code": 404,
|
|
158
239
|
"error": "RATE_NOT_FOUND",
|
|
159
|
-
"message": "no rates found for the specified date"
|
|
160
|
-
"path": "/v1.0/commodity/rates/historical"
|
|
240
|
+
"message": "no rates found for the specified date"
|
|
161
241
|
}
|
|
162
242
|
}
|
|
163
243
|
}
|
|
@@ -203,6 +283,26 @@
|
|
|
203
283
|
},
|
|
204
284
|
"rates": {
|
|
205
285
|
"$ref": "#/components/schemas/HistoricalCommodityRates"
|
|
286
|
+
},
|
|
287
|
+
"unresolved": {
|
|
288
|
+
"type": "object",
|
|
289
|
+
"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.",
|
|
290
|
+
"additionalProperties": {
|
|
291
|
+
"type": "object",
|
|
292
|
+
"properties": {
|
|
293
|
+
"message": {
|
|
294
|
+
"type": "string",
|
|
295
|
+
"description": "Detail message explaining why this symbol was not resolved."
|
|
296
|
+
},
|
|
297
|
+
"suggestions": {
|
|
298
|
+
"type": "array",
|
|
299
|
+
"description": "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
300
|
+
"items": {
|
|
301
|
+
"type": "string"
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
206
306
|
}
|
|
207
307
|
},
|
|
208
308
|
"description": "Historical commodity prices response containing success status, date, and OHLC rate data."
|
|
@@ -224,7 +324,7 @@
|
|
|
224
324
|
"properties": {
|
|
225
325
|
"date": {
|
|
226
326
|
"type": "string",
|
|
227
|
-
"description": "Date for which prices were fetched (YYYY-MM-DD)."
|
|
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."
|
|
228
328
|
},
|
|
229
329
|
"open": {
|
|
230
330
|
"type": "number",
|
|
@@ -250,19 +350,12 @@
|
|
|
250
350
|
},
|
|
251
351
|
"ErrorResponse": {
|
|
252
352
|
"type": "object",
|
|
253
|
-
"
|
|
353
|
+
"description": "Standard error envelope returned by the API on failed requests. Gateway-level validation errors populate status; commodity-service errors (date/symbol/rate validation) populate code instead — check whichever is present.",
|
|
354
|
+
"required": ["message"],
|
|
254
355
|
"properties": {
|
|
255
|
-
"timestamp": {
|
|
256
|
-
"type": "integer",
|
|
257
|
-
"description": "Unix timestamp in milliseconds when the error occurred."
|
|
258
|
-
},
|
|
259
|
-
"status": {
|
|
260
|
-
"type": "integer",
|
|
261
|
-
"description": "HTTP status code returned with the error."
|
|
262
|
-
},
|
|
263
356
|
"error": {
|
|
264
357
|
"type": "string",
|
|
265
|
-
"description": "
|
|
358
|
+
"description": "Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, RATE_NOT_FOUND)."
|
|
266
359
|
},
|
|
267
360
|
"message": {
|
|
268
361
|
"type": "string",
|
|
@@ -270,10 +363,42 @@
|
|
|
270
363
|
},
|
|
271
364
|
"path": {
|
|
272
365
|
"type": "string",
|
|
273
|
-
"description": "API endpoint path that produced the error."
|
|
366
|
+
"description": "API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error."
|
|
367
|
+
},
|
|
368
|
+
"status": {
|
|
369
|
+
"type": "integer",
|
|
370
|
+
"description": "HTTP status code. Present on gateway-level errors."
|
|
371
|
+
},
|
|
372
|
+
"code": {
|
|
373
|
+
"type": "integer",
|
|
374
|
+
"description": "HTTP status code. Present on commodity-service errors instead of status."
|
|
375
|
+
},
|
|
376
|
+
"timestamp": {
|
|
377
|
+
"type": "string",
|
|
378
|
+
"format": "date-time",
|
|
379
|
+
"description": "Timestamp when the error occurred (ISO 8601)."
|
|
380
|
+
},
|
|
381
|
+
"unresolved": {
|
|
382
|
+
"type": "object",
|
|
383
|
+
"description": "Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
|
|
384
|
+
"additionalProperties": {
|
|
385
|
+
"type": "object",
|
|
386
|
+
"properties": {
|
|
387
|
+
"message": {
|
|
388
|
+
"type": "string",
|
|
389
|
+
"description": "Detail message explaining why this symbol was not resolved."
|
|
390
|
+
},
|
|
391
|
+
"suggestions": {
|
|
392
|
+
"type": "array",
|
|
393
|
+
"description": "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
394
|
+
"items": {
|
|
395
|
+
"type": "string"
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
274
400
|
}
|
|
275
|
-
}
|
|
276
|
-
"description": "Standard error envelope returned by the API on failed requests."
|
|
401
|
+
}
|
|
277
402
|
}
|
|
278
403
|
},
|
|
279
404
|
"headers": {
|
|
@@ -557,7 +557,7 @@
|
|
|
557
557
|
"description": "IANA registrar ID."
|
|
558
558
|
},
|
|
559
559
|
"status": {
|
|
560
|
-
"type": "string",
|
|
560
|
+
"type": ["string", "null"],
|
|
561
561
|
"description": "Registrar's ICANN accreditation status (e.g. accredited), when published at the registrar level."
|
|
562
562
|
},
|
|
563
563
|
"registrar_name": {
|
|
@@ -565,15 +565,15 @@
|
|
|
565
565
|
"description": "Registered name of the registrar."
|
|
566
566
|
},
|
|
567
567
|
"normalized_name": {
|
|
568
|
-
"type": "string",
|
|
568
|
+
"type": ["string", "null"],
|
|
569
569
|
"description": "Lowercased, normalized form of the registrar name, when published at the registrar level."
|
|
570
570
|
},
|
|
571
571
|
"whois_server": {
|
|
572
|
-
"type": "string",
|
|
573
|
-
"description": "WHOIS server operated by the registrar."
|
|
572
|
+
"type": ["string", "null"],
|
|
573
|
+
"description": "WHOIS server operated by the registrar, when published."
|
|
574
574
|
},
|
|
575
575
|
"rdap_server": {
|
|
576
|
-
"type": "string",
|
|
576
|
+
"type": ["string", "null"],
|
|
577
577
|
"description": "RDAP server URL operated by the registrar, when published at the registrar level."
|
|
578
578
|
},
|
|
579
579
|
"website_url": {
|
|
@@ -581,12 +581,12 @@
|
|
|
581
581
|
"description": "Registrar's website URL."
|
|
582
582
|
},
|
|
583
583
|
"email_address": {
|
|
584
|
-
"type": "string",
|
|
585
|
-
"description": "Registrar abuse or contact email address."
|
|
584
|
+
"type": ["string", "null"],
|
|
585
|
+
"description": "Registrar abuse or contact email address, when published."
|
|
586
586
|
},
|
|
587
587
|
"phone_number": {
|
|
588
|
-
"type": "string",
|
|
589
|
-
"description": "Registrar contact phone number."
|
|
588
|
+
"type": ["string", "null"],
|
|
589
|
+
"description": "Registrar contact phone number, when published."
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
592
|
},
|
|
@@ -370,20 +370,20 @@
|
|
|
370
370
|
"description": "Registered name of the registrar."
|
|
371
371
|
},
|
|
372
372
|
"whois_server": {
|
|
373
|
-
"type": "string",
|
|
374
|
-
"description": "WHOIS server operated by the registrar."
|
|
373
|
+
"type": ["string", "null"],
|
|
374
|
+
"description": "WHOIS server operated by the registrar, when published."
|
|
375
375
|
},
|
|
376
376
|
"website_url": {
|
|
377
377
|
"type": "string",
|
|
378
378
|
"description": "Registrar's website URL."
|
|
379
379
|
},
|
|
380
380
|
"email_address": {
|
|
381
|
-
"type": "string",
|
|
382
|
-
"description": "Registrar abuse or contact email address."
|
|
381
|
+
"type": ["string", "null"],
|
|
382
|
+
"description": "Registrar abuse or contact email address, when published."
|
|
383
383
|
},
|
|
384
384
|
"phone_number": {
|
|
385
|
-
"type": "string",
|
|
386
|
-
"description": "Registrar contact phone number."
|
|
385
|
+
"type": ["string", "null"],
|
|
386
|
+
"description": "Registrar contact phone number, when published."
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
},
|
|
@@ -492,7 +492,7 @@
|
|
|
492
492
|
},
|
|
493
493
|
"status": {
|
|
494
494
|
"type": ["string", "null"],
|
|
495
|
-
"description": "Accreditation status of the registrar (e.g., 'accredited')."
|
|
495
|
+
"description": "Accreditation status of the registrar (e.g., 'accredited'), when published."
|
|
496
496
|
},
|
|
497
497
|
"registrar_name": {
|
|
498
498
|
"type": ["string", "null"],
|
|
@@ -500,16 +500,16 @@
|
|
|
500
500
|
},
|
|
501
501
|
"normalized_name": {
|
|
502
502
|
"type": ["string", "null"],
|
|
503
|
-
"description": "Normalized (lowercase, stripped) registrar name."
|
|
503
|
+
"description": "Normalized (lowercase, stripped) registrar name, when published."
|
|
504
504
|
},
|
|
505
505
|
"whois_server": {
|
|
506
506
|
"type": ["string", "null"],
|
|
507
|
-
"description": "WHOIS server of the registrar."
|
|
507
|
+
"description": "WHOIS server of the registrar, when published."
|
|
508
508
|
},
|
|
509
509
|
"rdap_server": {
|
|
510
510
|
"type": ["string", "null"],
|
|
511
511
|
"format": "uri",
|
|
512
|
-
"description": "RDAP (Registration Data Access Protocol) server URL of the registrar."
|
|
512
|
+
"description": "RDAP (Registration Data Access Protocol) server URL of the registrar, when published."
|
|
513
513
|
},
|
|
514
514
|
"website_url": {
|
|
515
515
|
"type": ["string", "null"],
|
|
@@ -535,6 +535,10 @@
|
|
|
535
535
|
"type": ["string", "null"],
|
|
536
536
|
"description": "Contact identifier."
|
|
537
537
|
},
|
|
538
|
+
"handle": {
|
|
539
|
+
"type": ["string", "null"],
|
|
540
|
+
"description": "Registry handle for the contact, when published."
|
|
541
|
+
},
|
|
538
542
|
"name": {
|
|
539
543
|
"type": ["string", "null"],
|
|
540
544
|
"description": "Name of the contact person."
|
|
@@ -392,7 +392,7 @@
|
|
|
392
392
|
"description": "IANA registrar ID."
|
|
393
393
|
},
|
|
394
394
|
"status": {
|
|
395
|
-
"type": "string",
|
|
395
|
+
"type": ["string", "null"],
|
|
396
396
|
"description": "Registrar's ICANN accreditation status (e.g. accredited), when published at the registrar level."
|
|
397
397
|
},
|
|
398
398
|
"registrar_name": {
|
|
@@ -400,15 +400,15 @@
|
|
|
400
400
|
"description": "Registered name of the registrar."
|
|
401
401
|
},
|
|
402
402
|
"normalized_name": {
|
|
403
|
-
"type": "string",
|
|
403
|
+
"type": ["string", "null"],
|
|
404
404
|
"description": "Lowercased, normalized form of the registrar name, when published at the registrar level."
|
|
405
405
|
},
|
|
406
406
|
"whois_server": {
|
|
407
|
-
"type": "string",
|
|
408
|
-
"description": "WHOIS server operated by the registrar."
|
|
407
|
+
"type": ["string", "null"],
|
|
408
|
+
"description": "WHOIS server operated by the registrar, when published."
|
|
409
409
|
},
|
|
410
410
|
"rdap_server": {
|
|
411
|
-
"type": "string",
|
|
411
|
+
"type": ["string", "null"],
|
|
412
412
|
"description": "RDAP server URL operated by the registrar, when published at the registrar level."
|
|
413
413
|
},
|
|
414
414
|
"website_url": {
|
|
@@ -416,12 +416,12 @@
|
|
|
416
416
|
"description": "Registrar's website URL."
|
|
417
417
|
},
|
|
418
418
|
"email_address": {
|
|
419
|
-
"type": "string",
|
|
420
|
-
"description": "Registrar abuse or contact email address."
|
|
419
|
+
"type": ["string", "null"],
|
|
420
|
+
"description": "Registrar abuse or contact email address, when published."
|
|
421
421
|
},
|
|
422
422
|
"phone_number": {
|
|
423
|
-
"type": "string",
|
|
424
|
-
"description": "Registrar contact phone number."
|
|
423
|
+
"type": ["string", "null"],
|
|
424
|
+
"description": "Registrar contact phone number, when published."
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
427
|
},
|