@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
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
openapi: 3.1.1
|
|
2
2
|
info:
|
|
3
3
|
title: Historical Commodity Prices, Delivered Simply.
|
|
4
|
-
version:
|
|
5
|
-
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
|
|
4
|
+
version: 2.0.0
|
|
5
|
+
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.
|
|
6
6
|
contact:
|
|
7
7
|
name: APIFreaks Support
|
|
8
8
|
url: https://apifreaks.com/contact
|
|
9
9
|
email: support@apifreaks.com
|
|
10
10
|
servers:
|
|
11
|
-
- url: https://api.apifreaks.com/
|
|
11
|
+
- url: https://api.apifreaks.com/v2.0
|
|
12
12
|
description: Historical Commodity Prices API Server
|
|
13
13
|
paths:
|
|
14
14
|
/commodity/rates/historical:
|
|
@@ -69,29 +69,80 @@ paths:
|
|
|
69
69
|
headers:
|
|
70
70
|
X-AF-Credits-Cost:
|
|
71
71
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
72
|
+
'206':
|
|
73
|
+
description: Partial Content — Some requested symbols could not be resolved
|
|
74
|
+
content:
|
|
75
|
+
application/json:
|
|
76
|
+
schema:
|
|
77
|
+
$ref: '#/components/schemas/HistoricalCommodityPricesResponse'
|
|
78
|
+
examples:
|
|
79
|
+
partial:
|
|
80
|
+
summary: One valid symbol, one unresolved symbol
|
|
81
|
+
value:
|
|
82
|
+
success: true
|
|
83
|
+
date: '2025-01-10'
|
|
84
|
+
rates:
|
|
85
|
+
XAU:
|
|
86
|
+
date: '2025-01-10'
|
|
87
|
+
open: 2669.93
|
|
88
|
+
high: 2697.85
|
|
89
|
+
low: 2663.61
|
|
90
|
+
close: 2689.44
|
|
91
|
+
unresolved:
|
|
92
|
+
FAKESYM:
|
|
93
|
+
message: We don't support this symbol, please visit our symbols page to see supported symbols.
|
|
94
|
+
headers:
|
|
95
|
+
X-AF-Credits-Cost:
|
|
96
|
+
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
72
97
|
'400':
|
|
73
|
-
description: Bad
|
|
98
|
+
description: Bad Request — Missing parameters or invalid date
|
|
74
99
|
content:
|
|
75
100
|
application/json:
|
|
76
101
|
schema:
|
|
77
102
|
$ref: '#/components/schemas/ErrorResponse'
|
|
78
103
|
examples:
|
|
104
|
+
missingSymbols:
|
|
105
|
+
summary: Missing required symbols parameter
|
|
106
|
+
value:
|
|
107
|
+
error: Invalid Param Exception
|
|
108
|
+
message: please pass correct parameters
|
|
109
|
+
path: /v2.0/commodity/rates/historical
|
|
110
|
+
status: 400
|
|
111
|
+
timestamp: '2026-09-14T08:44:32.013Z'
|
|
79
112
|
invalidDateFormat:
|
|
80
113
|
summary: Invalid date format
|
|
81
114
|
value:
|
|
82
|
-
timestamp:
|
|
83
|
-
|
|
115
|
+
timestamp: '2026-09-14T08:45:13.934Z'
|
|
116
|
+
path: /rates/historical
|
|
117
|
+
code: 400
|
|
84
118
|
error: VALIDATION_ERROR
|
|
85
119
|
message: Invalid Date Format (YYYY-MM-DD).
|
|
86
|
-
path: /v1.0/commodity/rates/historical
|
|
87
120
|
dateNotExist:
|
|
88
121
|
summary: Date does not exist
|
|
89
122
|
value:
|
|
90
|
-
timestamp:
|
|
91
|
-
|
|
123
|
+
timestamp: '2026-09-14T08:44:01.487Z'
|
|
124
|
+
path: /rates/historical
|
|
125
|
+
code: 400
|
|
92
126
|
error: VALIDATION_ERROR
|
|
93
127
|
message: 'Invalid Date: The provided date does not exist.'
|
|
94
|
-
|
|
128
|
+
headers:
|
|
129
|
+
X-AF-Credits-Cost:
|
|
130
|
+
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
131
|
+
'402':
|
|
132
|
+
description: Payment Required — Maximum symbols per request exceeded
|
|
133
|
+
content:
|
|
134
|
+
application/json:
|
|
135
|
+
schema:
|
|
136
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
137
|
+
examples:
|
|
138
|
+
maxSymbolsExceeded:
|
|
139
|
+
summary: Too many symbols requested
|
|
140
|
+
value:
|
|
141
|
+
timestamp: '2026-09-14T08:44:01.978Z'
|
|
142
|
+
path: /rates/historical
|
|
143
|
+
code: 402
|
|
144
|
+
error: PAYMENT_REQUIRED
|
|
145
|
+
message: Maximum symbols per request exceeded
|
|
95
146
|
headers:
|
|
96
147
|
X-AF-Credits-Cost:
|
|
97
148
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
@@ -105,19 +156,22 @@ paths:
|
|
|
105
156
|
symbolNotFound:
|
|
106
157
|
summary: Symbol Not Found
|
|
107
158
|
value:
|
|
108
|
-
timestamp:
|
|
109
|
-
|
|
159
|
+
timestamp: '2026-09-14T08:44:01.978Z'
|
|
160
|
+
path: /rates/historical
|
|
161
|
+
code: 404
|
|
110
162
|
error: SYMBOL_NOT_FOUND
|
|
111
163
|
message: The symbol is not supported, please visit the documentation for a list of supported symbols
|
|
112
|
-
|
|
164
|
+
unresolved:
|
|
165
|
+
FAKESYM:
|
|
166
|
+
message: We don't support this symbol, please visit our symbols page to see supported symbols.
|
|
113
167
|
rateNotFound:
|
|
114
168
|
summary: Rate Not Found
|
|
115
169
|
value:
|
|
116
|
-
timestamp:
|
|
117
|
-
|
|
170
|
+
timestamp: '2026-09-14T08:44:02.528Z'
|
|
171
|
+
path: /rates/historical
|
|
172
|
+
code: 404
|
|
118
173
|
error: RATE_NOT_FOUND
|
|
119
174
|
message: no rates found for the specified date
|
|
120
|
-
path: /v1.0/commodity/rates/historical
|
|
121
175
|
headers:
|
|
122
176
|
X-AF-Credits-Cost:
|
|
123
177
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
@@ -149,6 +203,20 @@ components:
|
|
|
149
203
|
description: Date for which prices were fetched (YYYY-MM-DD).
|
|
150
204
|
rates:
|
|
151
205
|
$ref: '#/components/schemas/HistoricalCommodityRates'
|
|
206
|
+
unresolved:
|
|
207
|
+
type: object
|
|
208
|
+
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.
|
|
209
|
+
additionalProperties:
|
|
210
|
+
type: object
|
|
211
|
+
properties:
|
|
212
|
+
message:
|
|
213
|
+
type: string
|
|
214
|
+
description: Detail message explaining why this symbol was not resolved.
|
|
215
|
+
suggestions:
|
|
216
|
+
type: array
|
|
217
|
+
description: Optional list of supported symbols that closely match the unresolved symbol.
|
|
218
|
+
items:
|
|
219
|
+
type: string
|
|
152
220
|
description: Historical commodity prices response containing success status, date, and OHLC rate data.
|
|
153
221
|
HistoricalCommodityRates:
|
|
154
222
|
type: object
|
|
@@ -170,7 +238,7 @@ components:
|
|
|
170
238
|
properties:
|
|
171
239
|
date:
|
|
172
240
|
type: string
|
|
173
|
-
description: Date for which prices were fetched (YYYY-MM-DD).
|
|
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.
|
|
174
242
|
open:
|
|
175
243
|
type: number
|
|
176
244
|
format: float
|
|
@@ -189,29 +257,43 @@ components:
|
|
|
189
257
|
description: Closing price on the given date.
|
|
190
258
|
ErrorResponse:
|
|
191
259
|
type: object
|
|
260
|
+
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.
|
|
192
261
|
required:
|
|
193
|
-
- timestamp
|
|
194
|
-
- status
|
|
195
|
-
- error
|
|
196
262
|
- message
|
|
197
|
-
- path
|
|
198
263
|
properties:
|
|
199
|
-
timestamp:
|
|
200
|
-
type: integer
|
|
201
|
-
description: Unix timestamp in milliseconds when the error occurred.
|
|
202
|
-
status:
|
|
203
|
-
type: integer
|
|
204
|
-
description: HTTP status code returned with the error.
|
|
205
264
|
error:
|
|
206
265
|
type: string
|
|
207
|
-
description:
|
|
266
|
+
description: Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, RATE_NOT_FOUND).
|
|
208
267
|
message:
|
|
209
268
|
type: string
|
|
210
269
|
description: Human-readable error message describing the failure.
|
|
211
270
|
path:
|
|
212
271
|
type: string
|
|
213
|
-
description: API endpoint path that produced the error.
|
|
214
|
-
|
|
272
|
+
description: API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error.
|
|
273
|
+
status:
|
|
274
|
+
type: integer
|
|
275
|
+
description: HTTP status code. Present on gateway-level errors.
|
|
276
|
+
code:
|
|
277
|
+
type: integer
|
|
278
|
+
description: HTTP status code. Present on commodity-service errors instead of status.
|
|
279
|
+
timestamp:
|
|
280
|
+
type: string
|
|
281
|
+
format: date-time
|
|
282
|
+
description: Timestamp when the error occurred (ISO 8601).
|
|
283
|
+
unresolved:
|
|
284
|
+
type: object
|
|
285
|
+
description: Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.
|
|
286
|
+
additionalProperties:
|
|
287
|
+
type: object
|
|
288
|
+
properties:
|
|
289
|
+
message:
|
|
290
|
+
type: string
|
|
291
|
+
description: Detail message explaining why this symbol was not resolved.
|
|
292
|
+
suggestions:
|
|
293
|
+
type: array
|
|
294
|
+
description: Optional list of supported symbols that closely match the unresolved symbol.
|
|
295
|
+
items:
|
|
296
|
+
type: string
|
|
215
297
|
headers:
|
|
216
298
|
X-AF-Credits-Cost:
|
|
217
299
|
description: Specifies the number of credits consumed by the current request.
|
|
@@ -722,29 +722,41 @@ components:
|
|
|
722
722
|
type: string
|
|
723
723
|
description: IANA registrar ID.
|
|
724
724
|
status:
|
|
725
|
-
type:
|
|
725
|
+
type:
|
|
726
|
+
- string
|
|
727
|
+
- 'null'
|
|
726
728
|
description: Registrar's ICANN accreditation status (e.g. accredited), when published at the registrar level.
|
|
727
729
|
registrar_name:
|
|
728
730
|
type: string
|
|
729
731
|
description: Registered name of the registrar.
|
|
730
732
|
normalized_name:
|
|
731
|
-
type:
|
|
733
|
+
type:
|
|
734
|
+
- string
|
|
735
|
+
- 'null'
|
|
732
736
|
description: Lowercased, normalized form of the registrar name, when published at the registrar level.
|
|
733
737
|
whois_server:
|
|
734
|
-
type:
|
|
735
|
-
|
|
738
|
+
type:
|
|
739
|
+
- string
|
|
740
|
+
- 'null'
|
|
741
|
+
description: WHOIS server operated by the registrar, when published.
|
|
736
742
|
rdap_server:
|
|
737
|
-
type:
|
|
743
|
+
type:
|
|
744
|
+
- string
|
|
745
|
+
- 'null'
|
|
738
746
|
description: RDAP server URL operated by the registrar, when published at the registrar level.
|
|
739
747
|
website_url:
|
|
740
748
|
type: string
|
|
741
749
|
description: Registrar's website URL.
|
|
742
750
|
email_address:
|
|
743
|
-
type:
|
|
744
|
-
|
|
751
|
+
type:
|
|
752
|
+
- string
|
|
753
|
+
- 'null'
|
|
754
|
+
description: Registrar abuse or contact email address, when published.
|
|
745
755
|
phone_number:
|
|
746
|
-
type:
|
|
747
|
-
|
|
756
|
+
type:
|
|
757
|
+
- string
|
|
758
|
+
- 'null'
|
|
759
|
+
description: Registrar contact phone number, when published.
|
|
748
760
|
WhoisContactDetail:
|
|
749
761
|
type: object
|
|
750
762
|
description: A contact record (registrant, administrative, technical, billing, or reseller) published in the domain's WHOIS record.
|
|
@@ -349,17 +349,23 @@ components:
|
|
|
349
349
|
type: string
|
|
350
350
|
description: Registered name of the registrar.
|
|
351
351
|
whois_server:
|
|
352
|
-
type:
|
|
353
|
-
|
|
352
|
+
type:
|
|
353
|
+
- string
|
|
354
|
+
- 'null'
|
|
355
|
+
description: WHOIS server operated by the registrar, when published.
|
|
354
356
|
website_url:
|
|
355
357
|
type: string
|
|
356
358
|
description: Registrar's website URL.
|
|
357
359
|
email_address:
|
|
358
|
-
type:
|
|
359
|
-
|
|
360
|
+
type:
|
|
361
|
+
- string
|
|
362
|
+
- 'null'
|
|
363
|
+
description: Registrar abuse or contact email address, when published.
|
|
360
364
|
phone_number:
|
|
361
|
-
type:
|
|
362
|
-
|
|
365
|
+
type:
|
|
366
|
+
- string
|
|
367
|
+
- 'null'
|
|
368
|
+
description: Registrar contact phone number, when published.
|
|
363
369
|
WhoisContactDetail:
|
|
364
370
|
type: object
|
|
365
371
|
description: A contact record (registrant, administrative, technical, billing, or reseller) as published in this snapshot.
|
|
@@ -406,7 +406,7 @@ components:
|
|
|
406
406
|
type:
|
|
407
407
|
- string
|
|
408
408
|
- 'null'
|
|
409
|
-
description: Accreditation status of the registrar (e.g., 'accredited').
|
|
409
|
+
description: Accreditation status of the registrar (e.g., 'accredited'), when published.
|
|
410
410
|
registrar_name:
|
|
411
411
|
type:
|
|
412
412
|
- string
|
|
@@ -416,18 +416,18 @@ components:
|
|
|
416
416
|
type:
|
|
417
417
|
- string
|
|
418
418
|
- 'null'
|
|
419
|
-
description: Normalized (lowercase, stripped) registrar name.
|
|
419
|
+
description: Normalized (lowercase, stripped) registrar name, when published.
|
|
420
420
|
whois_server:
|
|
421
421
|
type:
|
|
422
422
|
- string
|
|
423
423
|
- 'null'
|
|
424
|
-
description: WHOIS server of the registrar.
|
|
424
|
+
description: WHOIS server of the registrar, when published.
|
|
425
425
|
rdap_server:
|
|
426
426
|
type:
|
|
427
427
|
- string
|
|
428
428
|
- 'null'
|
|
429
429
|
format: uri
|
|
430
|
-
description: RDAP (Registration Data Access Protocol) server URL of the registrar.
|
|
430
|
+
description: RDAP (Registration Data Access Protocol) server URL of the registrar, when published.
|
|
431
431
|
website_url:
|
|
432
432
|
type:
|
|
433
433
|
- string
|
|
@@ -454,6 +454,11 @@ components:
|
|
|
454
454
|
- string
|
|
455
455
|
- 'null'
|
|
456
456
|
description: Contact identifier.
|
|
457
|
+
handle:
|
|
458
|
+
type:
|
|
459
|
+
- string
|
|
460
|
+
- 'null'
|
|
461
|
+
description: Registry handle for the contact, when published.
|
|
457
462
|
name:
|
|
458
463
|
type:
|
|
459
464
|
- string
|
|
@@ -432,29 +432,41 @@ components:
|
|
|
432
432
|
type: string
|
|
433
433
|
description: IANA registrar ID.
|
|
434
434
|
status:
|
|
435
|
-
type:
|
|
435
|
+
type:
|
|
436
|
+
- string
|
|
437
|
+
- 'null'
|
|
436
438
|
description: Registrar's ICANN accreditation status (e.g. accredited), when published at the registrar level.
|
|
437
439
|
registrar_name:
|
|
438
440
|
type: string
|
|
439
441
|
description: Registered name of the registrar.
|
|
440
442
|
normalized_name:
|
|
441
|
-
type:
|
|
443
|
+
type:
|
|
444
|
+
- string
|
|
445
|
+
- 'null'
|
|
442
446
|
description: Lowercased, normalized form of the registrar name, when published at the registrar level.
|
|
443
447
|
whois_server:
|
|
444
|
-
type:
|
|
445
|
-
|
|
448
|
+
type:
|
|
449
|
+
- string
|
|
450
|
+
- 'null'
|
|
451
|
+
description: WHOIS server operated by the registrar, when published.
|
|
446
452
|
rdap_server:
|
|
447
|
-
type:
|
|
453
|
+
type:
|
|
454
|
+
- string
|
|
455
|
+
- 'null'
|
|
448
456
|
description: RDAP server URL operated by the registrar, when published at the registrar level.
|
|
449
457
|
website_url:
|
|
450
458
|
type: string
|
|
451
459
|
description: Registrar's website URL.
|
|
452
460
|
email_address:
|
|
453
|
-
type:
|
|
454
|
-
|
|
461
|
+
type:
|
|
462
|
+
- string
|
|
463
|
+
- 'null'
|
|
464
|
+
description: Registrar abuse or contact email address, when published.
|
|
455
465
|
phone_number:
|
|
456
|
-
type:
|
|
457
|
-
|
|
466
|
+
type:
|
|
467
|
+
- string
|
|
468
|
+
- 'null'
|
|
469
|
+
description: Registrar contact phone number, when published.
|
|
458
470
|
WhoisContactDetail:
|
|
459
471
|
type: object
|
|
460
472
|
description: A contact record (registrant, administrative, technical, billing, or reseller) published in the domain's WHOIS record.
|
package/package.json
CHANGED
package/specs/README.md
CHANGED
|
@@ -41,7 +41,7 @@ Successful responses include `X-AF-Credits-Cost`, the credits consumed by that r
|
|
|
41
41
|
|
|
42
42
|
Each document declares its base URL under `servers`. Most products use `https://api.apifreaks.com/v1.0`.
|
|
43
43
|
|
|
44
|
-
These use `https://api.apifreaks.com/v2.0`: IP geolocation, bulk IP geolocation, timezone lookup, domain WHOIS, bulk WHOIS, and
|
|
44
|
+
These use `https://api.apifreaks.com/v2.0`: IP geolocation, bulk IP geolocation, timezone lookup, domain WHOIS, bulk WHOIS, astronomy, and all commodity endpoints (live prices, historical prices, fluctuation, time series, symbols).
|
|
45
45
|
|
|
46
46
|
Weather products (except astronomy) use `https://api.apifreaks.com/v1.0/weather`.
|
|
47
47
|
|
|
@@ -118,6 +118,8 @@ Grouped by folder. Slug is the stable id; the name links to the file.
|
|
|
118
118
|
| -------------------------------- | ---------------------------------------------------------------------------- |
|
|
119
119
|
| `domain-search` | [Domain Availability](domain/domain-search.json) |
|
|
120
120
|
| `domain-search-with-suggestions` | [Domain Search with Suggestions](domain/domain-search-with-suggestions.json) |
|
|
121
|
+
| `domain-reputation` | [Domain Reputation](domain/domain-reputation.json) |
|
|
122
|
+
| `domain-typosquatting` | [Domain Typosquatting](domain/domain-typosquatting.json) |
|
|
121
123
|
| `subdomain-lookup` | [Subdomain Finder](domain/subdomain-lookup.json) |
|
|
122
124
|
| `bulk-domain-checker` | [Bulk Domain Checker](domain/bulk-domain-checker.json) |
|
|
123
125
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"openapi": "3.1.1",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Commodity Fluctuation API ",
|
|
5
|
-
"version": "
|
|
6
|
-
"description": "Calculate price change and percentage movement for any commodity over a custom date range. Returns the opening price, closing price, absolute change, and percentage change for each symbol. Accepts one or more comma-separated commodity symbols with a start and end date in YYYY-MM-DD format. Returns a 400 error for invalid dates or a date range where start is after end, and a 404 error for unsupported symbols or a date range with no available data.",
|
|
5
|
+
"version": "2.0.0",
|
|
6
|
+
"description": "Calculate price change and percentage movement for any commodity over a custom date range. Returns the opening price, closing price, absolute change, and percentage change for each symbol, rounded to 2 decimal places. For monthly-updated commodities, the fluctuation is computed between the first day of the start month and the first day of the end month. There is no limit on the date range. Accepts one or more comma-separated commodity symbols with a start and end date in YYYY-MM-DD format. If some requested symbols can't be resolved, a 206 Partial Content response is returned with the resolved rates plus an `unresolved` object. Returns a 400 error for invalid dates or a date range where start is after end, and a 404 error for unsupported symbols or a date range with no available data.",
|
|
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
|
}
|