@apifreaks/openapi-specs 0.4.2 → 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 +657 -84
- package/dist/index.js +657 -84
- 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/package.json +1 -1
- package/specs/README.md +1 -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/dist/index.js
CHANGED
|
@@ -241,8 +241,8 @@ var commodity_fluctuation_default = {
|
|
|
241
241
|
openapi: "3.1.1",
|
|
242
242
|
info: {
|
|
243
243
|
title: "Commodity Fluctuation API ",
|
|
244
|
-
version: "
|
|
245
|
-
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.",
|
|
244
|
+
version: "2.0.0",
|
|
245
|
+
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.",
|
|
246
246
|
contact: {
|
|
247
247
|
name: "APIFreaks Support",
|
|
248
248
|
url: "https://apifreaks.com/contact",
|
|
@@ -251,7 +251,7 @@ var commodity_fluctuation_default = {
|
|
|
251
251
|
},
|
|
252
252
|
servers: [
|
|
253
253
|
{
|
|
254
|
-
url: "https://api.apifreaks.com/
|
|
254
|
+
url: "https://api.apifreaks.com/v2.0",
|
|
255
255
|
description: "Commodity Fluctuation API Server"
|
|
256
256
|
}
|
|
257
257
|
],
|
|
@@ -342,6 +342,44 @@ var commodity_fluctuation_default = {
|
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
},
|
|
345
|
+
"206": {
|
|
346
|
+
description: "Partial Content \u2014 Some requested symbols could not be resolved",
|
|
347
|
+
content: {
|
|
348
|
+
"application/json": {
|
|
349
|
+
schema: {
|
|
350
|
+
$ref: "#/components/schemas/CommodityFluctuationResponse"
|
|
351
|
+
},
|
|
352
|
+
examples: {
|
|
353
|
+
partial: {
|
|
354
|
+
summary: "One valid symbol, one unresolved symbol",
|
|
355
|
+
value: {
|
|
356
|
+
success: true,
|
|
357
|
+
startDate: "2024-01-01",
|
|
358
|
+
endDate: "2024-01-31",
|
|
359
|
+
rates: {
|
|
360
|
+
XAU: {
|
|
361
|
+
startRate: 2063.63,
|
|
362
|
+
endRate: 2039.83,
|
|
363
|
+
change: -23.8,
|
|
364
|
+
changePercent: -1.15
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
unresolved: {
|
|
368
|
+
FAKESYM: {
|
|
369
|
+
message: "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
headers: {
|
|
378
|
+
"X-AF-Credits-Cost": {
|
|
379
|
+
$ref: "#/components/headers/X-AF-Credits-Cost"
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
},
|
|
345
383
|
"400": {
|
|
346
384
|
description: "Bad Request \u2014 Missing parameters or invalid dates",
|
|
347
385
|
content: {
|
|
@@ -352,9 +390,9 @@ var commodity_fluctuation_default = {
|
|
|
352
390
|
value: {
|
|
353
391
|
error: "Invalid Param Exception",
|
|
354
392
|
message: "please pass correct parameters",
|
|
355
|
-
path: "/
|
|
393
|
+
path: "/v2.0/commodity/fluctuation",
|
|
356
394
|
status: 400,
|
|
357
|
-
timestamp: "2026-
|
|
395
|
+
timestamp: "2026-09-14T08:43:46.481Z"
|
|
358
396
|
}
|
|
359
397
|
},
|
|
360
398
|
invalidDateFormat: {
|
|
@@ -399,6 +437,33 @@ var commodity_fluctuation_default = {
|
|
|
399
437
|
}
|
|
400
438
|
}
|
|
401
439
|
},
|
|
440
|
+
"402": {
|
|
441
|
+
description: "Payment Required \u2014 Maximum symbols per request exceeded",
|
|
442
|
+
content: {
|
|
443
|
+
"application/json": {
|
|
444
|
+
schema: {
|
|
445
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
446
|
+
},
|
|
447
|
+
examples: {
|
|
448
|
+
maxSymbolsExceeded: {
|
|
449
|
+
summary: "Too many symbols requested",
|
|
450
|
+
value: {
|
|
451
|
+
timestamp: "2026-09-14T08:43:48.408Z",
|
|
452
|
+
path: "/rates/fluctuation",
|
|
453
|
+
code: 402,
|
|
454
|
+
error: "PAYMENT_REQUIRED",
|
|
455
|
+
message: "Maximum symbols per request exceeded"
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
headers: {
|
|
462
|
+
"X-AF-Credits-Cost": {
|
|
463
|
+
$ref: "#/components/headers/X-AF-Credits-Cost"
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
},
|
|
402
467
|
"404": {
|
|
403
468
|
description: "Not found - Symbol or data not available",
|
|
404
469
|
content: {
|
|
@@ -410,17 +475,22 @@ var commodity_fluctuation_default = {
|
|
|
410
475
|
symbolNotFound: {
|
|
411
476
|
summary: "Symbol Not Found",
|
|
412
477
|
value: {
|
|
413
|
-
timestamp: "2026-
|
|
478
|
+
timestamp: "2026-09-14T08:43:48.408Z",
|
|
414
479
|
path: "/rates/fluctuation",
|
|
415
480
|
code: 404,
|
|
416
481
|
error: "SYMBOL_NOT_FOUND",
|
|
417
|
-
message: "The symbol is not supported, please visit the documentation for a list of supported symbols"
|
|
482
|
+
message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
|
|
483
|
+
unresolved: {
|
|
484
|
+
FAKESYM: {
|
|
485
|
+
message: "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
486
|
+
}
|
|
487
|
+
}
|
|
418
488
|
}
|
|
419
489
|
},
|
|
420
490
|
noData: {
|
|
421
491
|
summary: "No data available for the given date range",
|
|
422
492
|
value: {
|
|
423
|
-
timestamp: "2026-
|
|
493
|
+
timestamp: "2026-09-14T08:44:31.022Z",
|
|
424
494
|
path: "/rates/fluctuation",
|
|
425
495
|
code: 404,
|
|
426
496
|
error: "DATA_NOT_FOUND",
|
|
@@ -474,6 +544,26 @@ var commodity_fluctuation_default = {
|
|
|
474
544
|
},
|
|
475
545
|
rates: {
|
|
476
546
|
$ref: "#/components/schemas/CommodityFluctuationRates"
|
|
547
|
+
},
|
|
548
|
+
unresolved: {
|
|
549
|
+
type: "object",
|
|
550
|
+
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.",
|
|
551
|
+
additionalProperties: {
|
|
552
|
+
type: "object",
|
|
553
|
+
properties: {
|
|
554
|
+
message: {
|
|
555
|
+
type: "string",
|
|
556
|
+
description: "Detail message explaining why this symbol was not resolved."
|
|
557
|
+
},
|
|
558
|
+
suggestions: {
|
|
559
|
+
type: "array",
|
|
560
|
+
description: "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
561
|
+
items: {
|
|
562
|
+
type: "string"
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}
|
|
477
567
|
}
|
|
478
568
|
},
|
|
479
569
|
description: "Commodity fluctuation response containing price change data per symbol over a date range."
|
|
@@ -539,6 +629,26 @@ var commodity_fluctuation_default = {
|
|
|
539
629
|
type: "string",
|
|
540
630
|
format: "date-time",
|
|
541
631
|
description: "Timestamp when the error occurred (ISO 8601)."
|
|
632
|
+
},
|
|
633
|
+
unresolved: {
|
|
634
|
+
type: "object",
|
|
635
|
+
description: "Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
|
|
636
|
+
additionalProperties: {
|
|
637
|
+
type: "object",
|
|
638
|
+
properties: {
|
|
639
|
+
message: {
|
|
640
|
+
type: "string",
|
|
641
|
+
description: "Detail message explaining why this symbol was not resolved."
|
|
642
|
+
},
|
|
643
|
+
suggestions: {
|
|
644
|
+
type: "array",
|
|
645
|
+
description: "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
646
|
+
items: {
|
|
647
|
+
type: "string"
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
}
|
|
542
652
|
}
|
|
543
653
|
}
|
|
544
654
|
}
|
|
@@ -567,8 +677,8 @@ var commodity_prices_default = {
|
|
|
567
677
|
openapi: "3.1.1",
|
|
568
678
|
info: {
|
|
569
679
|
title: "Live Commodity Prices API - Real Time Market Insights",
|
|
570
|
-
version: "
|
|
571
|
-
description: "Get real-time prices for
|
|
680
|
+
version: "2.0.0",
|
|
681
|
+
description: "Get real-time prices for 245+ commodities in a single request. Returns current market prices for each requested symbol plus unit and quote currency metadata. Supports an optional quote parameter to convert prices into a desired currency, defaulting to each commodity's native market currency. Accepts 10-minute or 1-minute update frequencies for price freshness. If some requested symbols can't be resolved, a 206 Partial Content response is returned with the resolved rates plus an `unresolved` object; if none resolve, a 404 is returned instead. An unsupported quote currency also returns a 404.",
|
|
572
682
|
contact: {
|
|
573
683
|
name: "APIFreaks Support",
|
|
574
684
|
url: "https://apifreaks.com/contact",
|
|
@@ -577,7 +687,7 @@ var commodity_prices_default = {
|
|
|
577
687
|
},
|
|
578
688
|
servers: [
|
|
579
689
|
{
|
|
580
|
-
url: "https://api.apifreaks.com/
|
|
690
|
+
url: "https://api.apifreaks.com/v2.0",
|
|
581
691
|
description: "Live Commodity Prices API Server"
|
|
582
692
|
}
|
|
583
693
|
],
|
|
@@ -613,11 +723,11 @@ var commodity_prices_default = {
|
|
|
613
723
|
name: "updates",
|
|
614
724
|
in: "query",
|
|
615
725
|
required: true,
|
|
616
|
-
description: "Update frequency. Accepted values: `
|
|
726
|
+
description: "Update frequency. Accepted values: `10m` (default), `1m`.",
|
|
617
727
|
schema: {
|
|
618
728
|
type: "string",
|
|
619
|
-
enum: ["
|
|
620
|
-
default: "
|
|
729
|
+
enum: ["10m", "1m"],
|
|
730
|
+
default: "10m"
|
|
621
731
|
}
|
|
622
732
|
},
|
|
623
733
|
{
|
|
@@ -640,13 +750,13 @@ var commodity_prices_default = {
|
|
|
640
750
|
},
|
|
641
751
|
examples: {
|
|
642
752
|
success: {
|
|
643
|
-
summary: "Successful response",
|
|
753
|
+
summary: "Successful response (10m update frequency)",
|
|
644
754
|
value: {
|
|
645
755
|
success: true,
|
|
646
|
-
timestamp:
|
|
756
|
+
timestamp: 1789375397,
|
|
647
757
|
rates: {
|
|
648
|
-
XAU:
|
|
649
|
-
"WTIOIL-SPOT":
|
|
758
|
+
XAU: 4313.04,
|
|
759
|
+
"WTIOIL-SPOT": 100
|
|
650
760
|
},
|
|
651
761
|
metadata: {
|
|
652
762
|
XAU: {
|
|
@@ -664,9 +774,9 @@ var commodity_prices_default = {
|
|
|
664
774
|
summary: "Price converted to a target quote currency",
|
|
665
775
|
value: {
|
|
666
776
|
success: true,
|
|
667
|
-
timestamp:
|
|
777
|
+
timestamp: 1789375426,
|
|
668
778
|
rates: {
|
|
669
|
-
XAU:
|
|
779
|
+
XAU: 3739.023
|
|
670
780
|
},
|
|
671
781
|
metadata: {
|
|
672
782
|
XAU: {
|
|
@@ -685,6 +795,66 @@ var commodity_prices_default = {
|
|
|
685
795
|
}
|
|
686
796
|
}
|
|
687
797
|
},
|
|
798
|
+
"206": {
|
|
799
|
+
description: "Partial Content \u2014 Some requested symbols could not be resolved",
|
|
800
|
+
content: {
|
|
801
|
+
"application/json": {
|
|
802
|
+
schema: {
|
|
803
|
+
$ref: "#/components/schemas/LiveCommodityPricesResponse"
|
|
804
|
+
},
|
|
805
|
+
examples: {
|
|
806
|
+
partial: {
|
|
807
|
+
summary: "One valid symbol, one unresolved symbol",
|
|
808
|
+
value: {
|
|
809
|
+
success: true,
|
|
810
|
+
timestamp: 1789376193,
|
|
811
|
+
rates: {
|
|
812
|
+
XAU: 4311.88
|
|
813
|
+
},
|
|
814
|
+
metadata: {
|
|
815
|
+
XAU: {
|
|
816
|
+
unit: "T.oz",
|
|
817
|
+
quote: "USD"
|
|
818
|
+
}
|
|
819
|
+
},
|
|
820
|
+
unresolved: {
|
|
821
|
+
FAKESYM: {
|
|
822
|
+
message: "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
},
|
|
827
|
+
partialWithSuggestions: {
|
|
828
|
+
summary: "Unresolved symbol with close-match suggestions",
|
|
829
|
+
value: {
|
|
830
|
+
success: true,
|
|
831
|
+
timestamp: 1789376644,
|
|
832
|
+
rates: {
|
|
833
|
+
XAU: 4306.06
|
|
834
|
+
},
|
|
835
|
+
metadata: {
|
|
836
|
+
XAU: {
|
|
837
|
+
unit: "T.oz",
|
|
838
|
+
quote: "USD"
|
|
839
|
+
}
|
|
840
|
+
},
|
|
841
|
+
unresolved: {
|
|
842
|
+
ZW: {
|
|
843
|
+
message: "Did you mean ZW-SPOT (Wheat Spot) or ZW-FUT (Wheat Futures)?",
|
|
844
|
+
suggestions: ["ZW-SPOT", "ZW-FUT"]
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
},
|
|
852
|
+
headers: {
|
|
853
|
+
"X-AF-Credits-Cost": {
|
|
854
|
+
$ref: "#/components/headers/X-AF-Credits-Cost"
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
},
|
|
688
858
|
"400": {
|
|
689
859
|
description: "Bad Request \u2014 Missing or invalid query parameters",
|
|
690
860
|
content: {
|
|
@@ -698,19 +868,46 @@ var commodity_prices_default = {
|
|
|
698
868
|
value: {
|
|
699
869
|
error: "Invalid Param Exception",
|
|
700
870
|
message: "please pass correct parameters",
|
|
701
|
-
path: "/
|
|
871
|
+
path: "/v2.0/commodity/rates/latest",
|
|
702
872
|
status: 400,
|
|
703
|
-
timestamp: "2026-
|
|
873
|
+
timestamp: "2026-09-14T08:43:43.964Z"
|
|
704
874
|
}
|
|
705
875
|
},
|
|
706
876
|
invalidUpdates: {
|
|
707
|
-
summary: "updates is not
|
|
877
|
+
summary: "updates is not 10m or 1m",
|
|
708
878
|
value: {
|
|
709
879
|
error: "Invalid Param Exception",
|
|
710
880
|
message: "please pass correct parameters",
|
|
711
|
-
path: "/
|
|
881
|
+
path: "/v2.0/commodity/rates/latest",
|
|
712
882
|
status: 400,
|
|
713
|
-
timestamp: "2026-
|
|
883
|
+
timestamp: "2026-09-14T08:43:44.440Z"
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
},
|
|
889
|
+
headers: {
|
|
890
|
+
"X-AF-Credits-Cost": {
|
|
891
|
+
$ref: "#/components/headers/X-AF-Credits-Cost"
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
"402": {
|
|
896
|
+
description: "Payment Required \u2014 Maximum symbols per request exceeded",
|
|
897
|
+
content: {
|
|
898
|
+
"application/json": {
|
|
899
|
+
schema: {
|
|
900
|
+
$ref: "#/components/schemas/CommodityNotFoundError"
|
|
901
|
+
},
|
|
902
|
+
examples: {
|
|
903
|
+
maxSymbolsExceeded: {
|
|
904
|
+
summary: "Too many symbols requested",
|
|
905
|
+
value: {
|
|
906
|
+
timestamp: "2026-09-14T08:43:44.957Z",
|
|
907
|
+
path: "/rates/latestRates",
|
|
908
|
+
code: 402,
|
|
909
|
+
error: "PAYMENT_REQUIRED",
|
|
910
|
+
message: "Maximum symbols per request exceeded"
|
|
714
911
|
}
|
|
715
912
|
}
|
|
716
913
|
}
|
|
@@ -733,17 +930,38 @@ var commodity_prices_default = {
|
|
|
733
930
|
symbolNotFound: {
|
|
734
931
|
summary: "Symbol Not Found",
|
|
735
932
|
value: {
|
|
736
|
-
timestamp:
|
|
933
|
+
timestamp: "2026-09-14T08:43:44.957Z",
|
|
737
934
|
path: "/rates/latestRates",
|
|
738
935
|
code: 404,
|
|
739
936
|
error: "SYMBOL_NOT_FOUND",
|
|
740
|
-
message: "The symbol is not supported, please visit the documentation for a list of supported symbols"
|
|
937
|
+
message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
|
|
938
|
+
unresolved: {
|
|
939
|
+
FAKESYM: {
|
|
940
|
+
message: "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
},
|
|
945
|
+
symbolNotFoundWithSuggestions: {
|
|
946
|
+
summary: "Symbol Not Found, with close-match suggestions",
|
|
947
|
+
value: {
|
|
948
|
+
timestamp: "2026-09-14T09:04:04.878Z",
|
|
949
|
+
path: "/rates/latestRates",
|
|
950
|
+
code: 404,
|
|
951
|
+
error: "SYMBOL_NOT_FOUND",
|
|
952
|
+
message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
|
|
953
|
+
unresolved: {
|
|
954
|
+
ZW: {
|
|
955
|
+
message: "Did you mean ZW-SPOT (Wheat Spot) or ZW-FUT (Wheat Futures)?",
|
|
956
|
+
suggestions: ["ZW-SPOT", "ZW-FUT"]
|
|
957
|
+
}
|
|
958
|
+
}
|
|
741
959
|
}
|
|
742
960
|
},
|
|
743
961
|
quoteNotFound: {
|
|
744
962
|
summary: "Quote Currency Not Found",
|
|
745
963
|
value: {
|
|
746
|
-
timestamp:
|
|
964
|
+
timestamp: "2026-09-14T08:43:45.461Z",
|
|
747
965
|
path: "/rates/latestRates",
|
|
748
966
|
code: 404,
|
|
749
967
|
error: "QUOTE_NOT_FOUND",
|
|
@@ -796,6 +1014,30 @@ var commodity_prices_default = {
|
|
|
796
1014
|
},
|
|
797
1015
|
metadata: {
|
|
798
1016
|
$ref: "#/components/schemas/CommodityMetadata"
|
|
1017
|
+
},
|
|
1018
|
+
unresolved: {
|
|
1019
|
+
type: "object",
|
|
1020
|
+
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.",
|
|
1021
|
+
additionalProperties: {
|
|
1022
|
+
type: "object",
|
|
1023
|
+
properties: {
|
|
1024
|
+
message: {
|
|
1025
|
+
type: "string",
|
|
1026
|
+
description: "Detail message explaining why this symbol was not resolved."
|
|
1027
|
+
},
|
|
1028
|
+
suggestions: {
|
|
1029
|
+
type: "array",
|
|
1030
|
+
description: "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
1031
|
+
items: {
|
|
1032
|
+
type: "string"
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
},
|
|
1038
|
+
warning: {
|
|
1039
|
+
type: "string",
|
|
1040
|
+
description: "Present only when currency conversion for the requested `quote` is temporarily unavailable; rates are returned in each commodity's default currency instead."
|
|
799
1041
|
}
|
|
800
1042
|
},
|
|
801
1043
|
description: "Live commodity prices response containing success status, timestamp, rates, and metadata."
|
|
@@ -859,12 +1101,13 @@ var commodity_prices_default = {
|
|
|
859
1101
|
},
|
|
860
1102
|
CommodityNotFoundError: {
|
|
861
1103
|
type: "object",
|
|
862
|
-
description: "Error envelope returned by the commodity pricing service specifically for unresolvable symbol/quote errors. Uses `code` instead of `status` and
|
|
1104
|
+
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.",
|
|
863
1105
|
required: ["code", "error", "message"],
|
|
864
1106
|
properties: {
|
|
865
1107
|
timestamp: {
|
|
866
|
-
type: "
|
|
867
|
-
|
|
1108
|
+
type: "string",
|
|
1109
|
+
format: "date-time",
|
|
1110
|
+
description: "Timestamp when the error occurred (ISO 8601)."
|
|
868
1111
|
},
|
|
869
1112
|
path: {
|
|
870
1113
|
type: "string",
|
|
@@ -881,6 +1124,26 @@ var commodity_prices_default = {
|
|
|
881
1124
|
message: {
|
|
882
1125
|
type: "string",
|
|
883
1126
|
description: "Human-readable error message describing the failure."
|
|
1127
|
+
},
|
|
1128
|
+
unresolved: {
|
|
1129
|
+
type: "object",
|
|
1130
|
+
description: "Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
|
|
1131
|
+
additionalProperties: {
|
|
1132
|
+
type: "object",
|
|
1133
|
+
properties: {
|
|
1134
|
+
message: {
|
|
1135
|
+
type: "string",
|
|
1136
|
+
description: "Detail message explaining why this symbol was not resolved."
|
|
1137
|
+
},
|
|
1138
|
+
suggestions: {
|
|
1139
|
+
type: "array",
|
|
1140
|
+
description: "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
1141
|
+
items: {
|
|
1142
|
+
type: "string"
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
884
1147
|
}
|
|
885
1148
|
}
|
|
886
1149
|
}
|
|
@@ -909,8 +1172,8 @@ var commodity_symbols_default = {
|
|
|
909
1172
|
openapi: "3.1.1",
|
|
910
1173
|
info: {
|
|
911
1174
|
title: "Commodity Symbols API Reference",
|
|
912
|
-
version: "
|
|
913
|
-
description:
|
|
1175
|
+
version: "2.0.0",
|
|
1176
|
+
description: 'List all supported commodity symbols available in the APIFreaks Commodity API. Returns an array of commodity objects with symbol, name, category, pricing currency, unit of measurement, status, and update interval. Supports metals, energy, agriculture, industrial, raw materials, oils and meals, textiles, meats, poultry, and livestock categories across 245+ commodities. Deprecated symbols are included with `status: "inactive"` and a `deprecationDate`; historical rates remain available for them up to their deprecation date, but latest rates do not.',
|
|
914
1177
|
contact: {
|
|
915
1178
|
name: "APIFreaks Support",
|
|
916
1179
|
url: "https://apifreaks.com/contact",
|
|
@@ -919,7 +1182,7 @@ var commodity_symbols_default = {
|
|
|
919
1182
|
},
|
|
920
1183
|
servers: [
|
|
921
1184
|
{
|
|
922
|
-
url: "https://api.apifreaks.com/
|
|
1185
|
+
url: "https://api.apifreaks.com/v2.0",
|
|
923
1186
|
description: "Commodity Symbols API Server"
|
|
924
1187
|
}
|
|
925
1188
|
],
|
|
@@ -988,6 +1251,40 @@ var commodity_symbols_default = {
|
|
|
988
1251
|
symbol: "MMBtu",
|
|
989
1252
|
name: "Million British Thermal Units"
|
|
990
1253
|
}
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
symbol: "NG-EU",
|
|
1257
|
+
name: "Natural Gas, Europe",
|
|
1258
|
+
category: "Energy",
|
|
1259
|
+
status: "active",
|
|
1260
|
+
updateInterval: "PER_MONTH",
|
|
1261
|
+
exchange: "World Bank",
|
|
1262
|
+
currency: {
|
|
1263
|
+
code: "USD",
|
|
1264
|
+
name: "US Dollar",
|
|
1265
|
+
symbol: "$"
|
|
1266
|
+
},
|
|
1267
|
+
unit: {
|
|
1268
|
+
symbol: "MMBtu",
|
|
1269
|
+
name: "Million British Thermal Units"
|
|
1270
|
+
}
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
symbol: "UANEU",
|
|
1274
|
+
name: "Urea Ammonium Nitrate",
|
|
1275
|
+
category: "Industrial",
|
|
1276
|
+
status: "inactive",
|
|
1277
|
+
updateInterval: "PER_MINUTE",
|
|
1278
|
+
deprecationDate: "2024-04-14",
|
|
1279
|
+
currency: {
|
|
1280
|
+
code: "USD",
|
|
1281
|
+
name: "US Dollar",
|
|
1282
|
+
symbol: "$"
|
|
1283
|
+
},
|
|
1284
|
+
unit: {
|
|
1285
|
+
symbol: "T",
|
|
1286
|
+
name: "Metric Ton"
|
|
1287
|
+
}
|
|
991
1288
|
}
|
|
992
1289
|
]
|
|
993
1290
|
}
|
|
@@ -1054,23 +1351,46 @@ var commodity_symbols_default = {
|
|
|
1054
1351
|
properties: {
|
|
1055
1352
|
symbol: {
|
|
1056
1353
|
type: "string",
|
|
1057
|
-
description: "Unique identifier/ticker symbol for the commodity (e.g., XAU, NG-FUT)."
|
|
1354
|
+
description: "Unique identifier/ticker symbol for the commodity (e.g., XAU, NG-FUT). Use this value in the `symbols` parameter of the rate endpoints."
|
|
1058
1355
|
},
|
|
1059
1356
|
name: {
|
|
1060
1357
|
type: "string",
|
|
1061
1358
|
description: "Full name of the commodity (e.g., Gold, Natural Gas Futures)."
|
|
1062
1359
|
},
|
|
1360
|
+
description: {
|
|
1361
|
+
type: "string",
|
|
1362
|
+
description: "Short description of the commodity. May be an empty string for some symbols."
|
|
1363
|
+
},
|
|
1063
1364
|
category: {
|
|
1064
1365
|
type: "string",
|
|
1065
|
-
description: "Category the commodity belongs to (e.g., Metals, Energy)."
|
|
1366
|
+
description: "Category the commodity belongs to (e.g., Metals, Energy, Agriculture, Industrial, Raw Materials, Oils and Meals, Textiles, Meats, Poultry, Livestock)."
|
|
1066
1367
|
},
|
|
1067
1368
|
status: {
|
|
1068
1369
|
type: "string",
|
|
1069
|
-
|
|
1370
|
+
enum: ["active", "inactive"],
|
|
1371
|
+
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`."
|
|
1070
1372
|
},
|
|
1071
1373
|
updateInterval: {
|
|
1072
1374
|
type: "string",
|
|
1073
|
-
|
|
1375
|
+
enum: [
|
|
1376
|
+
"PER_SECOND",
|
|
1377
|
+
"PER_MINUTE",
|
|
1378
|
+
"PER_10_MINUTES",
|
|
1379
|
+
"PER_HOUR",
|
|
1380
|
+
"PER_DAY",
|
|
1381
|
+
"PER_WEEK",
|
|
1382
|
+
"PER_MONTH"
|
|
1383
|
+
],
|
|
1384
|
+
description: "Rate at which the price is updated."
|
|
1385
|
+
},
|
|
1386
|
+
exchange: {
|
|
1387
|
+
type: "string",
|
|
1388
|
+
description: "Optional. Data source for the symbol (e.g., World Bank). Present only for some symbols."
|
|
1389
|
+
},
|
|
1390
|
+
deprecationDate: {
|
|
1391
|
+
type: "string",
|
|
1392
|
+
format: "date",
|
|
1393
|
+
description: "Optional. Present only when `status` is `inactive`. Date the symbol was deprecated (YYYY-MM-DD)."
|
|
1074
1394
|
},
|
|
1075
1395
|
currency: {
|
|
1076
1396
|
$ref: "#/components/schemas/CommodityCurrency"
|
|
@@ -1139,8 +1459,8 @@ var commodity_time_series_default = {
|
|
|
1139
1459
|
openapi: "3.1.1",
|
|
1140
1460
|
info: {
|
|
1141
1461
|
title: "Commodities Time Series API",
|
|
1142
|
-
version: "
|
|
1143
|
-
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.",
|
|
1462
|
+
version: "2.0.0",
|
|
1463
|
+
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, and only closing rates are available for monthly-updated commodities. A symbol is considered resolved if it appears on at least one date in the range; if some requested symbols can't be resolved at all, a 206 Partial Content response is returned with an `unresolved` object. 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.",
|
|
1144
1464
|
contact: {
|
|
1145
1465
|
name: "APIFreaks Support",
|
|
1146
1466
|
url: "https://apifreaks.com/contact",
|
|
@@ -1149,7 +1469,7 @@ var commodity_time_series_default = {
|
|
|
1149
1469
|
},
|
|
1150
1470
|
servers: [
|
|
1151
1471
|
{
|
|
1152
|
-
url: "https://api.apifreaks.com/
|
|
1472
|
+
url: "https://api.apifreaks.com/v2.0",
|
|
1153
1473
|
description: "Commodity Time Series API Server"
|
|
1154
1474
|
}
|
|
1155
1475
|
],
|
|
@@ -1252,6 +1572,62 @@ var commodity_time_series_default = {
|
|
|
1252
1572
|
}
|
|
1253
1573
|
}
|
|
1254
1574
|
},
|
|
1575
|
+
"206": {
|
|
1576
|
+
description: "Partial Content \u2014 Some requested symbols could not be resolved",
|
|
1577
|
+
content: {
|
|
1578
|
+
"application/json": {
|
|
1579
|
+
schema: {
|
|
1580
|
+
$ref: "#/components/schemas/CommodityTimeSeriesResponse"
|
|
1581
|
+
},
|
|
1582
|
+
examples: {
|
|
1583
|
+
partial: {
|
|
1584
|
+
summary: "One valid symbol, one unresolved symbol",
|
|
1585
|
+
value: {
|
|
1586
|
+
success: true,
|
|
1587
|
+
startDate: "2025-01-06",
|
|
1588
|
+
endDate: "2025-01-08",
|
|
1589
|
+
rates: {
|
|
1590
|
+
"2025-01-06": {
|
|
1591
|
+
XAU: {
|
|
1592
|
+
open: 2649.01,
|
|
1593
|
+
high: 2651.33,
|
|
1594
|
+
low: 2645.36,
|
|
1595
|
+
close: 2646.91
|
|
1596
|
+
}
|
|
1597
|
+
},
|
|
1598
|
+
"2025-01-07": {
|
|
1599
|
+
XAU: {
|
|
1600
|
+
open: 2662.45,
|
|
1601
|
+
high: 2663.06,
|
|
1602
|
+
low: 2655.66,
|
|
1603
|
+
close: 2658.9
|
|
1604
|
+
}
|
|
1605
|
+
},
|
|
1606
|
+
"2025-01-08": {
|
|
1607
|
+
XAU: {
|
|
1608
|
+
open: 2669.69,
|
|
1609
|
+
high: 2674.68,
|
|
1610
|
+
low: 2668.58,
|
|
1611
|
+
close: 2671.8
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
},
|
|
1615
|
+
unresolved: {
|
|
1616
|
+
FAKESYM: {
|
|
1617
|
+
message: "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
},
|
|
1625
|
+
headers: {
|
|
1626
|
+
"X-AF-Credits-Cost": {
|
|
1627
|
+
$ref: "#/components/headers/X-AF-Credits-Cost"
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
},
|
|
1255
1631
|
"400": {
|
|
1256
1632
|
description: "Bad Request \u2014 Missing parameters, invalid dates, or date range exceeded",
|
|
1257
1633
|
content: {
|
|
@@ -1262,9 +1638,9 @@ var commodity_time_series_default = {
|
|
|
1262
1638
|
value: {
|
|
1263
1639
|
error: "Invalid Param Exception",
|
|
1264
1640
|
message: "please pass correct parameters",
|
|
1265
|
-
path: "/
|
|
1641
|
+
path: "/v2.0/commodity/time-series",
|
|
1266
1642
|
status: 400,
|
|
1267
|
-
timestamp: "2026-
|
|
1643
|
+
timestamp: "2026-09-14T08:43:58.547Z"
|
|
1268
1644
|
}
|
|
1269
1645
|
},
|
|
1270
1646
|
invalidDate: {
|
|
@@ -1309,6 +1685,33 @@ var commodity_time_series_default = {
|
|
|
1309
1685
|
}
|
|
1310
1686
|
}
|
|
1311
1687
|
},
|
|
1688
|
+
"402": {
|
|
1689
|
+
description: "Payment Required \u2014 Maximum symbols per request exceeded",
|
|
1690
|
+
content: {
|
|
1691
|
+
"application/json": {
|
|
1692
|
+
schema: {
|
|
1693
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1694
|
+
},
|
|
1695
|
+
examples: {
|
|
1696
|
+
maxSymbolsExceeded: {
|
|
1697
|
+
summary: "Too many symbols requested",
|
|
1698
|
+
value: {
|
|
1699
|
+
timestamp: "2026-09-14T08:44:00.586Z",
|
|
1700
|
+
path: "/rates/time-series",
|
|
1701
|
+
code: 402,
|
|
1702
|
+
error: "PAYMENT_REQUIRED",
|
|
1703
|
+
message: "Maximum symbols per request exceeded"
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
},
|
|
1709
|
+
headers: {
|
|
1710
|
+
"X-AF-Credits-Cost": {
|
|
1711
|
+
$ref: "#/components/headers/X-AF-Credits-Cost"
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
},
|
|
1312
1715
|
"404": {
|
|
1313
1716
|
description: "Not found - Symbol or data not available",
|
|
1314
1717
|
content: {
|
|
@@ -1320,17 +1723,22 @@ var commodity_time_series_default = {
|
|
|
1320
1723
|
symbolNotFound: {
|
|
1321
1724
|
summary: "Symbol Not Found",
|
|
1322
1725
|
value: {
|
|
1323
|
-
timestamp: "2026-
|
|
1726
|
+
timestamp: "2026-09-14T08:44:00.586Z",
|
|
1324
1727
|
path: "/rates/time-series",
|
|
1325
1728
|
code: 404,
|
|
1326
1729
|
error: "SYMBOL_NOT_FOUND",
|
|
1327
|
-
message: "The symbol is not supported, please visit the documentation for a list of supported symbols"
|
|
1730
|
+
message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
|
|
1731
|
+
unresolved: {
|
|
1732
|
+
FAKESYM: {
|
|
1733
|
+
message: "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1328
1736
|
}
|
|
1329
1737
|
},
|
|
1330
1738
|
dataNotFound: {
|
|
1331
1739
|
summary: "No data available for the given date range",
|
|
1332
1740
|
value: {
|
|
1333
|
-
timestamp: "2026-
|
|
1741
|
+
timestamp: "2026-09-14T08:44:31.547Z",
|
|
1334
1742
|
path: "/rates/time-series",
|
|
1335
1743
|
code: 404,
|
|
1336
1744
|
error: "DATA_NOT_FOUND",
|
|
@@ -1384,6 +1792,26 @@ var commodity_time_series_default = {
|
|
|
1384
1792
|
},
|
|
1385
1793
|
rates: {
|
|
1386
1794
|
$ref: "#/components/schemas/CommodityTimeSeriesRates"
|
|
1795
|
+
},
|
|
1796
|
+
unresolved: {
|
|
1797
|
+
type: "object",
|
|
1798
|
+
description: "Present only on a 206 Partial Content response, when some requested symbols could not be resolved on any date in the range. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
|
|
1799
|
+
additionalProperties: {
|
|
1800
|
+
type: "object",
|
|
1801
|
+
properties: {
|
|
1802
|
+
message: {
|
|
1803
|
+
type: "string",
|
|
1804
|
+
description: "Detail message explaining why this symbol was not resolved."
|
|
1805
|
+
},
|
|
1806
|
+
suggestions: {
|
|
1807
|
+
type: "array",
|
|
1808
|
+
description: "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
1809
|
+
items: {
|
|
1810
|
+
type: "string"
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1387
1815
|
}
|
|
1388
1816
|
},
|
|
1389
1817
|
description: "Commodity time series response containing date-indexed OHLC data per symbol."
|
|
@@ -1456,6 +1884,26 @@ var commodity_time_series_default = {
|
|
|
1456
1884
|
type: "string",
|
|
1457
1885
|
format: "date-time",
|
|
1458
1886
|
description: "Timestamp when the error occurred (ISO 8601)."
|
|
1887
|
+
},
|
|
1888
|
+
unresolved: {
|
|
1889
|
+
type: "object",
|
|
1890
|
+
description: "Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
|
|
1891
|
+
additionalProperties: {
|
|
1892
|
+
type: "object",
|
|
1893
|
+
properties: {
|
|
1894
|
+
message: {
|
|
1895
|
+
type: "string",
|
|
1896
|
+
description: "Detail message explaining why this symbol was not resolved."
|
|
1897
|
+
},
|
|
1898
|
+
suggestions: {
|
|
1899
|
+
type: "array",
|
|
1900
|
+
description: "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
1901
|
+
items: {
|
|
1902
|
+
type: "string"
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1459
1907
|
}
|
|
1460
1908
|
}
|
|
1461
1909
|
}
|
|
@@ -1484,8 +1932,8 @@ var historical_commodity_prices_default = {
|
|
|
1484
1932
|
openapi: "3.1.1",
|
|
1485
1933
|
info: {
|
|
1486
1934
|
title: "Historical Commodity Prices, Delivered Simply.",
|
|
1487
|
-
version: "
|
|
1488
|
-
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
|
|
1935
|
+
version: "2.0.0",
|
|
1936
|
+
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.",
|
|
1489
1937
|
contact: {
|
|
1490
1938
|
name: "APIFreaks Support",
|
|
1491
1939
|
url: "https://apifreaks.com/contact",
|
|
@@ -1494,7 +1942,7 @@ var historical_commodity_prices_default = {
|
|
|
1494
1942
|
},
|
|
1495
1943
|
servers: [
|
|
1496
1944
|
{
|
|
1497
|
-
url: "https://api.apifreaks.com/
|
|
1945
|
+
url: "https://api.apifreaks.com/v2.0",
|
|
1498
1946
|
description: "Historical Commodity Prices API Server"
|
|
1499
1947
|
}
|
|
1500
1948
|
],
|
|
@@ -1577,32 +2025,107 @@ var historical_commodity_prices_default = {
|
|
|
1577
2025
|
}
|
|
1578
2026
|
}
|
|
1579
2027
|
},
|
|
2028
|
+
"206": {
|
|
2029
|
+
description: "Partial Content \u2014 Some requested symbols could not be resolved",
|
|
2030
|
+
content: {
|
|
2031
|
+
"application/json": {
|
|
2032
|
+
schema: {
|
|
2033
|
+
$ref: "#/components/schemas/HistoricalCommodityPricesResponse"
|
|
2034
|
+
},
|
|
2035
|
+
examples: {
|
|
2036
|
+
partial: {
|
|
2037
|
+
summary: "One valid symbol, one unresolved symbol",
|
|
2038
|
+
value: {
|
|
2039
|
+
success: true,
|
|
2040
|
+
date: "2025-01-10",
|
|
2041
|
+
rates: {
|
|
2042
|
+
XAU: {
|
|
2043
|
+
date: "2025-01-10",
|
|
2044
|
+
open: 2669.93,
|
|
2045
|
+
high: 2697.85,
|
|
2046
|
+
low: 2663.61,
|
|
2047
|
+
close: 2689.44
|
|
2048
|
+
}
|
|
2049
|
+
},
|
|
2050
|
+
unresolved: {
|
|
2051
|
+
FAKESYM: {
|
|
2052
|
+
message: "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
},
|
|
2060
|
+
headers: {
|
|
2061
|
+
"X-AF-Credits-Cost": {
|
|
2062
|
+
$ref: "#/components/headers/X-AF-Credits-Cost"
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
},
|
|
1580
2066
|
"400": {
|
|
1581
|
-
description: "Bad
|
|
2067
|
+
description: "Bad Request \u2014 Missing parameters or invalid date",
|
|
1582
2068
|
content: {
|
|
1583
2069
|
"application/json": {
|
|
1584
2070
|
schema: {
|
|
1585
2071
|
$ref: "#/components/schemas/ErrorResponse"
|
|
1586
2072
|
},
|
|
1587
2073
|
examples: {
|
|
2074
|
+
missingSymbols: {
|
|
2075
|
+
summary: "Missing required symbols parameter",
|
|
2076
|
+
value: {
|
|
2077
|
+
error: "Invalid Param Exception",
|
|
2078
|
+
message: "please pass correct parameters",
|
|
2079
|
+
path: "/v2.0/commodity/rates/historical",
|
|
2080
|
+
status: 400,
|
|
2081
|
+
timestamp: "2026-09-14T08:44:32.013Z"
|
|
2082
|
+
}
|
|
2083
|
+
},
|
|
1588
2084
|
invalidDateFormat: {
|
|
1589
2085
|
summary: "Invalid date format",
|
|
1590
2086
|
value: {
|
|
1591
|
-
timestamp:
|
|
1592
|
-
|
|
2087
|
+
timestamp: "2026-09-14T08:45:13.934Z",
|
|
2088
|
+
path: "/rates/historical",
|
|
2089
|
+
code: 400,
|
|
1593
2090
|
error: "VALIDATION_ERROR",
|
|
1594
|
-
message: "Invalid Date Format (YYYY-MM-DD)."
|
|
1595
|
-
path: "/v1.0/commodity/rates/historical"
|
|
2091
|
+
message: "Invalid Date Format (YYYY-MM-DD)."
|
|
1596
2092
|
}
|
|
1597
2093
|
},
|
|
1598
2094
|
dateNotExist: {
|
|
1599
2095
|
summary: "Date does not exist",
|
|
1600
2096
|
value: {
|
|
1601
|
-
timestamp:
|
|
1602
|
-
|
|
2097
|
+
timestamp: "2026-09-14T08:44:01.487Z",
|
|
2098
|
+
path: "/rates/historical",
|
|
2099
|
+
code: 400,
|
|
1603
2100
|
error: "VALIDATION_ERROR",
|
|
1604
|
-
message: "Invalid Date: The provided date does not exist."
|
|
1605
|
-
|
|
2101
|
+
message: "Invalid Date: The provided date does not exist."
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
}
|
|
2106
|
+
},
|
|
2107
|
+
headers: {
|
|
2108
|
+
"X-AF-Credits-Cost": {
|
|
2109
|
+
$ref: "#/components/headers/X-AF-Credits-Cost"
|
|
2110
|
+
}
|
|
2111
|
+
}
|
|
2112
|
+
},
|
|
2113
|
+
"402": {
|
|
2114
|
+
description: "Payment Required \u2014 Maximum symbols per request exceeded",
|
|
2115
|
+
content: {
|
|
2116
|
+
"application/json": {
|
|
2117
|
+
schema: {
|
|
2118
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
2119
|
+
},
|
|
2120
|
+
examples: {
|
|
2121
|
+
maxSymbolsExceeded: {
|
|
2122
|
+
summary: "Too many symbols requested",
|
|
2123
|
+
value: {
|
|
2124
|
+
timestamp: "2026-09-14T08:44:01.978Z",
|
|
2125
|
+
path: "/rates/historical",
|
|
2126
|
+
code: 402,
|
|
2127
|
+
error: "PAYMENT_REQUIRED",
|
|
2128
|
+
message: "Maximum symbols per request exceeded"
|
|
1606
2129
|
}
|
|
1607
2130
|
}
|
|
1608
2131
|
}
|
|
@@ -1625,21 +2148,26 @@ var historical_commodity_prices_default = {
|
|
|
1625
2148
|
symbolNotFound: {
|
|
1626
2149
|
summary: "Symbol Not Found",
|
|
1627
2150
|
value: {
|
|
1628
|
-
timestamp:
|
|
1629
|
-
|
|
2151
|
+
timestamp: "2026-09-14T08:44:01.978Z",
|
|
2152
|
+
path: "/rates/historical",
|
|
2153
|
+
code: 404,
|
|
1630
2154
|
error: "SYMBOL_NOT_FOUND",
|
|
1631
2155
|
message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
|
|
1632
|
-
|
|
2156
|
+
unresolved: {
|
|
2157
|
+
FAKESYM: {
|
|
2158
|
+
message: "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
1633
2161
|
}
|
|
1634
2162
|
},
|
|
1635
2163
|
rateNotFound: {
|
|
1636
2164
|
summary: "Rate Not Found",
|
|
1637
2165
|
value: {
|
|
1638
|
-
timestamp:
|
|
1639
|
-
|
|
2166
|
+
timestamp: "2026-09-14T08:44:02.528Z",
|
|
2167
|
+
path: "/rates/historical",
|
|
2168
|
+
code: 404,
|
|
1640
2169
|
error: "RATE_NOT_FOUND",
|
|
1641
|
-
message: "no rates found for the specified date"
|
|
1642
|
-
path: "/v1.0/commodity/rates/historical"
|
|
2170
|
+
message: "no rates found for the specified date"
|
|
1643
2171
|
}
|
|
1644
2172
|
}
|
|
1645
2173
|
}
|
|
@@ -1685,6 +2213,26 @@ var historical_commodity_prices_default = {
|
|
|
1685
2213
|
},
|
|
1686
2214
|
rates: {
|
|
1687
2215
|
$ref: "#/components/schemas/HistoricalCommodityRates"
|
|
2216
|
+
},
|
|
2217
|
+
unresolved: {
|
|
2218
|
+
type: "object",
|
|
2219
|
+
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.",
|
|
2220
|
+
additionalProperties: {
|
|
2221
|
+
type: "object",
|
|
2222
|
+
properties: {
|
|
2223
|
+
message: {
|
|
2224
|
+
type: "string",
|
|
2225
|
+
description: "Detail message explaining why this symbol was not resolved."
|
|
2226
|
+
},
|
|
2227
|
+
suggestions: {
|
|
2228
|
+
type: "array",
|
|
2229
|
+
description: "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
2230
|
+
items: {
|
|
2231
|
+
type: "string"
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
}
|
|
2235
|
+
}
|
|
1688
2236
|
}
|
|
1689
2237
|
},
|
|
1690
2238
|
description: "Historical commodity prices response containing success status, date, and OHLC rate data."
|
|
@@ -1706,7 +2254,7 @@ var historical_commodity_prices_default = {
|
|
|
1706
2254
|
properties: {
|
|
1707
2255
|
date: {
|
|
1708
2256
|
type: "string",
|
|
1709
|
-
description: "Date for which prices were fetched (YYYY-MM-DD)."
|
|
2257
|
+
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."
|
|
1710
2258
|
},
|
|
1711
2259
|
open: {
|
|
1712
2260
|
type: "number",
|
|
@@ -1732,19 +2280,12 @@ var historical_commodity_prices_default = {
|
|
|
1732
2280
|
},
|
|
1733
2281
|
ErrorResponse: {
|
|
1734
2282
|
type: "object",
|
|
1735
|
-
|
|
2283
|
+
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 \u2014 check whichever is present.",
|
|
2284
|
+
required: ["message"],
|
|
1736
2285
|
properties: {
|
|
1737
|
-
timestamp: {
|
|
1738
|
-
type: "integer",
|
|
1739
|
-
description: "Unix timestamp in milliseconds when the error occurred."
|
|
1740
|
-
},
|
|
1741
|
-
status: {
|
|
1742
|
-
type: "integer",
|
|
1743
|
-
description: "HTTP status code returned with the error."
|
|
1744
|
-
},
|
|
1745
2286
|
error: {
|
|
1746
2287
|
type: "string",
|
|
1747
|
-
description: "
|
|
2288
|
+
description: "Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, RATE_NOT_FOUND)."
|
|
1748
2289
|
},
|
|
1749
2290
|
message: {
|
|
1750
2291
|
type: "string",
|
|
@@ -1752,10 +2293,42 @@ var historical_commodity_prices_default = {
|
|
|
1752
2293
|
},
|
|
1753
2294
|
path: {
|
|
1754
2295
|
type: "string",
|
|
1755
|
-
description: "API endpoint path that produced the error."
|
|
2296
|
+
description: "API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error."
|
|
2297
|
+
},
|
|
2298
|
+
status: {
|
|
2299
|
+
type: "integer",
|
|
2300
|
+
description: "HTTP status code. Present on gateway-level errors."
|
|
2301
|
+
},
|
|
2302
|
+
code: {
|
|
2303
|
+
type: "integer",
|
|
2304
|
+
description: "HTTP status code. Present on commodity-service errors instead of status."
|
|
2305
|
+
},
|
|
2306
|
+
timestamp: {
|
|
2307
|
+
type: "string",
|
|
2308
|
+
format: "date-time",
|
|
2309
|
+
description: "Timestamp when the error occurred (ISO 8601)."
|
|
2310
|
+
},
|
|
2311
|
+
unresolved: {
|
|
2312
|
+
type: "object",
|
|
2313
|
+
description: "Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
|
|
2314
|
+
additionalProperties: {
|
|
2315
|
+
type: "object",
|
|
2316
|
+
properties: {
|
|
2317
|
+
message: {
|
|
2318
|
+
type: "string",
|
|
2319
|
+
description: "Detail message explaining why this symbol was not resolved."
|
|
2320
|
+
},
|
|
2321
|
+
suggestions: {
|
|
2322
|
+
type: "array",
|
|
2323
|
+
description: "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
2324
|
+
items: {
|
|
2325
|
+
type: "string"
|
|
2326
|
+
}
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
1756
2330
|
}
|
|
1757
|
-
}
|
|
1758
|
-
description: "Standard error envelope returned by the API on failed requests."
|
|
2331
|
+
}
|
|
1759
2332
|
}
|
|
1760
2333
|
},
|
|
1761
2334
|
headers: {
|
|
@@ -49518,11 +50091,11 @@ var SPECS = {
|
|
|
49518
50091
|
var SPEC_SLUGS = ["usage-credits", "commodity-fluctuation", "commodity-prices", "commodity-symbols", "commodity-time-series", "historical-commodity-prices", "currency-converter", "currency-fluctuation", "currency-historical-data-limit", "currency-rate", "currency-supported", "currency-symbols", "currency-time-series", "geolocalized-currency-conversion", "historical-currency-converter", "historical-currency-rate", "bulk-dns-lookup", "dns-history-lookup", "dns-lookup", "reverse-dns-lookup", "bulk-domain-checker", "domain-reputation", "domain-search-with-suggestions", "domain-search", "domain-typosquatting", "subdomain-lookup", "bulk-email-validation", "email-checker", "bulk-vat-rates-country", "financial-apis-supported-countries", "iban-validation", "swift-code-finder", "swift-code-lookup", "vat-number-validation", "vat-rates-by-ip", "vat-rates-country", "forward-geocoding", "reverse-geocoding", "administrative-units-details", "administrative-units-levels", "administrative-units", "cities", "countries-details", "countries", "flags-supported", "flags", "regions", "subregions", "bulk-ip-lookup", "bulk-ip-threat-intelligence", "ip-locator", "ip-threat-intelligence", "delete-pdf-page", "linearize-pdf", "merge-pdf", "pdf-compress", "pdf-decrypt", "pdf-encrypt", "pdf-extract-pages", "pdf-file-status", "pdf-file", "pdf-files", "pdf-generator-bulk", "pdf-generator", "pdf-resource-download", "pdf-resource-upload-binary", "pdf-resource-upload", "pdf-restrict", "pdf-task-status", "pdf-to-image", "pdf-unrestrict", "rotate-pdf-pages", "split-pdf", "bulk-phone-number-validation", "phone-validation", "web-scraper", "bulk-screenshot", "website-screenshot", "ssl-certificate-chain-lookup", "ssl-certificate-lookup", "timezone-converter", "timezone-lookup", "bulk-user-agent-parser", "user-agent-parser", "air-quality", "astronomy-data", "bulk-live-weather", "flood-forecast", "historical-weather", "live-weather", "marine-weather", "time-series-weather", "weather-forecast", "asn-lookup", "bulk-whois-lookup", "domain-whois-history-lookup", "reverse-whois", "whois-domain-lookup", "whois-ip-lookup", "bulk-zip-code-lookup", "zip-code-api", "zip-code-distance-match", "zip-code-distance", "zip-codes-by-city", "zip-codes-by-region", "zip-codes-radius-search"];
|
|
49519
50092
|
var SPECS_YAML = {
|
|
49520
50093
|
"usage-credits": "openapi: 3.1.1\ninfo:\n title: Credits Usage API\n version: 1.0.0\n description: Retrieve the remaining and consumed API credit balances for the authenticated organization. Returns subscription-plan credits, subscription surcharge (overage) credits, and one-off credit purchases as separate balances, each with allowed and used counts. Only an organization admin API key can call this endpoint; all other keys receive a 403. There are no optional data modules for this endpoint \u2014 the response always includes the full credit breakdown.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v1.0\n description: Credits Usage API Server\npaths:\n /credits/usage/info:\n get:\n tags:\n - General APIs\n summary: Get remaining and consumed API credit balances for the organization\n description: Returns subscription, subscription-surcharge, and one-off credit balances for the authenticated organization's account.\n operationId: getCreditsUsage\n parameters:\n - name: format\n in: query\n required: false\n description: 'Format of the response. Possible values: json, xml.'\n schema:\n type: string\n enum:\n - json\n - xml\n default: json\n responses:\n '200':\n description: Successful response with credit balances\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CreditsUsageResponse'\n examples:\n success:\n summary: Typical response\n value:\n apiKey: demo\n userStatus: active\n subActive: true\n subStatus: active\n subAllowedCredits: 10000\n subUsedCredits: 2500\n subSurchargeStatus: none\n subSurchargeAllowedCredits: 0\n subSurchargeUsedCredits: 0\n subSurchargeAllowed: false\n oneOffCreditsActive: true\n oneOffAllowedCredits: 5000\n oneOffUsedCredits: 1000\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '403':\n description: Forbidden \u2014 Caller is not an organization admin\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n notOrgAdmin:\n summary: Not an organization admin\n value:\n timestamp: '2026-07-27T10:23:16.548Z'\n path: /v1.0/credits/usage/info\n status: 403\n error: API Access Exception\n message: You need to be organization admin to access this endpoint.\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n CreditsUsageResponse:\n type: object\n description: Credit balances for the organization's subscription, subscription surcharge, and one-off purchases.\n required:\n - apiKey\n - userStatus\n - oneOffCreditsActive\n - oneOffAllowedCredits\n - oneOffUsedCredits\n properties:\n apiKey:\n type: string\n description: The API key the credit balances belong to.\n userStatus:\n type: string\n enum:\n - active\n - inactive\n - deleted\n description: Status of the user account.\n subActive:\n type:\n - boolean\n - 'null'\n description: Whether a subscription plan is currently active. Null if the account has no subscription.\n subStatus:\n type:\n - string\n - 'null'\n enum:\n - active\n - overdue\n - cancelled\n - deactivated\n - null\n description: Status of the subscription credits. Null if the account has no subscription.\n subAllowedCredits:\n type:\n - integer\n - 'null'\n description: Total credits allowed under the subscription plan. Null if the account has no subscription.\n subUsedCredits:\n type:\n - integer\n - 'null'\n description: Credits consumed under the subscription plan. Null if the account has no subscription.\n subSurchargeStatus:\n type:\n - string\n - 'null'\n enum:\n - none\n - payment_added\n - payment_cleared\n - null\n description: Status of the subscription surcharge (overage) credits. Null if the account has no subscription.\n subSurchargeAllowedCredits:\n type:\n - integer\n - 'null'\n description: Total surcharge credits allowed. Null if the account has no subscription.\n subSurchargeUsedCredits:\n type:\n - integer\n - 'null'\n description: Surcharge credits consumed. Null if the account has no subscription.\n subSurchargeAllowed:\n type:\n - boolean\n - 'null'\n description: Whether surcharge (overage) usage is allowed on the subscription. Null if the account has no subscription.\n oneOffCreditsActive:\n type: boolean\n description: Whether the account has active one-off (pay-as-you-go) credits.\n oneOffAllowedCredits:\n type: integer\n description: Total one-off credits purchased.\n oneOffUsedCredits:\n type: integer\n description: One-off credits consumed.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type.\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path that produced the error.\n status:\n type: integer\n description: HTTP status code returned with the error.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
|
|
49521
|
-
"commodity-fluctuation": "openapi: 3.1.1\ninfo:\n title: 'Commodity Fluctuation API '\n version: 1.0.0\n 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.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v1.0\n description: Commodity Fluctuation API Server\npaths:\n /commodity/fluctuation:\n get:\n tags:\n - Commodity APIs\n summary: Get commodity price fluctuations\n description: Returns price fluctuation metrics (start, end, change, percent change) for the requested commodity symbols over a date range.\n operationId: getCommodityFluctuation\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols.\n schema:\n type: string\n - name: startDate\n in: query\n required: true\n description: Start date in `YYYY-MM-DD` format.\n schema:\n type: string\n - name: endDate\n in: query\n required: true\n description: End date in `YYYY-MM-DD` format.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityFluctuationResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n startDate: '2024-01-01'\n endDate: '2024-01-31'\n rates:\n WTIOIL-SPOT:\n startRate: 72.02\n endRate: 75.81\n change: 3.79\n changePercent: 5.26\n XAU:\n startRate: 2063.63\n endRate: 2039.83\n change: -23.8\n changePercent: -1.15\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad Request \u2014 Missing parameters or invalid dates\n content:\n application/json:\n examples:\n missingSymbols:\n summary: Missing required symbols parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v1.0/commodity/fluctuation\n status: 400\n timestamp: '2026-07-27T11:37:24.273Z'\n invalidDateFormat:\n summary: Date is not in YYYY-MM-DD format\n value:\n timestamp: '2026-07-27T11:37:22.687Z'\n path: /rates/fluctuation\n code: 400\n error: VALIDATION_ERROR\n message: Invalid Date Format (YYYY-MM-DD).\n dateNotExist:\n summary: Date does not exist on the calendar (e.g. Feb 30)\n value:\n timestamp: '2026-07-27T11:37:33.565Z'\n path: /rates/fluctuation\n code: 400\n error: VALIDATION_ERROR\n message: 'Invalid Date: The provided start date or end date does not exist.'\n startAfterEnd:\n summary: startDate is after endDate\n value:\n timestamp: '2026-07-27T11:37:23.206Z'\n path: /rates/fluctuation\n code: 400\n error: VALIDATION_ERROR\n message: Start date cannot be after end date\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or data not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: '2026-07-27T11:37:23.759Z'\n path: /rates/fluctuation\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n noData:\n summary: No data available for the given date range\n value:\n timestamp: '2026-07-27T11:37:34.167Z'\n path: /rates/fluctuation\n code: 404\n error: DATA_NOT_FOUND\n message: No data found for the given date range\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n CommodityFluctuationResponse:\n type: object\n required:\n - success\n - startDate\n - endDate\n - rates\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n startDate:\n type: string\n description: Start date of the interval (YYYY-MM-DD).\n endDate:\n type: string\n description: End date of the interval (YYYY-MM-DD).\n rates:\n $ref: '#/components/schemas/CommodityFluctuationRates'\n description: Commodity fluctuation response containing price change data per symbol over a date range.\n CommodityFluctuationRates:\n type: object\n description: Map of requested commodity symbols to their fluctuation metrics. Each key is a commodity symbol (e.g. XAU).\n additionalProperties:\n title: CommodityFluctuationItem\n type: object\n description: Fluctuation metrics for a single commodity over a date range.\n required:\n - startRate\n - endRate\n - change\n - changePercent\n properties:\n startRate:\n type: number\n format: float\n description: Price of the commodity on the start date.\n endRate:\n type: number\n format: float\n description: Price of the commodity on the end date.\n change:\n type: number\n format: float\n description: Absolute price difference between end and start dates. May be negative.\n changePercent:\n type: number\n format: float\n description: Percentage price change from start to end date. May be negative.\n ErrorResponse:\n type: object\n 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 \u2014 check whichever is present.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, DATA_NOT_FOUND).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error.\n status:\n type: integer\n description: HTTP status code. Present on gateway-level errors.\n code:\n type: integer\n description: HTTP status code. Present on commodity-service errors instead of status.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
|
|
49522
|
-
"commodity-prices": "openapi: 3.1.1\ninfo:\n title: Live Commodity Prices API - Real Time Market Insights\n version: 1.0.0\n description: Get real-time prices for 130+ commodities in a single request. Returns current market prices for each requested symbol plus unit and quote currency metadata. Supports an optional quote parameter to convert prices into a desired currency, defaulting to each commodity's native market currency. Accepts 1-minute or 10-minute update frequencies for price freshness. An unsupported symbol or quote currency returns a 404.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v1.0\n description: Live Commodity Prices API Server\npaths:\n /commodity/rates/latest:\n get:\n tags:\n - Commodity APIs\n summary: Get latest commodity prices\n description: Returns the current live price for the requested commodity symbols.\n operationId: getLatestCommodityPrices\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols (e.g., `XAU`, `WTIOIL-SPOT`).\n schema:\n type: string\n - name: updates\n in: query\n required: true\n description: 'Update frequency. Accepted values: `1m` (default), `10m`.'\n schema:\n type: string\n enum:\n - 1m\n - 10m\n default: 1m\n - name: quote\n in: query\n required: false\n description: Target currency for the exchange rate. Defaults to the market currency of each commodity.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/LiveCommodityPricesResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n timestamp: 1785152172\n rates:\n XAU: 4099.1\n WTIOIL-SPOT: 81.88\n metadata:\n XAU:\n unit: T.oz\n quote: USD\n WTIOIL-SPOT:\n unit: Bbl\n quote: USD\n withQuoteConversion:\n summary: Price converted to a target quote currency\n value:\n success: true\n timestamp: 1785152172\n rates:\n XAU: 3597.734\n metadata:\n XAU:\n unit: T.oz\n quote: EUR\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad Request \u2014 Missing or invalid query parameters\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n missingSymbols:\n summary: Missing required symbols parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v1.0/commodity/rates/latest\n status: 400\n timestamp: '2026-07-27T11:36:13.312Z'\n invalidUpdates:\n summary: updates is not 1m or 10m\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v1.0/commodity/rates/latest\n status: 400\n timestamp: '2026-07-27T11:36:35.755Z'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or quote currency not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityNotFoundError'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: 1781792620618\n path: /rates/latestRates\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n quoteNotFound:\n summary: Quote Currency Not Found\n value:\n timestamp: 1781792620618\n path: /rates/latestRates\n code: 404\n error: QUOTE_NOT_FOUND\n message: The quote currency is invalid, please visit the documentation for a list of valid quote currencies\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n LiveCommodityPricesResponse:\n type: object\n required:\n - success\n - timestamp\n - rates\n - metadata\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n timestamp:\n type: integer\n description: Unix timestamp (seconds) indicating when the response was generated.\n rates:\n $ref: '#/components/schemas/CommodityRates'\n metadata:\n $ref: '#/components/schemas/CommodityMetadata'\n description: Live commodity prices response containing success status, timestamp, rates, and metadata.\n CommodityRates:\n type: object\n description: Map of requested commodity symbols to their current live price. Each key is a commodity symbol (e.g. XAU); the value is the current price.\n additionalProperties:\n title: CommodityPrice\n type: number\n description: Current live price for this commodity symbol.\n CommodityMetadata:\n type: object\n description: Map of requested commodity symbols to their unit and quote currency metadata. Each key is a commodity symbol (e.g. XAU).\n additionalProperties:\n title: CommodityMetadataItem\n type: object\n description: Unit and currency metadata for a single commodity.\n required:\n - unit\n - quote\n properties:\n unit:\n type: string\n description: Unit of measurement for the commodity (e.g., Bbl, T.oz).\n quote:\n type: string\n description: Quote currency used for this commodity's price.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type.\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path that produced the error.\n status:\n type: integer\n description: HTTP status code returned with the error.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n CommodityNotFoundError:\n type: object\n description: Error envelope returned by the commodity pricing service specifically for unresolvable symbol/quote errors. Uses `code` instead of `status` and a Unix millisecond `timestamp`, unlike the standard ErrorResponse.\n required:\n - code\n - error\n - message\n properties:\n timestamp:\n type: integer\n description: Unix timestamp in milliseconds when the error occurred.\n path:\n type: string\n description: Internal service path that produced the error.\n code:\n type: integer\n description: HTTP status code returned with the error.\n error:\n type: string\n description: Specific error type (e.g., SYMBOL_NOT_FOUND, QUOTE_NOT_FOUND).\n message:\n type: string\n description: Human-readable error message describing the failure.\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
|
|
49523
|
-
"commodity-symbols": "openapi: 3.1.1\ninfo:\n title: Commodity Symbols API Reference\n version:
|
|
49524
|
-
"commodity-time-series": "openapi: 3.1.1\ninfo:\n title: Commodities Time Series API\n version: 1.0.0\n 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.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v1.0\n description: Commodity Time Series API Server\npaths:\n /commodity/time-series:\n get:\n tags:\n - Commodity APIs\n summary: Get commodity price time series\n description: Returns day-by-day OHLC data for the requested commodity symbols within a date range.\n operationId: getCommodityTimeSeries\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols.\n schema:\n type: string\n - name: startDate\n in: query\n required: true\n description: Start date in `YYYY-MM-DD` format.\n schema:\n type: string\n - name: endDate\n in: query\n required: true\n description: End date in `YYYY-MM-DD` format. Maximum range is 365 days.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityTimeSeriesResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n startDate: '2025-01-06'\n endDate: '2025-01-08'\n rates:\n '2025-01-06':\n XAU:\n open: 2649.01\n high: 2651.33\n low: 2645.36\n close: 2646.91\n '2025-01-07':\n XAU:\n open: 2662.45\n high: 2663.06\n low: 2655.66\n close: 2658.9\n '2025-01-08':\n XAU:\n open: 2669.69\n high: 2674.68\n low: 2668.58\n close: 2671.8\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad Request \u2014 Missing parameters, invalid dates, or date range exceeded\n content:\n application/json:\n examples:\n missingSymbols:\n summary: Missing required symbols parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v1.0/commodity/time-series\n status: 400\n timestamp: '2026-07-27T11:38:40.063Z'\n invalidDate:\n summary: Date does not exist on the calendar\n value:\n timestamp: '2026-07-27T11:38:41.234Z'\n path: /rates/time-series\n code: 400\n error: VALIDATION_ERROR\n message: 'Invalid Date: The provided start date or end date does not exist.'\n startAfterEnd:\n summary: startDate is after endDate\n value:\n timestamp: '2026-07-27T11:38:41.234Z'\n path: /rates/time-series\n code: 400\n error: VALIDATION_ERROR\n message: start date cannot be after end date\n dateRangeExceeded:\n summary: Date range exceeds 365 days\n value:\n timestamp: '2026-07-27T11:38:40.699Z'\n path: /rates/time-series\n code: 400\n error: VALIDATION_ERROR\n message: Date range exceeds the allowed limit.\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or data not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: '2026-07-27T11:38:41.234Z'\n path: /rates/time-series\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n dataNotFound:\n summary: No data available for the given date range\n value:\n timestamp: '2026-07-27T11:38:41.234Z'\n path: /rates/time-series\n code: 404\n error: DATA_NOT_FOUND\n message: No data found for the specified date range\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n CommodityTimeSeriesResponse:\n type: object\n required:\n - success\n - startDate\n - endDate\n - rates\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n startDate:\n type: string\n description: Start date of the time series (YYYY-MM-DD).\n endDate:\n type: string\n description: End date of the time series (YYYY-MM-DD).\n rates:\n $ref: '#/components/schemas/CommodityTimeSeriesRates'\n description: Commodity time series response containing date-indexed OHLC data per symbol.\n CommodityTimeSeriesRates:\n type: object\n description: Map of trading dates to per-symbol OHLC data. Each key is a trading date (YYYY-MM-DD); non-trading days are excluded.\n additionalProperties:\n title: CommodityTimeSeriesSymbolData\n type: object\n description: Map of commodity symbols to their OHLC data for a single trading date. Each key is a commodity symbol (e.g. XAU).\n additionalProperties:\n $ref: '#/components/schemas/CommodityOhlc'\n CommodityOhlc:\n type: object\n description: OHLC price data for a single commodity on a single trading day.\n required:\n - open\n - high\n - low\n - close\n properties:\n open:\n type: number\n format: float\n description: Opening price on the given date.\n high:\n type: number\n format: float\n description: Highest price on the given date.\n low:\n type: number\n format: float\n description: Lowest price on the given date.\n close:\n type: number\n format: float\n description: Closing price on the given date.\n ErrorResponse:\n type: object\n 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 \u2014 check whichever is present.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, DATA_NOT_FOUND).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error.\n status:\n type: integer\n description: HTTP status code. Present on gateway-level errors.\n code:\n type: integer\n description: HTTP status code. Present on commodity-service errors instead of status.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
|
|
49525
|
-
"historical-commodity-prices": "openapi: 3.1.1\ninfo:\n title: Historical Commodity Prices, Delivered Simply.\n version: 1.0.0\n 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.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v1.0\n description: Historical Commodity Prices API Server\npaths:\n /commodity/rates/historical:\n get:\n tags:\n - Commodity APIs\n summary: Get historical commodity prices\n description: Returns OHLC price data for the requested commodity symbols on a specific date.\n operationId: getHistoricalCommodityPrices\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols.\n schema:\n type: string\n - name: date\n in: query\n required: true\n description: Date in `YYYY-MM-DD` format. Data available from 1990 onwards.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/HistoricalCommodityPricesResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n date: '2025-01-10'\n rates:\n WTIOIL-SPOT:\n date: '2025-01-10'\n open: 73.77\n high: 77.16\n low: 73.55\n close: 75.97\n XAU:\n date: '2025-01-10'\n open: 2669.93\n high: 2697.85\n low: 2663.61\n close: 2689.44\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad request - Invalid date format\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n invalidDateFormat:\n summary: Invalid date format\n value:\n timestamp: 1781792620618\n status: 400\n error: VALIDATION_ERROR\n message: Invalid Date Format (YYYY-MM-DD).\n path: /v1.0/commodity/rates/historical\n dateNotExist:\n summary: Date does not exist\n value:\n timestamp: 1781792620618\n status: 400\n error: VALIDATION_ERROR\n message: 'Invalid Date: The provided date does not exist.'\n path: /v1.0/commodity/rates/historical\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or rate not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: 1781792620618\n status: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n path: /v1.0/commodity/rates/historical\n rateNotFound:\n summary: Rate Not Found\n value:\n timestamp: 1781792620618\n status: 404\n error: RATE_NOT_FOUND\n message: no rates found for the specified date\n path: /v1.0/commodity/rates/historical\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n HistoricalCommodityPricesResponse:\n type: object\n required:\n - success\n - date\n - rates\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n date:\n type: string\n description: Date for which prices were fetched (YYYY-MM-DD).\n rates:\n $ref: '#/components/schemas/HistoricalCommodityRates'\n description: Historical commodity prices response containing success status, date, and OHLC rate data.\n HistoricalCommodityRates:\n type: object\n 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.\n properties:\n symbol:\n $ref: '#/components/schemas/HistoricalCommodityRate'\n required:\n - symbol\n HistoricalCommodityRate:\n type: object\n description: OHLC price data for a single commodity on a specific date.\n required:\n - date\n - open\n - high\n - low\n - close\n properties:\n date:\n type: string\n description: Date for which prices were fetched (YYYY-MM-DD).\n open:\n type: number\n format: float\n description: Opening price on the given date.\n high:\n type: number\n format: float\n description: Highest price recorded on the given date.\n low:\n type: number\n format: float\n description: Lowest price recorded on the given date.\n close:\n type: number\n format: float\n description: Closing price on the given date.\n ErrorResponse:\n type: object\n required:\n - timestamp\n - status\n - error\n - message\n - path\n properties:\n timestamp:\n type: integer\n description: Unix timestamp in milliseconds when the error occurred.\n status:\n type: integer\n description: HTTP status code returned with the error.\n error:\n type: string\n description: Specific error type (e.g., SYMBOL_NOT_FOUND, VALIDATION_ERROR).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path that produced the error.\n description: Standard error envelope returned by the API on failed requests.\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
|
|
50094
|
+
"commodity-fluctuation": "openapi: 3.1.1\ninfo:\n title: 'Commodity Fluctuation API '\n version: 2.0.0\n 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.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v2.0\n description: Commodity Fluctuation API Server\npaths:\n /commodity/fluctuation:\n get:\n tags:\n - Commodity APIs\n summary: Get commodity price fluctuations\n description: Returns price fluctuation metrics (start, end, change, percent change) for the requested commodity symbols over a date range.\n operationId: getCommodityFluctuation\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols.\n schema:\n type: string\n - name: startDate\n in: query\n required: true\n description: Start date in `YYYY-MM-DD` format.\n schema:\n type: string\n - name: endDate\n in: query\n required: true\n description: End date in `YYYY-MM-DD` format.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityFluctuationResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n startDate: '2024-01-01'\n endDate: '2024-01-31'\n rates:\n WTIOIL-SPOT:\n startRate: 72.02\n endRate: 75.81\n change: 3.79\n changePercent: 5.26\n XAU:\n startRate: 2063.63\n endRate: 2039.83\n change: -23.8\n changePercent: -1.15\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '206':\n description: Partial Content \u2014 Some requested symbols could not be resolved\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityFluctuationResponse'\n examples:\n partial:\n summary: One valid symbol, one unresolved symbol\n value:\n success: true\n startDate: '2024-01-01'\n endDate: '2024-01-31'\n rates:\n XAU:\n startRate: 2063.63\n endRate: 2039.83\n change: -23.8\n changePercent: -1.15\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad Request \u2014 Missing parameters or invalid dates\n content:\n application/json:\n examples:\n missingSymbols:\n summary: Missing required symbols parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v2.0/commodity/fluctuation\n status: 400\n timestamp: '2026-09-14T08:43:46.481Z'\n invalidDateFormat:\n summary: Date is not in YYYY-MM-DD format\n value:\n timestamp: '2026-07-27T11:37:22.687Z'\n path: /rates/fluctuation\n code: 400\n error: VALIDATION_ERROR\n message: Invalid Date Format (YYYY-MM-DD).\n dateNotExist:\n summary: Date does not exist on the calendar (e.g. Feb 30)\n value:\n timestamp: '2026-07-27T11:37:33.565Z'\n path: /rates/fluctuation\n code: 400\n error: VALIDATION_ERROR\n message: 'Invalid Date: The provided start date or end date does not exist.'\n startAfterEnd:\n summary: startDate is after endDate\n value:\n timestamp: '2026-07-27T11:37:23.206Z'\n path: /rates/fluctuation\n code: 400\n error: VALIDATION_ERROR\n message: Start date cannot be after end date\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '402':\n description: Payment Required \u2014 Maximum symbols per request exceeded\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n maxSymbolsExceeded:\n summary: Too many symbols requested\n value:\n timestamp: '2026-09-14T08:43:48.408Z'\n path: /rates/fluctuation\n code: 402\n error: PAYMENT_REQUIRED\n message: Maximum symbols per request exceeded\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or data not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: '2026-09-14T08:43:48.408Z'\n path: /rates/fluctuation\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n noData:\n summary: No data available for the given date range\n value:\n timestamp: '2026-09-14T08:44:31.022Z'\n path: /rates/fluctuation\n code: 404\n error: DATA_NOT_FOUND\n message: No data found for the given date range\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n CommodityFluctuationResponse:\n type: object\n required:\n - success\n - startDate\n - endDate\n - rates\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n startDate:\n type: string\n description: Start date of the interval (YYYY-MM-DD).\n endDate:\n type: string\n description: End date of the interval (YYYY-MM-DD).\n rates:\n $ref: '#/components/schemas/CommodityFluctuationRates'\n unresolved:\n type: object\n 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.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n description: Commodity fluctuation response containing price change data per symbol over a date range.\n CommodityFluctuationRates:\n type: object\n description: Map of requested commodity symbols to their fluctuation metrics. Each key is a commodity symbol (e.g. XAU).\n additionalProperties:\n title: CommodityFluctuationItem\n type: object\n description: Fluctuation metrics for a single commodity over a date range.\n required:\n - startRate\n - endRate\n - change\n - changePercent\n properties:\n startRate:\n type: number\n format: float\n description: Price of the commodity on the start date.\n endRate:\n type: number\n format: float\n description: Price of the commodity on the end date.\n change:\n type: number\n format: float\n description: Absolute price difference between end and start dates. May be negative.\n changePercent:\n type: number\n format: float\n description: Percentage price change from start to end date. May be negative.\n ErrorResponse:\n type: object\n 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 \u2014 check whichever is present.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, DATA_NOT_FOUND).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error.\n status:\n type: integer\n description: HTTP status code. Present on gateway-level errors.\n code:\n type: integer\n description: HTTP status code. Present on commodity-service errors instead of status.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n unresolved:\n type: object\n description: Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
|
|
50095
|
+
"commodity-prices": "openapi: 3.1.1\ninfo:\n title: Live Commodity Prices API - Real Time Market Insights\n version: 2.0.0\n description: Get real-time prices for 245+ commodities in a single request. Returns current market prices for each requested symbol plus unit and quote currency metadata. Supports an optional quote parameter to convert prices into a desired currency, defaulting to each commodity's native market currency. Accepts 10-minute or 1-minute update frequencies for price freshness. If some requested symbols can't be resolved, a 206 Partial Content response is returned with the resolved rates plus an `unresolved` object; if none resolve, a 404 is returned instead. An unsupported quote currency also returns a 404.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v2.0\n description: Live Commodity Prices API Server\npaths:\n /commodity/rates/latest:\n get:\n tags:\n - Commodity APIs\n summary: Get latest commodity prices\n description: Returns the current live price for the requested commodity symbols.\n operationId: getLatestCommodityPrices\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols (e.g., `XAU`, `WTIOIL-SPOT`).\n schema:\n type: string\n - name: updates\n in: query\n required: true\n description: 'Update frequency. Accepted values: `10m` (default), `1m`.'\n schema:\n type: string\n enum:\n - 10m\n - 1m\n default: 10m\n - name: quote\n in: query\n required: false\n description: Target currency for the exchange rate. Defaults to the market currency of each commodity.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/LiveCommodityPricesResponse'\n examples:\n success:\n summary: Successful response (10m update frequency)\n value:\n success: true\n timestamp: 1789375397\n rates:\n XAU: 4313.04\n WTIOIL-SPOT: 100\n metadata:\n XAU:\n unit: T.oz\n quote: USD\n WTIOIL-SPOT:\n unit: Bbl\n quote: USD\n withQuoteConversion:\n summary: Price converted to a target quote currency\n value:\n success: true\n timestamp: 1789375426\n rates:\n XAU: 3739.023\n metadata:\n XAU:\n unit: T.oz\n quote: EUR\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '206':\n description: Partial Content \u2014 Some requested symbols could not be resolved\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/LiveCommodityPricesResponse'\n examples:\n partial:\n summary: One valid symbol, one unresolved symbol\n value:\n success: true\n timestamp: 1789376193\n rates:\n XAU: 4311.88\n metadata:\n XAU:\n unit: T.oz\n quote: USD\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n partialWithSuggestions:\n summary: Unresolved symbol with close-match suggestions\n value:\n success: true\n timestamp: 1789376644\n rates:\n XAU: 4306.06\n metadata:\n XAU:\n unit: T.oz\n quote: USD\n unresolved:\n ZW:\n message: Did you mean ZW-SPOT (Wheat Spot) or ZW-FUT (Wheat Futures)?\n suggestions:\n - ZW-SPOT\n - ZW-FUT\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad Request \u2014 Missing or invalid query parameters\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n missingSymbols:\n summary: Missing required symbols parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v2.0/commodity/rates/latest\n status: 400\n timestamp: '2026-09-14T08:43:43.964Z'\n invalidUpdates:\n summary: updates is not 10m or 1m\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v2.0/commodity/rates/latest\n status: 400\n timestamp: '2026-09-14T08:43:44.440Z'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '402':\n description: Payment Required \u2014 Maximum symbols per request exceeded\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityNotFoundError'\n examples:\n maxSymbolsExceeded:\n summary: Too many symbols requested\n value:\n timestamp: '2026-09-14T08:43:44.957Z'\n path: /rates/latestRates\n code: 402\n error: PAYMENT_REQUIRED\n message: Maximum symbols per request exceeded\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or quote currency not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityNotFoundError'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: '2026-09-14T08:43:44.957Z'\n path: /rates/latestRates\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n symbolNotFoundWithSuggestions:\n summary: Symbol Not Found, with close-match suggestions\n value:\n timestamp: '2026-09-14T09:04:04.878Z'\n path: /rates/latestRates\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n unresolved:\n ZW:\n message: Did you mean ZW-SPOT (Wheat Spot) or ZW-FUT (Wheat Futures)?\n suggestions:\n - ZW-SPOT\n - ZW-FUT\n quoteNotFound:\n summary: Quote Currency Not Found\n value:\n timestamp: '2026-09-14T08:43:45.461Z'\n path: /rates/latestRates\n code: 404\n error: QUOTE_NOT_FOUND\n message: The quote currency is invalid, please visit the documentation for a list of valid quote currencies\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n LiveCommodityPricesResponse:\n type: object\n required:\n - success\n - timestamp\n - rates\n - metadata\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n timestamp:\n type: integer\n description: Unix timestamp (seconds) indicating when the response was generated.\n rates:\n $ref: '#/components/schemas/CommodityRates'\n metadata:\n $ref: '#/components/schemas/CommodityMetadata'\n unresolved:\n type: object\n 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.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n warning:\n type: string\n description: Present only when currency conversion for the requested `quote` is temporarily unavailable; rates are returned in each commodity's default currency instead.\n description: Live commodity prices response containing success status, timestamp, rates, and metadata.\n CommodityRates:\n type: object\n description: Map of requested commodity symbols to their current live price. Each key is a commodity symbol (e.g. XAU); the value is the current price.\n additionalProperties:\n title: CommodityPrice\n type: number\n description: Current live price for this commodity symbol.\n CommodityMetadata:\n type: object\n description: Map of requested commodity symbols to their unit and quote currency metadata. Each key is a commodity symbol (e.g. XAU).\n additionalProperties:\n title: CommodityMetadataItem\n type: object\n description: Unit and currency metadata for a single commodity.\n required:\n - unit\n - quote\n properties:\n unit:\n type: string\n description: Unit of measurement for the commodity (e.g., Bbl, T.oz).\n quote:\n type: string\n description: Quote currency used for this commodity's price.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type.\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path that produced the error.\n status:\n type: integer\n description: HTTP status code returned with the error.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n CommodityNotFoundError:\n type: object\n 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.\n required:\n - code\n - error\n - message\n properties:\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n path:\n type: string\n description: Internal service path that produced the error.\n code:\n type: integer\n description: HTTP status code returned with the error.\n error:\n type: string\n description: Specific error type (e.g., SYMBOL_NOT_FOUND, QUOTE_NOT_FOUND).\n message:\n type: string\n description: Human-readable error message describing the failure.\n unresolved:\n type: object\n description: Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
|
|
50096
|
+
"commodity-symbols": "openapi: 3.1.1\ninfo:\n title: Commodity Symbols API Reference\n version: 2.0.0\n description: 'List all supported commodity symbols available in the APIFreaks Commodity API. Returns an array of commodity objects with symbol, name, category, pricing currency, unit of measurement, status, and update interval. Supports metals, energy, agriculture, industrial, raw materials, oils and meals, textiles, meats, poultry, and livestock categories across 245+ commodities. Deprecated symbols are included with `status: \"inactive\"` and a `deprecationDate`; historical rates remain available for them up to their deprecation date, but latest rates do not.'\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v2.0\n description: Commodity Symbols API Server\npaths:\n /commodity/symbols:\n get:\n tags:\n - Commodity APIs\n summary: Get all supported commodity symbols\n description: Returns the list of supported commodity symbols with metadata.\n operationId: getCommoditySymbols\n parameters:\n - name: format\n in: query\n required: false\n description: 'Response format. Accepted values: `json` (default) or `xml`.'\n schema:\n type: string\n enum:\n - json\n default: json\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommoditySymbolsResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n symbols:\n - symbol: XAU\n name: Gold\n category: Metals\n status: active\n updateInterval: PER_SECOND\n currency:\n code: USD\n name: US Dollar\n symbol: $\n unit:\n symbol: T.oz\n name: Troy Ounce\n - symbol: NG-FUT\n name: Natural Gas Futures\n category: Energy\n status: active\n updateInterval: PER_MINUTE\n currency:\n code: USD\n name: US Dollar\n symbol: $\n unit:\n symbol: MMBtu\n name: Million British Thermal Units\n - symbol: NG-EU\n name: Natural Gas, Europe\n category: Energy\n status: active\n updateInterval: PER_MONTH\n exchange: World Bank\n currency:\n code: USD\n name: US Dollar\n symbol: $\n unit:\n symbol: MMBtu\n name: Million British Thermal Units\n - symbol: UANEU\n name: Urea Ammonium Nitrate\n category: Industrial\n status: inactive\n updateInterval: PER_MINUTE\n deprecationDate: '2024-04-14'\n currency:\n code: USD\n name: US Dollar\n symbol: $\n unit:\n symbol: T\n name: Metric Ton\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n CommoditySymbolsResponse:\n type: object\n required:\n - success\n - symbols\n properties:\n success:\n type: boolean\n description: Indicates whether the API request was successful.\n symbols:\n type: array\n description: Array of commodity symbol objects with metadata.\n items:\n $ref: '#/components/schemas/CommoditySymbolItem'\n description: Commodity symbols response containing an array of supported commodity symbol objects.\n CommoditySymbolItem:\n type: object\n description: A single commodity symbol with metadata.\n required:\n - symbol\n - name\n - category\n - status\n - updateInterval\n - currency\n - unit\n properties:\n symbol:\n type: string\n description: Unique identifier/ticker symbol for the commodity (e.g., XAU, NG-FUT). Use this value in the `symbols` parameter of the rate endpoints.\n name:\n type: string\n description: Full name of the commodity (e.g., Gold, Natural Gas Futures).\n description:\n type: string\n description: Short description of the commodity. May be an empty string for some symbols.\n category:\n type: string\n description: Category the commodity belongs to (e.g., Metals, Energy, Agriculture, Industrial, Raw Materials, Oils and Meals, Textiles, Meats, Poultry, Livestock).\n status:\n type: string\n enum:\n - active\n - inactive\n 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`.'\n updateInterval:\n type: string\n enum:\n - PER_SECOND\n - PER_MINUTE\n - PER_10_MINUTES\n - PER_HOUR\n - PER_DAY\n - PER_WEEK\n - PER_MONTH\n description: Rate at which the price is updated.\n exchange:\n type: string\n description: Optional. Data source for the symbol (e.g., World Bank). Present only for some symbols.\n deprecationDate:\n type: string\n format: date\n description: Optional. Present only when `status` is `inactive`. Date the symbol was deprecated (YYYY-MM-DD).\n currency:\n $ref: '#/components/schemas/CommodityCurrency'\n unit:\n $ref: '#/components/schemas/CommodityUnit'\n CommodityCurrency:\n type: object\n description: Currency information for a commodity.\n required:\n - code\n - name\n - symbol\n properties:\n code:\n type: string\n description: ISO 4217 currency code.\n name:\n type: string\n description: Full name of the currency.\n symbol:\n type: string\n description: Symbol of the currency (e.g., $).\n CommodityUnit:\n type: object\n description: Unit of measurement for a commodity.\n required:\n - symbol\n - name\n properties:\n symbol:\n type: string\n description: Abbreviated unit symbol (e.g., T.oz, MMBtu).\n name:\n type: string\n description: Full name of the unit of measurement (e.g., Troy Ounce).\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
|
|
50097
|
+
"commodity-time-series": "openapi: 3.1.1\ninfo:\n title: Commodities Time Series API\n version: 2.0.0\n 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, and only closing rates are available for monthly-updated commodities. A symbol is considered resolved if it appears on at least one date in the range; if some requested symbols can't be resolved at all, a 206 Partial Content response is returned with an `unresolved` object. 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.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v2.0\n description: Commodity Time Series API Server\npaths:\n /commodity/time-series:\n get:\n tags:\n - Commodity APIs\n summary: Get commodity price time series\n description: Returns day-by-day OHLC data for the requested commodity symbols within a date range.\n operationId: getCommodityTimeSeries\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols.\n schema:\n type: string\n - name: startDate\n in: query\n required: true\n description: Start date in `YYYY-MM-DD` format.\n schema:\n type: string\n - name: endDate\n in: query\n required: true\n description: End date in `YYYY-MM-DD` format. Maximum range is 365 days.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityTimeSeriesResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n startDate: '2025-01-06'\n endDate: '2025-01-08'\n rates:\n '2025-01-06':\n XAU:\n open: 2649.01\n high: 2651.33\n low: 2645.36\n close: 2646.91\n '2025-01-07':\n XAU:\n open: 2662.45\n high: 2663.06\n low: 2655.66\n close: 2658.9\n '2025-01-08':\n XAU:\n open: 2669.69\n high: 2674.68\n low: 2668.58\n close: 2671.8\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '206':\n description: Partial Content \u2014 Some requested symbols could not be resolved\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityTimeSeriesResponse'\n examples:\n partial:\n summary: One valid symbol, one unresolved symbol\n value:\n success: true\n startDate: '2025-01-06'\n endDate: '2025-01-08'\n rates:\n '2025-01-06':\n XAU:\n open: 2649.01\n high: 2651.33\n low: 2645.36\n close: 2646.91\n '2025-01-07':\n XAU:\n open: 2662.45\n high: 2663.06\n low: 2655.66\n close: 2658.9\n '2025-01-08':\n XAU:\n open: 2669.69\n high: 2674.68\n low: 2668.58\n close: 2671.8\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad Request \u2014 Missing parameters, invalid dates, or date range exceeded\n content:\n application/json:\n examples:\n missingSymbols:\n summary: Missing required symbols parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v2.0/commodity/time-series\n status: 400\n timestamp: '2026-09-14T08:43:58.547Z'\n invalidDate:\n summary: Date does not exist on the calendar\n value:\n timestamp: '2026-07-27T11:38:41.234Z'\n path: /rates/time-series\n code: 400\n error: VALIDATION_ERROR\n message: 'Invalid Date: The provided start date or end date does not exist.'\n startAfterEnd:\n summary: startDate is after endDate\n value:\n timestamp: '2026-07-27T11:38:41.234Z'\n path: /rates/time-series\n code: 400\n error: VALIDATION_ERROR\n message: start date cannot be after end date\n dateRangeExceeded:\n summary: Date range exceeds 365 days\n value:\n timestamp: '2026-07-27T11:38:40.699Z'\n path: /rates/time-series\n code: 400\n error: VALIDATION_ERROR\n message: Date range exceeds the allowed limit.\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '402':\n description: Payment Required \u2014 Maximum symbols per request exceeded\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n maxSymbolsExceeded:\n summary: Too many symbols requested\n value:\n timestamp: '2026-09-14T08:44:00.586Z'\n path: /rates/time-series\n code: 402\n error: PAYMENT_REQUIRED\n message: Maximum symbols per request exceeded\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or data not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: '2026-09-14T08:44:00.586Z'\n path: /rates/time-series\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n dataNotFound:\n summary: No data available for the given date range\n value:\n timestamp: '2026-09-14T08:44:31.547Z'\n path: /rates/time-series\n code: 404\n error: DATA_NOT_FOUND\n message: No data found for the specified date range\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n CommodityTimeSeriesResponse:\n type: object\n required:\n - success\n - startDate\n - endDate\n - rates\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n startDate:\n type: string\n description: Start date of the time series (YYYY-MM-DD).\n endDate:\n type: string\n description: End date of the time series (YYYY-MM-DD).\n rates:\n $ref: '#/components/schemas/CommodityTimeSeriesRates'\n unresolved:\n type: object\n description: Present only on a 206 Partial Content response, when some requested symbols could not be resolved on any date in the range. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n description: Commodity time series response containing date-indexed OHLC data per symbol.\n CommodityTimeSeriesRates:\n type: object\n description: Map of trading dates to per-symbol OHLC data. Each key is a trading date (YYYY-MM-DD); non-trading days are excluded.\n additionalProperties:\n title: CommodityTimeSeriesSymbolData\n type: object\n description: Map of commodity symbols to their OHLC data for a single trading date. Each key is a commodity symbol (e.g. XAU).\n additionalProperties:\n $ref: '#/components/schemas/CommodityOhlc'\n CommodityOhlc:\n type: object\n description: OHLC price data for a single commodity on a single trading day.\n required:\n - open\n - high\n - low\n - close\n properties:\n open:\n type: number\n format: float\n description: Opening price on the given date.\n high:\n type: number\n format: float\n description: Highest price on the given date.\n low:\n type: number\n format: float\n description: Lowest price on the given date.\n close:\n type: number\n format: float\n description: Closing price on the given date.\n ErrorResponse:\n type: object\n 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 \u2014 check whichever is present.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, DATA_NOT_FOUND).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error.\n status:\n type: integer\n description: HTTP status code. Present on gateway-level errors.\n code:\n type: integer\n description: HTTP status code. Present on commodity-service errors instead of status.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n unresolved:\n type: object\n description: Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
|
|
50098
|
+
"historical-commodity-prices": "openapi: 3.1.1\ninfo:\n title: Historical Commodity Prices, Delivered Simply.\n version: 2.0.0\n 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.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v2.0\n description: Historical Commodity Prices API Server\npaths:\n /commodity/rates/historical:\n get:\n tags:\n - Commodity APIs\n summary: Get historical commodity prices\n description: Returns OHLC price data for the requested commodity symbols on a specific date.\n operationId: getHistoricalCommodityPrices\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols.\n schema:\n type: string\n - name: date\n in: query\n required: true\n description: Date in `YYYY-MM-DD` format. Data available from 1990 onwards.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/HistoricalCommodityPricesResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n date: '2025-01-10'\n rates:\n WTIOIL-SPOT:\n date: '2025-01-10'\n open: 73.77\n high: 77.16\n low: 73.55\n close: 75.97\n XAU:\n date: '2025-01-10'\n open: 2669.93\n high: 2697.85\n low: 2663.61\n close: 2689.44\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '206':\n description: Partial Content \u2014 Some requested symbols could not be resolved\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/HistoricalCommodityPricesResponse'\n examples:\n partial:\n summary: One valid symbol, one unresolved symbol\n value:\n success: true\n date: '2025-01-10'\n rates:\n XAU:\n date: '2025-01-10'\n open: 2669.93\n high: 2697.85\n low: 2663.61\n close: 2689.44\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad Request \u2014 Missing parameters or invalid date\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n missingSymbols:\n summary: Missing required symbols parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v2.0/commodity/rates/historical\n status: 400\n timestamp: '2026-09-14T08:44:32.013Z'\n invalidDateFormat:\n summary: Invalid date format\n value:\n timestamp: '2026-09-14T08:45:13.934Z'\n path: /rates/historical\n code: 400\n error: VALIDATION_ERROR\n message: Invalid Date Format (YYYY-MM-DD).\n dateNotExist:\n summary: Date does not exist\n value:\n timestamp: '2026-09-14T08:44:01.487Z'\n path: /rates/historical\n code: 400\n error: VALIDATION_ERROR\n message: 'Invalid Date: The provided date does not exist.'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '402':\n description: Payment Required \u2014 Maximum symbols per request exceeded\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n maxSymbolsExceeded:\n summary: Too many symbols requested\n value:\n timestamp: '2026-09-14T08:44:01.978Z'\n path: /rates/historical\n code: 402\n error: PAYMENT_REQUIRED\n message: Maximum symbols per request exceeded\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or rate not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: '2026-09-14T08:44:01.978Z'\n path: /rates/historical\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n rateNotFound:\n summary: Rate Not Found\n value:\n timestamp: '2026-09-14T08:44:02.528Z'\n path: /rates/historical\n code: 404\n error: RATE_NOT_FOUND\n message: no rates found for the specified date\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n HistoricalCommodityPricesResponse:\n type: object\n required:\n - success\n - date\n - rates\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n date:\n type: string\n description: Date for which prices were fetched (YYYY-MM-DD).\n rates:\n $ref: '#/components/schemas/HistoricalCommodityRates'\n unresolved:\n type: object\n 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.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n description: Historical commodity prices response containing success status, date, and OHLC rate data.\n HistoricalCommodityRates:\n type: object\n 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.\n properties:\n symbol:\n $ref: '#/components/schemas/HistoricalCommodityRate'\n required:\n - symbol\n HistoricalCommodityRate:\n type: object\n description: OHLC price data for a single commodity on a specific date.\n required:\n - date\n - open\n - high\n - low\n - close\n properties:\n date:\n type: string\n 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.\n open:\n type: number\n format: float\n description: Opening price on the given date.\n high:\n type: number\n format: float\n description: Highest price recorded on the given date.\n low:\n type: number\n format: float\n description: Lowest price recorded on the given date.\n close:\n type: number\n format: float\n description: Closing price on the given date.\n ErrorResponse:\n type: object\n 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 \u2014 check whichever is present.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, RATE_NOT_FOUND).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error.\n status:\n type: integer\n description: HTTP status code. Present on gateway-level errors.\n code:\n type: integer\n description: HTTP status code. Present on commodity-service errors instead of status.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n unresolved:\n type: object\n description: Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
|
|
49526
50099
|
"currency-converter": "openapi: 3.1.1\ninfo:\n title: Currency Converter API - Convert 970+ Fiat & Crypto Currencies at Live or Historical Rates\n version: 1.0.0\n description: Convert an amount from one currency to another using the latest exchange rates. Supports fiat, crypto, and metals. Specify source currency, target currency, and amount to receive the current rate and converted amount with timestamp. All parameters are case-insensitive for both fiat/currency codes and crypto/symbols.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v1.0\n description: Currency Converter API Server\npaths:\n /currency/converter/latest/prices:\n get:\n tags:\n - Currency APIs\n summary: Convert currency with latest rates\n description: Converts an amount from one currency to another using the latest exchange rates.\n operationId: convertLatest\n parameters:\n - name: format\n in: query\n required: false\n description: 'Response format: `json` (default) or `xml`.'\n schema:\n type: string\n enum:\n - json\n - xml\n default: json\n - name: from\n in: query\n required: true\n description: Source currency code.\n schema:\n type: string\n - name: to\n in: query\n required: true\n description: Target currency code.\n schema:\n type: string\n - name: amount\n in: query\n required: false\n description: Amount to convert, as a decimal. Defaults to `1`. Must be numeric \u2014 non-numeric values return a 400 (negative values are accepted despite the error message's wording).\n schema:\n type: string\n default: '1'\n - name: updates\n in: query\n required: false\n description: 'Update frequency: `1m` (default), `10m`, `1h`, or `1d`.'\n schema:\n type: string\n enum:\n - 1m\n - 10m\n - 1h\n - 1d\n default: 1m\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/LatestCurrencyConverterResponse'\n examples:\n success:\n summary: Successful response\n value:\n date: '2026-07-27 12:05:00+00'\n from: USD\n to: EUR\n rate: '0.87800'\n givenAmount: '100.0'\n convertedAmount: '87.800'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad request - Invalid amount or updates parameter\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n missingParams:\n summary: Missing required from/to parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v1.0/currency/converter/latest/prices\n status: 400\n timestamp: '2026-07-27T12:05:29.609Z'\n invalidAmount:\n summary: amount is not numeric\n value:\n timestamp: 1785153941995\n status: 400\n error: Method Argument Type Mismatch\n message: Invalid Amount. Please provide amount in decimal format and greater than 0!\n path: /v2.0/convert/latest\n invalidUpdates:\n summary: updates is not one of 1m/10m/1h/1d\n value:\n timestamp: 1785153942533\n status: 400\n error: Invalid Param Exception\n message: Please provide valid updates parameter (1d,1h,10m,1m)\n path: /v2.0/convert/latest\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Currency not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n invalidBase:\n summary: from currency not supported\n value:\n timestamp: 1785153930704\n status: 404\n error: Not Found Exception\n message: Rates of provided currency ZZZ are not available in our database!\n path: /v2.0/convert/latest\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n LatestCurrencyConverterResponse:\n type: object\n required:\n - date\n - from\n - to\n - rate\n - givenAmount\n - convertedAmount\n properties:\n date:\n type: string\n description: Date and time with timezone (UTC) when the rate was recorded.\n from:\n type: string\n description: Source currency code.\n to:\n type: string\n description: Target currency code.\n rate:\n type: string\n description: Conversion rate from source to target currency.\n givenAmount:\n type: string\n description: The amount provided for conversion.\n convertedAmount:\n type: string\n description: The converted amount in the target currency.\n description: Currency conversion response containing the exchange rate and converted amount.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests. Gateway-level validation errors use an ISO 8601 timestamp and the public endpoint path; currency-service errors use a Unix millisecond timestamp and an internal service path instead.\n required:\n - message\n properties:\n timestamp:\n type:\n - string\n - integer\n description: Timestamp when the error occurred \u2014 ISO 8601 string for gateway errors, Unix milliseconds integer for currency-service errors.\n status:\n type: integer\n description: HTTP status code returned with the error.\n error:\n type: string\n description: Specific error type (e.g., Invalid Param Exception, Method Argument Type Mismatch, Not Found Exception).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path (gateway errors) or internal service path (currency-service errors) that produced the error.\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
|
|
49527
50100
|
"currency-fluctuation": "openapi: 3.1.1\ninfo:\n title: Currency Fluctuation API - Get Currency Fluctuations Over a Time Period\n version: 1.0.0\n description: Get exchange rate fluctuation data between two dates for one or more currency pairs. Returns the start rate, end rate, absolute change, and percentage change for each requested symbol. Accepts a base currency (defaults to USD) and optional comma-separated target symbols. Returns a 400 error for invalid dates and a 404 error when no data is available for the interval.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v1.0\n description: Currency Fluctuation API Server\npaths:\n /currency/fluctuation:\n get:\n tags:\n - Currency APIs\n summary: Get exchange rate fluctuations\n description: Returns exchange rate fluctuations between two dates for the requested symbols.\n operationId: getFluctuation\n parameters:\n - name: format\n in: query\n required: false\n description: 'Response format: `json` (default) or `xml`.'\n schema:\n type: string\n enum:\n - json\n - xml\n default: json\n - name: startDate\n in: query\n required: true\n description: Start date in `YYYY-MM-DD` format.\n schema:\n type: string\n - name: endDate\n in: query\n required: false\n description: End date in `YYYY-MM-DD` format. Defaults to yesterday.\n schema:\n type: string\n - name: base\n in: query\n required: false\n description: Base currency code. Defaults to `USD`.\n schema:\n type: string\n default: USD\n - name: symbols\n in: query\n required: false\n description: Comma-separated currency codes. Omit to get all available rates.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CurrencyFluctuationResponse'\n examples:\n success:\n summary: Successful response\n value:\n startDate: '2025-01-01'\n endDate: '2025-01-10'\n base: USD\n rateFluctuations:\n EUR:\n startRate: '0.96605'\n endRate: '0.97620'\n change: '-0.010150'\n percentChange: '-1.05'\n PKR:\n startRate: '278.400'\n endRate: '278.650'\n change: '-0.25'\n percentChange: '-0.09'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad request - Invalid dates\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n missingStartDate:\n summary: Missing required startDate parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v1.0/currency/fluctuation\n status: 400\n timestamp: '2026-07-27T12:09:21.348Z'\n startAfterEnd:\n summary: startDate is after endDate or the current date\n value:\n timestamp: 1785154172736\n status: 400\n error: Invalid Param Exception\n message: Starting date cannot be after current date or ending date\n path: /v2.0/fluctuation\n invalidDateFormat:\n summary: startDate/endDate not in YYYY-MM-DD format\n value:\n timestamp: 1785154172225\n status: 400\n error: Invalid Param Exception\n message: Provided Dates are in Invalid Format. Dates must be in a valid format YYYY-MM-DD!\n path: /v2.0/fluctuation\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - No data for interval\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n noData:\n summary: base or symbols not supported for the given interval\n value:\n timestamp: 1785154173332\n status: 404\n error: Not Found Exception\n message: Rates of provided base and symbols are not found for given intervals.\n path: /v2.0/fluctuation\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n CurrencyFluctuationResponse:\n type: object\n required:\n - startDate\n - endDate\n - base\n - rateFluctuations\n properties:\n startDate:\n type: string\n description: Start date of the interval (YYYY-MM-DD).\n endDate:\n type: string\n description: End date of the interval (YYYY-MM-DD).\n base:\n type: string\n description: Base currency used for all fluctuations.\n rateFluctuations:\n type: object\n description: Map of currency codes to their fluctuation details. Each key is a currency code and the value contains startRate, endRate, change, and percentChange.\n additionalProperties:\n title: CurrencyFluctuationItem\n $ref: '#/components/schemas/CurrencyFluctuationItem'\n description: Currency fluctuation response containing rate changes per symbol over a date interval.\n CurrencyFluctuationItem:\n type: object\n description: Fluctuation metrics for a single currency over a date interval.\n required:\n - startRate\n - endRate\n - change\n - percentChange\n properties:\n startRate:\n type: string\n description: Rate of the currency at the start of the interval.\n endRate:\n type: string\n description: Rate of the currency at the end of the interval.\n change:\n type: string\n description: Absolute change between start and end rate. Can be positive or negative.\n percentChange:\n type: string\n description: Percentage change between start and end rate. Can be positive or negative.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests. Gateway-level validation errors use an ISO 8601 timestamp and the public endpoint path; currency-service errors use a Unix millisecond timestamp and an internal service path instead.\n required:\n - message\n properties:\n timestamp:\n type:\n - string\n - integer\n description: Timestamp when the error occurred \u2014 ISO 8601 string for gateway errors, Unix milliseconds integer for currency-service errors.\n status:\n type: integer\n description: HTTP status code returned with the error.\n error:\n type: string\n description: Specific error type (e.g., Invalid Param Exception, Not Found Exception).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path (gateway errors) or internal service path (currency-service errors) that produced the error.\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
|
|
49528
50101
|
"currency-historical-data-limit": "openapi: 3.1.1\ninfo:\n title: Currency Historical Data Limits API Reference\n version: 1.0.0\n description: Retrieve the date range for which historical exchange rate data is available for each supported currency. Returns a map of currency codes to their availability period in YYYY-MM-DD to YYYY-MM-DD format. Covers fiat currencies, cryptocurrencies, and precious metals.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v1.0\n description: Currency Historical Data Limits API Server\npaths:\n /currency/historical/data/limits:\n get:\n tags:\n - Currency APIs\n summary: Get historical data availability limits\n description: Returns the date range when historical data is available for each currency.\n operationId: getHistoricalDataLimits\n parameters:\n - name: format\n in: query\n required: false\n description: 'Response format: `json` (default) or `xml`.'\n schema:\n type: string\n enum:\n - json\n - xml\n default: json\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/HistoricalDataLimitsResponse'\n examples:\n success:\n summary: Successful response\n value:\n availabilityPeriod:\n FJD: 1989-08-18 to 2026-07-27\n SCR: 1998-07-31 to 2026-07-27\n STPT: 2025-02-27 to 2025-05-28\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '406':\n description: Unsupported Media Type \u2014 format is not json or xml\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n badFormat:\n summary: format value not supported\n value:\n error: Unsupported Media Type\n message: The media type specified in the request is not supported. For more details, please refer to the API documentation.\n path: /v1.0/currency/historical/data/limits\n status: 406\n timestamp: '2026-07-27T12:14:01.189Z'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n HistoricalDataLimitsResponse:\n type: object\n required:\n - availabilityPeriod\n properties:\n availabilityPeriod:\n type: object\n description: Map of currency codes to their historical data availability range. Each key is a currency code and the value is a date range string.\n additionalProperties:\n title: AvailabilityPeriodString\n type: string\n description: Historical data availability date range in YYYY-MM-DD to YYYY-MM-DD format.\n description: Historical data limits response containing the availability period map.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type.\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path that produced the error.\n status:\n type: integer\n description: HTTP status code returned with the error.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
|