@apifreaks/openapi-specs 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +706 -104
- package/dist/index.js +706 -104
- package/dist/specs/commodity/commodity-fluctuation.yaml +81 -7
- package/dist/specs/commodity/commodity-prices.yaml +122 -32
- package/dist/specs/commodity/commodity-symbols.yaml +54 -7
- package/dist/specs/commodity/commodity-time-series.yaml +123 -11
- package/dist/specs/commodity/historical-commodity-prices.yaml +128 -34
- 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 +167 -35
- package/specs/commodity/commodity-symbols.json +64 -7
- package/specs/commodity/commodity-time-series.json +174 -12
- package/specs/commodity/historical-commodity-prices.json +178 -37
package/dist/index.cjs
CHANGED
|
@@ -276,8 +276,8 @@ var commodity_fluctuation_default = {
|
|
|
276
276
|
openapi: "3.1.1",
|
|
277
277
|
info: {
|
|
278
278
|
title: "Commodity Fluctuation API ",
|
|
279
|
-
version: "
|
|
280
|
-
description: "
|
|
279
|
+
version: "2.0.0",
|
|
280
|
+
description: "Price change and percentage movement for one or more commodities over a custom date range, with no limit on range length. For monthly-updated commodities the range snaps to month boundaries. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.",
|
|
281
281
|
contact: {
|
|
282
282
|
name: "APIFreaks Support",
|
|
283
283
|
url: "https://apifreaks.com/contact",
|
|
@@ -286,7 +286,7 @@ var commodity_fluctuation_default = {
|
|
|
286
286
|
},
|
|
287
287
|
servers: [
|
|
288
288
|
{
|
|
289
|
-
url: "https://api.apifreaks.com/
|
|
289
|
+
url: "https://api.apifreaks.com/v2.0",
|
|
290
290
|
description: "Commodity Fluctuation API Server"
|
|
291
291
|
}
|
|
292
292
|
],
|
|
@@ -377,6 +377,44 @@ var commodity_fluctuation_default = {
|
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
379
|
},
|
|
380
|
+
"206": {
|
|
381
|
+
description: "Partial Content \u2014 Some requested symbols could not be resolved",
|
|
382
|
+
content: {
|
|
383
|
+
"application/json": {
|
|
384
|
+
schema: {
|
|
385
|
+
$ref: "#/components/schemas/CommodityFluctuationResponse"
|
|
386
|
+
},
|
|
387
|
+
examples: {
|
|
388
|
+
partial: {
|
|
389
|
+
summary: "One valid symbol, one unresolved symbol",
|
|
390
|
+
value: {
|
|
391
|
+
success: true,
|
|
392
|
+
startDate: "2024-01-01",
|
|
393
|
+
endDate: "2024-01-31",
|
|
394
|
+
rates: {
|
|
395
|
+
XAU: {
|
|
396
|
+
startRate: 2063.63,
|
|
397
|
+
endRate: 2039.83,
|
|
398
|
+
change: -23.8,
|
|
399
|
+
changePercent: -1.15
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
unresolved: {
|
|
403
|
+
FAKESYM: {
|
|
404
|
+
message: "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
headers: {
|
|
413
|
+
"X-AF-Credits-Cost": {
|
|
414
|
+
$ref: "#/components/headers/X-AF-Credits-Cost"
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
},
|
|
380
418
|
"400": {
|
|
381
419
|
description: "Bad Request \u2014 Missing parameters or invalid dates",
|
|
382
420
|
content: {
|
|
@@ -387,9 +425,9 @@ var commodity_fluctuation_default = {
|
|
|
387
425
|
value: {
|
|
388
426
|
error: "Invalid Param Exception",
|
|
389
427
|
message: "please pass correct parameters",
|
|
390
|
-
path: "/
|
|
428
|
+
path: "/v2.0/commodity/fluctuation",
|
|
391
429
|
status: 400,
|
|
392
|
-
timestamp: "2026-
|
|
430
|
+
timestamp: "2026-09-14T08:43:46.481Z"
|
|
393
431
|
}
|
|
394
432
|
},
|
|
395
433
|
invalidDateFormat: {
|
|
@@ -434,6 +472,33 @@ var commodity_fluctuation_default = {
|
|
|
434
472
|
}
|
|
435
473
|
}
|
|
436
474
|
},
|
|
475
|
+
"402": {
|
|
476
|
+
description: "Payment Required \u2014 Maximum symbols per request exceeded",
|
|
477
|
+
content: {
|
|
478
|
+
"application/json": {
|
|
479
|
+
schema: {
|
|
480
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
481
|
+
},
|
|
482
|
+
examples: {
|
|
483
|
+
maxSymbolsExceeded: {
|
|
484
|
+
summary: "Too many symbols requested",
|
|
485
|
+
value: {
|
|
486
|
+
timestamp: "2026-09-14T08:43:48.408Z",
|
|
487
|
+
path: "/rates/fluctuation",
|
|
488
|
+
code: 402,
|
|
489
|
+
error: "PAYMENT_REQUIRED",
|
|
490
|
+
message: "Maximum symbols per request exceeded"
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
},
|
|
496
|
+
headers: {
|
|
497
|
+
"X-AF-Credits-Cost": {
|
|
498
|
+
$ref: "#/components/headers/X-AF-Credits-Cost"
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
},
|
|
437
502
|
"404": {
|
|
438
503
|
description: "Not found - Symbol or data not available",
|
|
439
504
|
content: {
|
|
@@ -445,17 +510,22 @@ var commodity_fluctuation_default = {
|
|
|
445
510
|
symbolNotFound: {
|
|
446
511
|
summary: "Symbol Not Found",
|
|
447
512
|
value: {
|
|
448
|
-
timestamp: "2026-
|
|
513
|
+
timestamp: "2026-09-14T08:43:48.408Z",
|
|
449
514
|
path: "/rates/fluctuation",
|
|
450
515
|
code: 404,
|
|
451
516
|
error: "SYMBOL_NOT_FOUND",
|
|
452
|
-
message: "The symbol is not supported, please visit the documentation for a list of supported symbols"
|
|
517
|
+
message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
|
|
518
|
+
unresolved: {
|
|
519
|
+
FAKESYM: {
|
|
520
|
+
message: "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
521
|
+
}
|
|
522
|
+
}
|
|
453
523
|
}
|
|
454
524
|
},
|
|
455
525
|
noData: {
|
|
456
526
|
summary: "No data available for the given date range",
|
|
457
527
|
value: {
|
|
458
|
-
timestamp: "2026-
|
|
528
|
+
timestamp: "2026-09-14T08:44:31.022Z",
|
|
459
529
|
path: "/rates/fluctuation",
|
|
460
530
|
code: 404,
|
|
461
531
|
error: "DATA_NOT_FOUND",
|
|
@@ -509,6 +579,26 @@ var commodity_fluctuation_default = {
|
|
|
509
579
|
},
|
|
510
580
|
rates: {
|
|
511
581
|
$ref: "#/components/schemas/CommodityFluctuationRates"
|
|
582
|
+
},
|
|
583
|
+
unresolved: {
|
|
584
|
+
type: "object",
|
|
585
|
+
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.",
|
|
586
|
+
additionalProperties: {
|
|
587
|
+
type: "object",
|
|
588
|
+
properties: {
|
|
589
|
+
message: {
|
|
590
|
+
type: "string",
|
|
591
|
+
description: "Detail message explaining why this symbol was not resolved."
|
|
592
|
+
},
|
|
593
|
+
suggestions: {
|
|
594
|
+
type: "array",
|
|
595
|
+
description: "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
596
|
+
items: {
|
|
597
|
+
type: "string"
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}
|
|
512
602
|
}
|
|
513
603
|
},
|
|
514
604
|
description: "Commodity fluctuation response containing price change data per symbol over a date range."
|
|
@@ -574,6 +664,26 @@ var commodity_fluctuation_default = {
|
|
|
574
664
|
type: "string",
|
|
575
665
|
format: "date-time",
|
|
576
666
|
description: "Timestamp when the error occurred (ISO 8601)."
|
|
667
|
+
},
|
|
668
|
+
unresolved: {
|
|
669
|
+
type: "object",
|
|
670
|
+
description: "Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
|
|
671
|
+
additionalProperties: {
|
|
672
|
+
type: "object",
|
|
673
|
+
properties: {
|
|
674
|
+
message: {
|
|
675
|
+
type: "string",
|
|
676
|
+
description: "Detail message explaining why this symbol was not resolved."
|
|
677
|
+
},
|
|
678
|
+
suggestions: {
|
|
679
|
+
type: "array",
|
|
680
|
+
description: "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
681
|
+
items: {
|
|
682
|
+
type: "string"
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
}
|
|
577
687
|
}
|
|
578
688
|
}
|
|
579
689
|
}
|
|
@@ -602,8 +712,8 @@ var commodity_prices_default = {
|
|
|
602
712
|
openapi: "3.1.1",
|
|
603
713
|
info: {
|
|
604
714
|
title: "Live Commodity Prices API - Real Time Market Insights",
|
|
605
|
-
version: "
|
|
606
|
-
description: "
|
|
715
|
+
version: "2.0.0",
|
|
716
|
+
description: "Real-time prices for 245+ commodities in a single request, updated on a rolling ~10 minute cadence. Optionally convert prices into a target quote currency. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.",
|
|
607
717
|
contact: {
|
|
608
718
|
name: "APIFreaks Support",
|
|
609
719
|
url: "https://apifreaks.com/contact",
|
|
@@ -612,7 +722,7 @@ var commodity_prices_default = {
|
|
|
612
722
|
},
|
|
613
723
|
servers: [
|
|
614
724
|
{
|
|
615
|
-
url: "https://api.apifreaks.com/
|
|
725
|
+
url: "https://api.apifreaks.com/v2.0",
|
|
616
726
|
description: "Live Commodity Prices API Server"
|
|
617
727
|
}
|
|
618
728
|
],
|
|
@@ -644,17 +754,6 @@ var commodity_prices_default = {
|
|
|
644
754
|
type: "string"
|
|
645
755
|
}
|
|
646
756
|
},
|
|
647
|
-
{
|
|
648
|
-
name: "updates",
|
|
649
|
-
in: "query",
|
|
650
|
-
required: true,
|
|
651
|
-
description: "Update frequency. Accepted values: `1m` (default), `10m`.",
|
|
652
|
-
schema: {
|
|
653
|
-
type: "string",
|
|
654
|
-
enum: ["1m", "10m"],
|
|
655
|
-
default: "1m"
|
|
656
|
-
}
|
|
657
|
-
},
|
|
658
757
|
{
|
|
659
758
|
name: "quote",
|
|
660
759
|
in: "query",
|
|
@@ -678,10 +777,10 @@ var commodity_prices_default = {
|
|
|
678
777
|
summary: "Successful response",
|
|
679
778
|
value: {
|
|
680
779
|
success: true,
|
|
681
|
-
timestamp:
|
|
780
|
+
timestamp: 1789375397,
|
|
682
781
|
rates: {
|
|
683
|
-
XAU:
|
|
684
|
-
"WTIOIL-SPOT":
|
|
782
|
+
XAU: 4313.04,
|
|
783
|
+
"WTIOIL-SPOT": 100
|
|
685
784
|
},
|
|
686
785
|
metadata: {
|
|
687
786
|
XAU: {
|
|
@@ -699,9 +798,9 @@ var commodity_prices_default = {
|
|
|
699
798
|
summary: "Price converted to a target quote currency",
|
|
700
799
|
value: {
|
|
701
800
|
success: true,
|
|
702
|
-
timestamp:
|
|
801
|
+
timestamp: 1789375426,
|
|
703
802
|
rates: {
|
|
704
|
-
XAU:
|
|
803
|
+
XAU: 3739.023
|
|
705
804
|
},
|
|
706
805
|
metadata: {
|
|
707
806
|
XAU: {
|
|
@@ -720,6 +819,66 @@ var commodity_prices_default = {
|
|
|
720
819
|
}
|
|
721
820
|
}
|
|
722
821
|
},
|
|
822
|
+
"206": {
|
|
823
|
+
description: "Partial Content \u2014 Some requested symbols could not be resolved",
|
|
824
|
+
content: {
|
|
825
|
+
"application/json": {
|
|
826
|
+
schema: {
|
|
827
|
+
$ref: "#/components/schemas/LiveCommodityPricesResponse"
|
|
828
|
+
},
|
|
829
|
+
examples: {
|
|
830
|
+
partial: {
|
|
831
|
+
summary: "One valid symbol, one unresolved symbol",
|
|
832
|
+
value: {
|
|
833
|
+
success: true,
|
|
834
|
+
timestamp: 1789376193,
|
|
835
|
+
rates: {
|
|
836
|
+
XAU: 4311.88
|
|
837
|
+
},
|
|
838
|
+
metadata: {
|
|
839
|
+
XAU: {
|
|
840
|
+
unit: "T.oz",
|
|
841
|
+
quote: "USD"
|
|
842
|
+
}
|
|
843
|
+
},
|
|
844
|
+
unresolved: {
|
|
845
|
+
FAKESYM: {
|
|
846
|
+
message: "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
},
|
|
851
|
+
partialWithSuggestions: {
|
|
852
|
+
summary: "Unresolved symbol with close-match suggestions",
|
|
853
|
+
value: {
|
|
854
|
+
success: true,
|
|
855
|
+
timestamp: 1789376644,
|
|
856
|
+
rates: {
|
|
857
|
+
XAU: 4306.06
|
|
858
|
+
},
|
|
859
|
+
metadata: {
|
|
860
|
+
XAU: {
|
|
861
|
+
unit: "T.oz",
|
|
862
|
+
quote: "USD"
|
|
863
|
+
}
|
|
864
|
+
},
|
|
865
|
+
unresolved: {
|
|
866
|
+
ZW: {
|
|
867
|
+
message: "Did you mean ZW-SPOT (Wheat Spot) or ZW-FUT (Wheat Futures)?",
|
|
868
|
+
suggestions: ["ZW-SPOT", "ZW-FUT"]
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
},
|
|
876
|
+
headers: {
|
|
877
|
+
"X-AF-Credits-Cost": {
|
|
878
|
+
$ref: "#/components/headers/X-AF-Credits-Cost"
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
},
|
|
723
882
|
"400": {
|
|
724
883
|
description: "Bad Request \u2014 Missing or invalid query parameters",
|
|
725
884
|
content: {
|
|
@@ -733,19 +892,36 @@ var commodity_prices_default = {
|
|
|
733
892
|
value: {
|
|
734
893
|
error: "Invalid Param Exception",
|
|
735
894
|
message: "please pass correct parameters",
|
|
736
|
-
path: "/
|
|
895
|
+
path: "/v2.0/commodity/rates/latest",
|
|
737
896
|
status: 400,
|
|
738
|
-
timestamp: "2026-
|
|
897
|
+
timestamp: "2026-09-14T08:43:43.964Z"
|
|
739
898
|
}
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
headers: {
|
|
904
|
+
"X-AF-Credits-Cost": {
|
|
905
|
+
$ref: "#/components/headers/X-AF-Credits-Cost"
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
},
|
|
909
|
+
"402": {
|
|
910
|
+
description: "Payment Required \u2014 Maximum symbols per request exceeded",
|
|
911
|
+
content: {
|
|
912
|
+
"application/json": {
|
|
913
|
+
schema: {
|
|
914
|
+
$ref: "#/components/schemas/CommodityNotFoundError"
|
|
915
|
+
},
|
|
916
|
+
examples: {
|
|
917
|
+
maxSymbolsExceeded: {
|
|
918
|
+
summary: "Too many symbols requested",
|
|
743
919
|
value: {
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
920
|
+
timestamp: "2026-09-14T08:43:44.957Z",
|
|
921
|
+
path: "/rates/latestRates",
|
|
922
|
+
code: 402,
|
|
923
|
+
error: "PAYMENT_REQUIRED",
|
|
924
|
+
message: "Maximum symbols per request exceeded"
|
|
749
925
|
}
|
|
750
926
|
}
|
|
751
927
|
}
|
|
@@ -768,17 +944,38 @@ var commodity_prices_default = {
|
|
|
768
944
|
symbolNotFound: {
|
|
769
945
|
summary: "Symbol Not Found",
|
|
770
946
|
value: {
|
|
771
|
-
timestamp:
|
|
947
|
+
timestamp: "2026-09-14T08:43:44.957Z",
|
|
772
948
|
path: "/rates/latestRates",
|
|
773
949
|
code: 404,
|
|
774
950
|
error: "SYMBOL_NOT_FOUND",
|
|
775
|
-
message: "The symbol is not supported, please visit the documentation for a list of supported symbols"
|
|
951
|
+
message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
|
|
952
|
+
unresolved: {
|
|
953
|
+
FAKESYM: {
|
|
954
|
+
message: "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
},
|
|
959
|
+
symbolNotFoundWithSuggestions: {
|
|
960
|
+
summary: "Symbol Not Found, with close-match suggestions",
|
|
961
|
+
value: {
|
|
962
|
+
timestamp: "2026-09-14T09:04:04.878Z",
|
|
963
|
+
path: "/rates/latestRates",
|
|
964
|
+
code: 404,
|
|
965
|
+
error: "SYMBOL_NOT_FOUND",
|
|
966
|
+
message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
|
|
967
|
+
unresolved: {
|
|
968
|
+
ZW: {
|
|
969
|
+
message: "Did you mean ZW-SPOT (Wheat Spot) or ZW-FUT (Wheat Futures)?",
|
|
970
|
+
suggestions: ["ZW-SPOT", "ZW-FUT"]
|
|
971
|
+
}
|
|
972
|
+
}
|
|
776
973
|
}
|
|
777
974
|
},
|
|
778
975
|
quoteNotFound: {
|
|
779
976
|
summary: "Quote Currency Not Found",
|
|
780
977
|
value: {
|
|
781
|
-
timestamp:
|
|
978
|
+
timestamp: "2026-09-14T08:43:45.461Z",
|
|
782
979
|
path: "/rates/latestRates",
|
|
783
980
|
code: 404,
|
|
784
981
|
error: "QUOTE_NOT_FOUND",
|
|
@@ -831,6 +1028,30 @@ var commodity_prices_default = {
|
|
|
831
1028
|
},
|
|
832
1029
|
metadata: {
|
|
833
1030
|
$ref: "#/components/schemas/CommodityMetadata"
|
|
1031
|
+
},
|
|
1032
|
+
unresolved: {
|
|
1033
|
+
type: "object",
|
|
1034
|
+
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.",
|
|
1035
|
+
additionalProperties: {
|
|
1036
|
+
type: "object",
|
|
1037
|
+
properties: {
|
|
1038
|
+
message: {
|
|
1039
|
+
type: "string",
|
|
1040
|
+
description: "Detail message explaining why this symbol was not resolved."
|
|
1041
|
+
},
|
|
1042
|
+
suggestions: {
|
|
1043
|
+
type: "array",
|
|
1044
|
+
description: "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
1045
|
+
items: {
|
|
1046
|
+
type: "string"
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
},
|
|
1052
|
+
warning: {
|
|
1053
|
+
type: "string",
|
|
1054
|
+
description: "Present only when currency conversion for the requested `quote` is temporarily unavailable; rates are returned in each commodity's default currency instead."
|
|
834
1055
|
}
|
|
835
1056
|
},
|
|
836
1057
|
description: "Live commodity prices response containing success status, timestamp, rates, and metadata."
|
|
@@ -894,12 +1115,13 @@ var commodity_prices_default = {
|
|
|
894
1115
|
},
|
|
895
1116
|
CommodityNotFoundError: {
|
|
896
1117
|
type: "object",
|
|
897
|
-
description: "Error envelope returned by the commodity pricing service specifically for unresolvable symbol/quote errors. Uses `code` instead of `status` and
|
|
1118
|
+
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.",
|
|
898
1119
|
required: ["code", "error", "message"],
|
|
899
1120
|
properties: {
|
|
900
1121
|
timestamp: {
|
|
901
|
-
type: "
|
|
902
|
-
|
|
1122
|
+
type: "string",
|
|
1123
|
+
format: "date-time",
|
|
1124
|
+
description: "Timestamp when the error occurred (ISO 8601)."
|
|
903
1125
|
},
|
|
904
1126
|
path: {
|
|
905
1127
|
type: "string",
|
|
@@ -916,6 +1138,26 @@ var commodity_prices_default = {
|
|
|
916
1138
|
message: {
|
|
917
1139
|
type: "string",
|
|
918
1140
|
description: "Human-readable error message describing the failure."
|
|
1141
|
+
},
|
|
1142
|
+
unresolved: {
|
|
1143
|
+
type: "object",
|
|
1144
|
+
description: "Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
|
|
1145
|
+
additionalProperties: {
|
|
1146
|
+
type: "object",
|
|
1147
|
+
properties: {
|
|
1148
|
+
message: {
|
|
1149
|
+
type: "string",
|
|
1150
|
+
description: "Detail message explaining why this symbol was not resolved."
|
|
1151
|
+
},
|
|
1152
|
+
suggestions: {
|
|
1153
|
+
type: "array",
|
|
1154
|
+
description: "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
1155
|
+
items: {
|
|
1156
|
+
type: "string"
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
919
1161
|
}
|
|
920
1162
|
}
|
|
921
1163
|
}
|
|
@@ -944,8 +1186,8 @@ var commodity_symbols_default = {
|
|
|
944
1186
|
openapi: "3.1.1",
|
|
945
1187
|
info: {
|
|
946
1188
|
title: "Commodity Symbols API Reference",
|
|
947
|
-
version: "
|
|
948
|
-
description:
|
|
1189
|
+
version: "2.0.0",
|
|
1190
|
+
description: 'Full catalog of 245+ supported commodities across Metals, Energy, Agriculture, Industrial, Raw Materials, Oils and Meals, Textiles, Meats, Poultry, and Livestock, with pricing currency, unit, and update interval per symbol. Deprecated symbols stay listed with `status: "inactive"` and a `deprecationDate`.',
|
|
949
1191
|
contact: {
|
|
950
1192
|
name: "APIFreaks Support",
|
|
951
1193
|
url: "https://apifreaks.com/contact",
|
|
@@ -954,7 +1196,7 @@ var commodity_symbols_default = {
|
|
|
954
1196
|
},
|
|
955
1197
|
servers: [
|
|
956
1198
|
{
|
|
957
|
-
url: "https://api.apifreaks.com/
|
|
1199
|
+
url: "https://api.apifreaks.com/v2.0",
|
|
958
1200
|
description: "Commodity Symbols API Server"
|
|
959
1201
|
}
|
|
960
1202
|
],
|
|
@@ -1023,6 +1265,40 @@ var commodity_symbols_default = {
|
|
|
1023
1265
|
symbol: "MMBtu",
|
|
1024
1266
|
name: "Million British Thermal Units"
|
|
1025
1267
|
}
|
|
1268
|
+
},
|
|
1269
|
+
{
|
|
1270
|
+
symbol: "NG-EU",
|
|
1271
|
+
name: "Natural Gas, Europe",
|
|
1272
|
+
category: "Energy",
|
|
1273
|
+
status: "active",
|
|
1274
|
+
updateInterval: "PER_MONTH",
|
|
1275
|
+
exchange: "World Bank",
|
|
1276
|
+
currency: {
|
|
1277
|
+
code: "USD",
|
|
1278
|
+
name: "US Dollar",
|
|
1279
|
+
symbol: "$"
|
|
1280
|
+
},
|
|
1281
|
+
unit: {
|
|
1282
|
+
symbol: "MMBtu",
|
|
1283
|
+
name: "Million British Thermal Units"
|
|
1284
|
+
}
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
symbol: "UANEU",
|
|
1288
|
+
name: "Urea Ammonium Nitrate",
|
|
1289
|
+
category: "Industrial",
|
|
1290
|
+
status: "inactive",
|
|
1291
|
+
updateInterval: "PER_MINUTE",
|
|
1292
|
+
deprecationDate: "2024-04-14",
|
|
1293
|
+
currency: {
|
|
1294
|
+
code: "USD",
|
|
1295
|
+
name: "US Dollar",
|
|
1296
|
+
symbol: "$"
|
|
1297
|
+
},
|
|
1298
|
+
unit: {
|
|
1299
|
+
symbol: "T",
|
|
1300
|
+
name: "Metric Ton"
|
|
1301
|
+
}
|
|
1026
1302
|
}
|
|
1027
1303
|
]
|
|
1028
1304
|
}
|
|
@@ -1089,23 +1365,46 @@ var commodity_symbols_default = {
|
|
|
1089
1365
|
properties: {
|
|
1090
1366
|
symbol: {
|
|
1091
1367
|
type: "string",
|
|
1092
|
-
description: "Unique identifier/ticker symbol for the commodity (e.g., XAU, NG-FUT)."
|
|
1368
|
+
description: "Unique identifier/ticker symbol for the commodity (e.g., XAU, NG-FUT). Use this value in the `symbols` parameter of the rate endpoints."
|
|
1093
1369
|
},
|
|
1094
1370
|
name: {
|
|
1095
1371
|
type: "string",
|
|
1096
1372
|
description: "Full name of the commodity (e.g., Gold, Natural Gas Futures)."
|
|
1097
1373
|
},
|
|
1374
|
+
description: {
|
|
1375
|
+
type: "string",
|
|
1376
|
+
description: "Short description of the commodity. May be an empty string for some symbols."
|
|
1377
|
+
},
|
|
1098
1378
|
category: {
|
|
1099
1379
|
type: "string",
|
|
1100
|
-
description: "Category the commodity belongs to (e.g., Metals, Energy)."
|
|
1380
|
+
description: "Category the commodity belongs to (e.g., Metals, Energy, Agriculture, Industrial, Raw Materials, Oils and Meals, Textiles, Meats, Poultry, Livestock)."
|
|
1101
1381
|
},
|
|
1102
1382
|
status: {
|
|
1103
1383
|
type: "string",
|
|
1104
|
-
|
|
1384
|
+
enum: ["active", "inactive"],
|
|
1385
|
+
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`."
|
|
1105
1386
|
},
|
|
1106
1387
|
updateInterval: {
|
|
1107
1388
|
type: "string",
|
|
1108
|
-
|
|
1389
|
+
enum: [
|
|
1390
|
+
"PER_SECOND",
|
|
1391
|
+
"PER_MINUTE",
|
|
1392
|
+
"PER_10_MINUTES",
|
|
1393
|
+
"PER_HOUR",
|
|
1394
|
+
"PER_DAY",
|
|
1395
|
+
"PER_WEEK",
|
|
1396
|
+
"PER_MONTH"
|
|
1397
|
+
],
|
|
1398
|
+
description: "Rate at which the price is updated."
|
|
1399
|
+
},
|
|
1400
|
+
exchange: {
|
|
1401
|
+
type: "string",
|
|
1402
|
+
description: "Optional. Data source for the symbol (e.g., World Bank). Present only for some symbols."
|
|
1403
|
+
},
|
|
1404
|
+
deprecationDate: {
|
|
1405
|
+
type: "string",
|
|
1406
|
+
format: "date",
|
|
1407
|
+
description: "Optional. Present only when `status` is `inactive`. Date the symbol was deprecated (YYYY-MM-DD)."
|
|
1109
1408
|
},
|
|
1110
1409
|
currency: {
|
|
1111
1410
|
$ref: "#/components/schemas/CommodityCurrency"
|
|
@@ -1174,8 +1473,8 @@ var commodity_time_series_default = {
|
|
|
1174
1473
|
openapi: "3.1.1",
|
|
1175
1474
|
info: {
|
|
1176
1475
|
title: "Commodities Time Series API",
|
|
1177
|
-
version: "
|
|
1178
|
-
description: "
|
|
1476
|
+
version: "2.0.0",
|
|
1477
|
+
description: "Daily OHLC history for one or more commodities over a date range of up to 365 days, indexed by date. Non-trading days are excluded. Monthly-updated commodities only have a closing price \u2014 `open`, `high`, and `low` come back as `0`. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.",
|
|
1179
1478
|
contact: {
|
|
1180
1479
|
name: "APIFreaks Support",
|
|
1181
1480
|
url: "https://apifreaks.com/contact",
|
|
@@ -1184,7 +1483,7 @@ var commodity_time_series_default = {
|
|
|
1184
1483
|
},
|
|
1185
1484
|
servers: [
|
|
1186
1485
|
{
|
|
1187
|
-
url: "https://api.apifreaks.com/
|
|
1486
|
+
url: "https://api.apifreaks.com/v2.0",
|
|
1188
1487
|
description: "Commodity Time Series API Server"
|
|
1189
1488
|
}
|
|
1190
1489
|
],
|
|
@@ -1277,6 +1576,96 @@ var commodity_time_series_default = {
|
|
|
1277
1576
|
}
|
|
1278
1577
|
}
|
|
1279
1578
|
}
|
|
1579
|
+
},
|
|
1580
|
+
monthlyCommodity: {
|
|
1581
|
+
summary: "Monthly-updated commodity (open/high/low unavailable)",
|
|
1582
|
+
value: {
|
|
1583
|
+
success: true,
|
|
1584
|
+
startDate: "2025-01-01",
|
|
1585
|
+
endDate: "2025-03-01",
|
|
1586
|
+
rates: {
|
|
1587
|
+
"2025-01-01": {
|
|
1588
|
+
"NG-EU": {
|
|
1589
|
+
open: 0,
|
|
1590
|
+
high: 0,
|
|
1591
|
+
low: 0,
|
|
1592
|
+
close: 14.66
|
|
1593
|
+
}
|
|
1594
|
+
},
|
|
1595
|
+
"2025-02-01": {
|
|
1596
|
+
"NG-EU": {
|
|
1597
|
+
open: 0,
|
|
1598
|
+
high: 0,
|
|
1599
|
+
low: 0,
|
|
1600
|
+
close: 15.34
|
|
1601
|
+
}
|
|
1602
|
+
},
|
|
1603
|
+
"2025-03-01": {
|
|
1604
|
+
"NG-EU": {
|
|
1605
|
+
open: 0,
|
|
1606
|
+
high: 0,
|
|
1607
|
+
low: 0,
|
|
1608
|
+
close: 13.24
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
},
|
|
1617
|
+
headers: {
|
|
1618
|
+
"X-AF-Credits-Cost": {
|
|
1619
|
+
$ref: "#/components/headers/X-AF-Credits-Cost"
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
},
|
|
1623
|
+
"206": {
|
|
1624
|
+
description: "Partial Content \u2014 Some requested symbols could not be resolved",
|
|
1625
|
+
content: {
|
|
1626
|
+
"application/json": {
|
|
1627
|
+
schema: {
|
|
1628
|
+
$ref: "#/components/schemas/CommodityTimeSeriesResponse"
|
|
1629
|
+
},
|
|
1630
|
+
examples: {
|
|
1631
|
+
partial: {
|
|
1632
|
+
summary: "One valid symbol, one unresolved symbol",
|
|
1633
|
+
value: {
|
|
1634
|
+
success: true,
|
|
1635
|
+
startDate: "2025-01-06",
|
|
1636
|
+
endDate: "2025-01-08",
|
|
1637
|
+
rates: {
|
|
1638
|
+
"2025-01-06": {
|
|
1639
|
+
XAU: {
|
|
1640
|
+
open: 2649.01,
|
|
1641
|
+
high: 2651.33,
|
|
1642
|
+
low: 2645.36,
|
|
1643
|
+
close: 2646.91
|
|
1644
|
+
}
|
|
1645
|
+
},
|
|
1646
|
+
"2025-01-07": {
|
|
1647
|
+
XAU: {
|
|
1648
|
+
open: 2662.45,
|
|
1649
|
+
high: 2663.06,
|
|
1650
|
+
low: 2655.66,
|
|
1651
|
+
close: 2658.9
|
|
1652
|
+
}
|
|
1653
|
+
},
|
|
1654
|
+
"2025-01-08": {
|
|
1655
|
+
XAU: {
|
|
1656
|
+
open: 2669.69,
|
|
1657
|
+
high: 2674.68,
|
|
1658
|
+
low: 2668.58,
|
|
1659
|
+
close: 2671.8
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
},
|
|
1663
|
+
unresolved: {
|
|
1664
|
+
FAKESYM: {
|
|
1665
|
+
message: "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1280
1669
|
}
|
|
1281
1670
|
}
|
|
1282
1671
|
}
|
|
@@ -1297,9 +1686,9 @@ var commodity_time_series_default = {
|
|
|
1297
1686
|
value: {
|
|
1298
1687
|
error: "Invalid Param Exception",
|
|
1299
1688
|
message: "please pass correct parameters",
|
|
1300
|
-
path: "/
|
|
1689
|
+
path: "/v2.0/commodity/time-series",
|
|
1301
1690
|
status: 400,
|
|
1302
|
-
timestamp: "2026-
|
|
1691
|
+
timestamp: "2026-09-14T08:43:58.547Z"
|
|
1303
1692
|
}
|
|
1304
1693
|
},
|
|
1305
1694
|
invalidDate: {
|
|
@@ -1344,6 +1733,33 @@ var commodity_time_series_default = {
|
|
|
1344
1733
|
}
|
|
1345
1734
|
}
|
|
1346
1735
|
},
|
|
1736
|
+
"402": {
|
|
1737
|
+
description: "Payment Required \u2014 Maximum symbols per request exceeded",
|
|
1738
|
+
content: {
|
|
1739
|
+
"application/json": {
|
|
1740
|
+
schema: {
|
|
1741
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1742
|
+
},
|
|
1743
|
+
examples: {
|
|
1744
|
+
maxSymbolsExceeded: {
|
|
1745
|
+
summary: "Too many symbols requested",
|
|
1746
|
+
value: {
|
|
1747
|
+
timestamp: "2026-09-14T08:44:00.586Z",
|
|
1748
|
+
path: "/rates/time-series",
|
|
1749
|
+
code: 402,
|
|
1750
|
+
error: "PAYMENT_REQUIRED",
|
|
1751
|
+
message: "Maximum symbols per request exceeded"
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
},
|
|
1757
|
+
headers: {
|
|
1758
|
+
"X-AF-Credits-Cost": {
|
|
1759
|
+
$ref: "#/components/headers/X-AF-Credits-Cost"
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
},
|
|
1347
1763
|
"404": {
|
|
1348
1764
|
description: "Not found - Symbol or data not available",
|
|
1349
1765
|
content: {
|
|
@@ -1355,17 +1771,22 @@ var commodity_time_series_default = {
|
|
|
1355
1771
|
symbolNotFound: {
|
|
1356
1772
|
summary: "Symbol Not Found",
|
|
1357
1773
|
value: {
|
|
1358
|
-
timestamp: "2026-
|
|
1774
|
+
timestamp: "2026-09-14T08:44:00.586Z",
|
|
1359
1775
|
path: "/rates/time-series",
|
|
1360
1776
|
code: 404,
|
|
1361
1777
|
error: "SYMBOL_NOT_FOUND",
|
|
1362
|
-
message: "The symbol is not supported, please visit the documentation for a list of supported symbols"
|
|
1778
|
+
message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
|
|
1779
|
+
unresolved: {
|
|
1780
|
+
FAKESYM: {
|
|
1781
|
+
message: "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1363
1784
|
}
|
|
1364
1785
|
},
|
|
1365
1786
|
dataNotFound: {
|
|
1366
1787
|
summary: "No data available for the given date range",
|
|
1367
1788
|
value: {
|
|
1368
|
-
timestamp: "2026-
|
|
1789
|
+
timestamp: "2026-09-14T08:44:31.547Z",
|
|
1369
1790
|
path: "/rates/time-series",
|
|
1370
1791
|
code: 404,
|
|
1371
1792
|
error: "DATA_NOT_FOUND",
|
|
@@ -1419,6 +1840,26 @@ var commodity_time_series_default = {
|
|
|
1419
1840
|
},
|
|
1420
1841
|
rates: {
|
|
1421
1842
|
$ref: "#/components/schemas/CommodityTimeSeriesRates"
|
|
1843
|
+
},
|
|
1844
|
+
unresolved: {
|
|
1845
|
+
type: "object",
|
|
1846
|
+
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.",
|
|
1847
|
+
additionalProperties: {
|
|
1848
|
+
type: "object",
|
|
1849
|
+
properties: {
|
|
1850
|
+
message: {
|
|
1851
|
+
type: "string",
|
|
1852
|
+
description: "Detail message explaining why this symbol was not resolved."
|
|
1853
|
+
},
|
|
1854
|
+
suggestions: {
|
|
1855
|
+
type: "array",
|
|
1856
|
+
description: "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
1857
|
+
items: {
|
|
1858
|
+
type: "string"
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1422
1863
|
}
|
|
1423
1864
|
},
|
|
1424
1865
|
description: "Commodity time series response containing date-indexed OHLC data per symbol."
|
|
@@ -1437,23 +1878,23 @@ var commodity_time_series_default = {
|
|
|
1437
1878
|
},
|
|
1438
1879
|
CommodityOhlc: {
|
|
1439
1880
|
type: "object",
|
|
1440
|
-
description: "OHLC price data for a single commodity on a single trading day.",
|
|
1881
|
+
description: "OHLC price data for a single commodity on a single trading day. For monthly-updated commodities, only `close` is meaningful \u2014 `open`, `high`, and `low` are returned as `0`.",
|
|
1441
1882
|
required: ["open", "high", "low", "close"],
|
|
1442
1883
|
properties: {
|
|
1443
1884
|
open: {
|
|
1444
1885
|
type: "number",
|
|
1445
1886
|
format: "float",
|
|
1446
|
-
description: "Opening price on the given date."
|
|
1887
|
+
description: "Opening price on the given date. `0` for monthly-updated commodities."
|
|
1447
1888
|
},
|
|
1448
1889
|
high: {
|
|
1449
1890
|
type: "number",
|
|
1450
1891
|
format: "float",
|
|
1451
|
-
description: "Highest price on the given date."
|
|
1892
|
+
description: "Highest price on the given date. `0` for monthly-updated commodities."
|
|
1452
1893
|
},
|
|
1453
1894
|
low: {
|
|
1454
1895
|
type: "number",
|
|
1455
1896
|
format: "float",
|
|
1456
|
-
description: "Lowest price on the given date."
|
|
1897
|
+
description: "Lowest price on the given date. `0` for monthly-updated commodities."
|
|
1457
1898
|
},
|
|
1458
1899
|
close: {
|
|
1459
1900
|
type: "number",
|
|
@@ -1491,6 +1932,26 @@ var commodity_time_series_default = {
|
|
|
1491
1932
|
type: "string",
|
|
1492
1933
|
format: "date-time",
|
|
1493
1934
|
description: "Timestamp when the error occurred (ISO 8601)."
|
|
1935
|
+
},
|
|
1936
|
+
unresolved: {
|
|
1937
|
+
type: "object",
|
|
1938
|
+
description: "Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
|
|
1939
|
+
additionalProperties: {
|
|
1940
|
+
type: "object",
|
|
1941
|
+
properties: {
|
|
1942
|
+
message: {
|
|
1943
|
+
type: "string",
|
|
1944
|
+
description: "Detail message explaining why this symbol was not resolved."
|
|
1945
|
+
},
|
|
1946
|
+
suggestions: {
|
|
1947
|
+
type: "array",
|
|
1948
|
+
description: "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
1949
|
+
items: {
|
|
1950
|
+
type: "string"
|
|
1951
|
+
}
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1494
1955
|
}
|
|
1495
1956
|
}
|
|
1496
1957
|
}
|
|
@@ -1519,8 +1980,8 @@ var historical_commodity_prices_default = {
|
|
|
1519
1980
|
openapi: "3.1.1",
|
|
1520
1981
|
info: {
|
|
1521
1982
|
title: "Historical Commodity Prices, Delivered Simply.",
|
|
1522
|
-
version: "
|
|
1523
|
-
description: "
|
|
1983
|
+
version: "2.0.0",
|
|
1984
|
+
description: "OHLC price data for one or more commodities on a specific date, back to January 1990. Falls back to the nearest earlier rate if none exists for the exact date. Monthly-updated commodities only have a closing price \u2014 `open`, `high`, and `low` come back as `0`. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.",
|
|
1524
1985
|
contact: {
|
|
1525
1986
|
name: "APIFreaks Support",
|
|
1526
1987
|
url: "https://apifreaks.com/contact",
|
|
@@ -1529,7 +1990,7 @@ var historical_commodity_prices_default = {
|
|
|
1529
1990
|
},
|
|
1530
1991
|
servers: [
|
|
1531
1992
|
{
|
|
1532
|
-
url: "https://api.apifreaks.com/
|
|
1993
|
+
url: "https://api.apifreaks.com/v2.0",
|
|
1533
1994
|
description: "Historical Commodity Prices API Server"
|
|
1534
1995
|
}
|
|
1535
1996
|
],
|
|
@@ -1602,6 +2063,60 @@ var historical_commodity_prices_default = {
|
|
|
1602
2063
|
}
|
|
1603
2064
|
}
|
|
1604
2065
|
}
|
|
2066
|
+
},
|
|
2067
|
+
monthlyCommodity: {
|
|
2068
|
+
summary: "Monthly-updated commodity (open/high/low unavailable)",
|
|
2069
|
+
value: {
|
|
2070
|
+
success: true,
|
|
2071
|
+
date: "2025-01-10",
|
|
2072
|
+
rates: {
|
|
2073
|
+
"NG-EU": {
|
|
2074
|
+
date: "2025-01-01",
|
|
2075
|
+
open: 0,
|
|
2076
|
+
high: 0,
|
|
2077
|
+
low: 0,
|
|
2078
|
+
close: 14.66
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
},
|
|
2086
|
+
headers: {
|
|
2087
|
+
"X-AF-Credits-Cost": {
|
|
2088
|
+
$ref: "#/components/headers/X-AF-Credits-Cost"
|
|
2089
|
+
}
|
|
2090
|
+
}
|
|
2091
|
+
},
|
|
2092
|
+
"206": {
|
|
2093
|
+
description: "Partial Content \u2014 Some requested symbols could not be resolved",
|
|
2094
|
+
content: {
|
|
2095
|
+
"application/json": {
|
|
2096
|
+
schema: {
|
|
2097
|
+
$ref: "#/components/schemas/HistoricalCommodityPricesResponse"
|
|
2098
|
+
},
|
|
2099
|
+
examples: {
|
|
2100
|
+
partial: {
|
|
2101
|
+
summary: "One valid symbol, one unresolved symbol",
|
|
2102
|
+
value: {
|
|
2103
|
+
success: true,
|
|
2104
|
+
date: "2025-01-10",
|
|
2105
|
+
rates: {
|
|
2106
|
+
XAU: {
|
|
2107
|
+
date: "2025-01-10",
|
|
2108
|
+
open: 2669.93,
|
|
2109
|
+
high: 2697.85,
|
|
2110
|
+
low: 2663.61,
|
|
2111
|
+
close: 2689.44
|
|
2112
|
+
}
|
|
2113
|
+
},
|
|
2114
|
+
unresolved: {
|
|
2115
|
+
FAKESYM: {
|
|
2116
|
+
message: "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
2117
|
+
}
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
1605
2120
|
}
|
|
1606
2121
|
}
|
|
1607
2122
|
}
|
|
@@ -1613,31 +2128,68 @@ var historical_commodity_prices_default = {
|
|
|
1613
2128
|
}
|
|
1614
2129
|
},
|
|
1615
2130
|
"400": {
|
|
1616
|
-
description: "Bad
|
|
2131
|
+
description: "Bad Request \u2014 Missing parameters or invalid date",
|
|
1617
2132
|
content: {
|
|
1618
2133
|
"application/json": {
|
|
1619
2134
|
schema: {
|
|
1620
2135
|
$ref: "#/components/schemas/ErrorResponse"
|
|
1621
2136
|
},
|
|
1622
2137
|
examples: {
|
|
2138
|
+
missingSymbols: {
|
|
2139
|
+
summary: "Missing required symbols parameter",
|
|
2140
|
+
value: {
|
|
2141
|
+
error: "Invalid Param Exception",
|
|
2142
|
+
message: "please pass correct parameters",
|
|
2143
|
+
path: "/v2.0/commodity/rates/historical",
|
|
2144
|
+
status: 400,
|
|
2145
|
+
timestamp: "2026-09-14T08:44:32.013Z"
|
|
2146
|
+
}
|
|
2147
|
+
},
|
|
1623
2148
|
invalidDateFormat: {
|
|
1624
2149
|
summary: "Invalid date format",
|
|
1625
2150
|
value: {
|
|
1626
|
-
timestamp:
|
|
1627
|
-
|
|
2151
|
+
timestamp: "2026-09-14T08:45:13.934Z",
|
|
2152
|
+
path: "/rates/historical",
|
|
2153
|
+
code: 400,
|
|
1628
2154
|
error: "VALIDATION_ERROR",
|
|
1629
|
-
message: "Invalid Date Format (YYYY-MM-DD)."
|
|
1630
|
-
path: "/v1.0/commodity/rates/historical"
|
|
2155
|
+
message: "Invalid Date Format (YYYY-MM-DD)."
|
|
1631
2156
|
}
|
|
1632
2157
|
},
|
|
1633
2158
|
dateNotExist: {
|
|
1634
2159
|
summary: "Date does not exist",
|
|
1635
2160
|
value: {
|
|
1636
|
-
timestamp:
|
|
1637
|
-
|
|
2161
|
+
timestamp: "2026-09-14T08:44:01.487Z",
|
|
2162
|
+
path: "/rates/historical",
|
|
2163
|
+
code: 400,
|
|
1638
2164
|
error: "VALIDATION_ERROR",
|
|
1639
|
-
message: "Invalid Date: The provided date does not exist."
|
|
1640
|
-
|
|
2165
|
+
message: "Invalid Date: The provided date does not exist."
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
},
|
|
2171
|
+
headers: {
|
|
2172
|
+
"X-AF-Credits-Cost": {
|
|
2173
|
+
$ref: "#/components/headers/X-AF-Credits-Cost"
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
},
|
|
2177
|
+
"402": {
|
|
2178
|
+
description: "Payment Required \u2014 Maximum symbols per request exceeded",
|
|
2179
|
+
content: {
|
|
2180
|
+
"application/json": {
|
|
2181
|
+
schema: {
|
|
2182
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
2183
|
+
},
|
|
2184
|
+
examples: {
|
|
2185
|
+
maxSymbolsExceeded: {
|
|
2186
|
+
summary: "Too many symbols requested",
|
|
2187
|
+
value: {
|
|
2188
|
+
timestamp: "2026-09-14T08:44:01.978Z",
|
|
2189
|
+
path: "/rates/historical",
|
|
2190
|
+
code: 402,
|
|
2191
|
+
error: "PAYMENT_REQUIRED",
|
|
2192
|
+
message: "Maximum symbols per request exceeded"
|
|
1641
2193
|
}
|
|
1642
2194
|
}
|
|
1643
2195
|
}
|
|
@@ -1660,21 +2212,26 @@ var historical_commodity_prices_default = {
|
|
|
1660
2212
|
symbolNotFound: {
|
|
1661
2213
|
summary: "Symbol Not Found",
|
|
1662
2214
|
value: {
|
|
1663
|
-
timestamp:
|
|
1664
|
-
|
|
2215
|
+
timestamp: "2026-09-14T08:44:01.978Z",
|
|
2216
|
+
path: "/rates/historical",
|
|
2217
|
+
code: 404,
|
|
1665
2218
|
error: "SYMBOL_NOT_FOUND",
|
|
1666
2219
|
message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
|
|
1667
|
-
|
|
2220
|
+
unresolved: {
|
|
2221
|
+
FAKESYM: {
|
|
2222
|
+
message: "We don't support this symbol, please visit our symbols page to see supported symbols."
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
1668
2225
|
}
|
|
1669
2226
|
},
|
|
1670
2227
|
rateNotFound: {
|
|
1671
2228
|
summary: "Rate Not Found",
|
|
1672
2229
|
value: {
|
|
1673
|
-
timestamp:
|
|
1674
|
-
|
|
2230
|
+
timestamp: "2026-09-14T08:44:02.528Z",
|
|
2231
|
+
path: "/rates/historical",
|
|
2232
|
+
code: 404,
|
|
1675
2233
|
error: "RATE_NOT_FOUND",
|
|
1676
|
-
message: "no rates found for the specified date"
|
|
1677
|
-
path: "/v1.0/commodity/rates/historical"
|
|
2234
|
+
message: "no rates found for the specified date"
|
|
1678
2235
|
}
|
|
1679
2236
|
}
|
|
1680
2237
|
}
|
|
@@ -1720,6 +2277,26 @@ var historical_commodity_prices_default = {
|
|
|
1720
2277
|
},
|
|
1721
2278
|
rates: {
|
|
1722
2279
|
$ref: "#/components/schemas/HistoricalCommodityRates"
|
|
2280
|
+
},
|
|
2281
|
+
unresolved: {
|
|
2282
|
+
type: "object",
|
|
2283
|
+
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.",
|
|
2284
|
+
additionalProperties: {
|
|
2285
|
+
type: "object",
|
|
2286
|
+
properties: {
|
|
2287
|
+
message: {
|
|
2288
|
+
type: "string",
|
|
2289
|
+
description: "Detail message explaining why this symbol was not resolved."
|
|
2290
|
+
},
|
|
2291
|
+
suggestions: {
|
|
2292
|
+
type: "array",
|
|
2293
|
+
description: "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
2294
|
+
items: {
|
|
2295
|
+
type: "string"
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2298
|
+
}
|
|
2299
|
+
}
|
|
1723
2300
|
}
|
|
1724
2301
|
},
|
|
1725
2302
|
description: "Historical commodity prices response containing success status, date, and OHLC rate data."
|
|
@@ -1736,27 +2313,27 @@ var historical_commodity_prices_default = {
|
|
|
1736
2313
|
},
|
|
1737
2314
|
HistoricalCommodityRate: {
|
|
1738
2315
|
type: "object",
|
|
1739
|
-
description: "OHLC price data for a single commodity on a specific date.",
|
|
2316
|
+
description: "OHLC price data for a single commodity on a specific date. For monthly-updated commodities, only `close` is meaningful \u2014 `open`, `high`, and `low` are returned as `0`.",
|
|
1740
2317
|
required: ["date", "open", "high", "low", "close"],
|
|
1741
2318
|
properties: {
|
|
1742
2319
|
date: {
|
|
1743
2320
|
type: "string",
|
|
1744
|
-
description: "Date for which prices were fetched (YYYY-MM-DD)."
|
|
2321
|
+
description: "Date for which prices were fetched (YYYY-MM-DD). May differ from the requested `date` when the API falls back to the last available rate before it, or snaps to the first day of the month for monthly-updated commodities."
|
|
1745
2322
|
},
|
|
1746
2323
|
open: {
|
|
1747
2324
|
type: "number",
|
|
1748
2325
|
format: "float",
|
|
1749
|
-
description: "Opening price on the given date."
|
|
2326
|
+
description: "Opening price on the given date. `0` for monthly-updated commodities."
|
|
1750
2327
|
},
|
|
1751
2328
|
high: {
|
|
1752
2329
|
type: "number",
|
|
1753
2330
|
format: "float",
|
|
1754
|
-
description: "Highest price recorded on the given date."
|
|
2331
|
+
description: "Highest price recorded on the given date. `0` for monthly-updated commodities."
|
|
1755
2332
|
},
|
|
1756
2333
|
low: {
|
|
1757
2334
|
type: "number",
|
|
1758
2335
|
format: "float",
|
|
1759
|
-
description: "Lowest price recorded on the given date."
|
|
2336
|
+
description: "Lowest price recorded on the given date. `0` for monthly-updated commodities."
|
|
1760
2337
|
},
|
|
1761
2338
|
close: {
|
|
1762
2339
|
type: "number",
|
|
@@ -1767,19 +2344,12 @@ var historical_commodity_prices_default = {
|
|
|
1767
2344
|
},
|
|
1768
2345
|
ErrorResponse: {
|
|
1769
2346
|
type: "object",
|
|
1770
|
-
|
|
2347
|
+
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.",
|
|
2348
|
+
required: ["message"],
|
|
1771
2349
|
properties: {
|
|
1772
|
-
timestamp: {
|
|
1773
|
-
type: "integer",
|
|
1774
|
-
description: "Unix timestamp in milliseconds when the error occurred."
|
|
1775
|
-
},
|
|
1776
|
-
status: {
|
|
1777
|
-
type: "integer",
|
|
1778
|
-
description: "HTTP status code returned with the error."
|
|
1779
|
-
},
|
|
1780
2350
|
error: {
|
|
1781
2351
|
type: "string",
|
|
1782
|
-
description: "
|
|
2352
|
+
description: "Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, RATE_NOT_FOUND)."
|
|
1783
2353
|
},
|
|
1784
2354
|
message: {
|
|
1785
2355
|
type: "string",
|
|
@@ -1787,10 +2357,42 @@ var historical_commodity_prices_default = {
|
|
|
1787
2357
|
},
|
|
1788
2358
|
path: {
|
|
1789
2359
|
type: "string",
|
|
1790
|
-
description: "API endpoint path that produced the error."
|
|
2360
|
+
description: "API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error."
|
|
2361
|
+
},
|
|
2362
|
+
status: {
|
|
2363
|
+
type: "integer",
|
|
2364
|
+
description: "HTTP status code. Present on gateway-level errors."
|
|
2365
|
+
},
|
|
2366
|
+
code: {
|
|
2367
|
+
type: "integer",
|
|
2368
|
+
description: "HTTP status code. Present on commodity-service errors instead of status."
|
|
2369
|
+
},
|
|
2370
|
+
timestamp: {
|
|
2371
|
+
type: "string",
|
|
2372
|
+
format: "date-time",
|
|
2373
|
+
description: "Timestamp when the error occurred (ISO 8601)."
|
|
2374
|
+
},
|
|
2375
|
+
unresolved: {
|
|
2376
|
+
type: "object",
|
|
2377
|
+
description: "Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
|
|
2378
|
+
additionalProperties: {
|
|
2379
|
+
type: "object",
|
|
2380
|
+
properties: {
|
|
2381
|
+
message: {
|
|
2382
|
+
type: "string",
|
|
2383
|
+
description: "Detail message explaining why this symbol was not resolved."
|
|
2384
|
+
},
|
|
2385
|
+
suggestions: {
|
|
2386
|
+
type: "array",
|
|
2387
|
+
description: "Optional list of supported symbols that closely match the unresolved symbol.",
|
|
2388
|
+
items: {
|
|
2389
|
+
type: "string"
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
1791
2394
|
}
|
|
1792
|
-
}
|
|
1793
|
-
description: "Standard error envelope returned by the API on failed requests."
|
|
2395
|
+
}
|
|
1794
2396
|
}
|
|
1795
2397
|
},
|
|
1796
2398
|
headers: {
|
|
@@ -49553,11 +50155,11 @@ var SPECS = {
|
|
|
49553
50155
|
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"];
|
|
49554
50156
|
var SPECS_YAML = {
|
|
49555
50157
|
"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",
|
|
49556
|
-
"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",
|
|
49557
|
-
"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",
|
|
49558
|
-
"commodity-symbols": "openapi: 3.1.1\ninfo:\n title: Commodity Symbols API Reference\n version:
|
|
49559
|
-
"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",
|
|
49560
|
-
"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",
|
|
50158
|
+
"commodity-fluctuation": "openapi: 3.1.1\ninfo:\n title: 'Commodity Fluctuation API '\n version: 2.0.0\n description: Price change and percentage movement for one or more commodities over a custom date range, with no limit on range length. For monthly-updated commodities the range snaps to month boundaries. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.\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",
|
|
50159
|
+
"commodity-prices": "openapi: 3.1.1\ninfo:\n title: Live Commodity Prices API - Real Time Market Insights\n version: 2.0.0\n description: Real-time prices for 245+ commodities in a single request, updated on a rolling ~10 minute cadence. Optionally convert prices into a target quote currency. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.\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: 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: 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 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",
|
|
50160
|
+
"commodity-symbols": "openapi: 3.1.1\ninfo:\n title: Commodity Symbols API Reference\n version: 2.0.0\n description: 'Full catalog of 245+ supported commodities across Metals, Energy, Agriculture, Industrial, Raw Materials, Oils and Meals, Textiles, Meats, Poultry, and Livestock, with pricing currency, unit, and update interval per symbol. Deprecated symbols stay listed with `status: \"inactive\"` and a `deprecationDate`.'\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",
|
|
50161
|
+
"commodity-time-series": "openapi: 3.1.1\ninfo:\n title: Commodities Time Series API\n version: 2.0.0\n description: Daily OHLC history for one or more commodities over a date range of up to 365 days, indexed by date. Non-trading days are excluded. Monthly-updated commodities only have a closing price \u2014 `open`, `high`, and `low` come back as `0`. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.\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 monthlyCommodity:\n summary: Monthly-updated commodity (open/high/low unavailable)\n value:\n success: true\n startDate: '2025-01-01'\n endDate: '2025-03-01'\n rates:\n '2025-01-01':\n NG-EU:\n open: 0\n high: 0\n low: 0\n close: 14.66\n '2025-02-01':\n NG-EU:\n open: 0\n high: 0\n low: 0\n close: 15.34\n '2025-03-01':\n NG-EU:\n open: 0\n high: 0\n low: 0\n close: 13.24\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. For monthly-updated commodities, only `close` is meaningful \u2014 `open`, `high`, and `low` are returned as `0`.\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. `0` for monthly-updated commodities.\n high:\n type: number\n format: float\n description: Highest price on the given date. `0` for monthly-updated commodities.\n low:\n type: number\n format: float\n description: Lowest price on the given date. `0` for monthly-updated commodities.\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",
|
|
50162
|
+
"historical-commodity-prices": "openapi: 3.1.1\ninfo:\n title: Historical Commodity Prices, Delivered Simply.\n version: 2.0.0\n description: OHLC price data for one or more commodities on a specific date, back to January 1990. Falls back to the nearest earlier rate if none exists for the exact date. Monthly-updated commodities only have a closing price \u2014 `open`, `high`, and `low` come back as `0`. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.\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 monthlyCommodity:\n summary: Monthly-updated commodity (open/high/low unavailable)\n value:\n success: true\n date: '2025-01-10'\n rates:\n NG-EU:\n date: '2025-01-01'\n open: 0\n high: 0\n low: 0\n close: 14.66\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. For monthly-updated commodities, only `close` is meaningful \u2014 `open`, `high`, and `low` are returned as `0`.\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, or snaps to the first day of the month for monthly-updated commodities.\n open:\n type: number\n format: float\n description: Opening price on the given date. `0` for monthly-updated commodities.\n high:\n type: number\n format: float\n description: Highest price recorded on the given date. `0` for monthly-updated commodities.\n low:\n type: number\n format: float\n description: Lowest price recorded on the given date. `0` for monthly-updated commodities.\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",
|
|
49561
50163
|
"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",
|
|
49562
50164
|
"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",
|
|
49563
50165
|
"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",
|