@apifreaks/openapi-specs 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs 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: "1.0.0",
280
- 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.",
279
+ version: "2.0.0",
280
+ description: "Calculate price change and percentage movement for any commodity over a custom date range. Returns the opening price, closing price, absolute change, and percentage change for each symbol, rounded to 2 decimal places. For monthly-updated commodities, the fluctuation is computed between the first day of the start month and the first day of the end month. There is no limit on the date range. Accepts one or more comma-separated commodity symbols with a start and end date in YYYY-MM-DD format. If some requested symbols can't be resolved, a 206 Partial Content response is returned with the resolved rates plus an `unresolved` object. Returns a 400 error for invalid dates or a date range where start is after end, and a 404 error for unsupported symbols or a date range with no available data.",
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/v1.0",
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: "/v1.0/commodity/fluctuation",
428
+ path: "/v2.0/commodity/fluctuation",
391
429
  status: 400,
392
- timestamp: "2026-07-27T11:37:24.273Z"
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-07-27T11:37:23.759Z",
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-07-27T11:37:34.167Z",
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: "1.0.0",
606
- 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.",
715
+ version: "2.0.0",
716
+ description: "Get real-time prices for 245+ commodities in a single request. Returns current market prices for each requested symbol plus unit and quote currency metadata. Supports an optional quote parameter to convert prices into a desired currency, defaulting to each commodity's native market currency. Accepts 10-minute or 1-minute update frequencies for price freshness. If some requested symbols can't be resolved, a 206 Partial Content response is returned with the resolved rates plus an `unresolved` object; if none resolve, a 404 is returned instead. An unsupported quote currency also returns a 404.",
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/v1.0",
725
+ url: "https://api.apifreaks.com/v2.0",
616
726
  description: "Live Commodity Prices API Server"
617
727
  }
618
728
  ],
@@ -648,11 +758,11 @@ var commodity_prices_default = {
648
758
  name: "updates",
649
759
  in: "query",
650
760
  required: true,
651
- description: "Update frequency. Accepted values: `1m` (default), `10m`.",
761
+ description: "Update frequency. Accepted values: `10m` (default), `1m`.",
652
762
  schema: {
653
763
  type: "string",
654
- enum: ["1m", "10m"],
655
- default: "1m"
764
+ enum: ["10m", "1m"],
765
+ default: "10m"
656
766
  }
657
767
  },
658
768
  {
@@ -675,13 +785,13 @@ var commodity_prices_default = {
675
785
  },
676
786
  examples: {
677
787
  success: {
678
- summary: "Successful response",
788
+ summary: "Successful response (10m update frequency)",
679
789
  value: {
680
790
  success: true,
681
- timestamp: 1785152172,
791
+ timestamp: 1789375397,
682
792
  rates: {
683
- XAU: 4099.1,
684
- "WTIOIL-SPOT": 81.88
793
+ XAU: 4313.04,
794
+ "WTIOIL-SPOT": 100
685
795
  },
686
796
  metadata: {
687
797
  XAU: {
@@ -699,9 +809,9 @@ var commodity_prices_default = {
699
809
  summary: "Price converted to a target quote currency",
700
810
  value: {
701
811
  success: true,
702
- timestamp: 1785152172,
812
+ timestamp: 1789375426,
703
813
  rates: {
704
- XAU: 3597.734
814
+ XAU: 3739.023
705
815
  },
706
816
  metadata: {
707
817
  XAU: {
@@ -720,6 +830,66 @@ var commodity_prices_default = {
720
830
  }
721
831
  }
722
832
  },
833
+ "206": {
834
+ description: "Partial Content \u2014 Some requested symbols could not be resolved",
835
+ content: {
836
+ "application/json": {
837
+ schema: {
838
+ $ref: "#/components/schemas/LiveCommodityPricesResponse"
839
+ },
840
+ examples: {
841
+ partial: {
842
+ summary: "One valid symbol, one unresolved symbol",
843
+ value: {
844
+ success: true,
845
+ timestamp: 1789376193,
846
+ rates: {
847
+ XAU: 4311.88
848
+ },
849
+ metadata: {
850
+ XAU: {
851
+ unit: "T.oz",
852
+ quote: "USD"
853
+ }
854
+ },
855
+ unresolved: {
856
+ FAKESYM: {
857
+ message: "We don't support this symbol, please visit our symbols page to see supported symbols."
858
+ }
859
+ }
860
+ }
861
+ },
862
+ partialWithSuggestions: {
863
+ summary: "Unresolved symbol with close-match suggestions",
864
+ value: {
865
+ success: true,
866
+ timestamp: 1789376644,
867
+ rates: {
868
+ XAU: 4306.06
869
+ },
870
+ metadata: {
871
+ XAU: {
872
+ unit: "T.oz",
873
+ quote: "USD"
874
+ }
875
+ },
876
+ unresolved: {
877
+ ZW: {
878
+ message: "Did you mean ZW-SPOT (Wheat Spot) or ZW-FUT (Wheat Futures)?",
879
+ suggestions: ["ZW-SPOT", "ZW-FUT"]
880
+ }
881
+ }
882
+ }
883
+ }
884
+ }
885
+ }
886
+ },
887
+ headers: {
888
+ "X-AF-Credits-Cost": {
889
+ $ref: "#/components/headers/X-AF-Credits-Cost"
890
+ }
891
+ }
892
+ },
723
893
  "400": {
724
894
  description: "Bad Request \u2014 Missing or invalid query parameters",
725
895
  content: {
@@ -733,19 +903,46 @@ var commodity_prices_default = {
733
903
  value: {
734
904
  error: "Invalid Param Exception",
735
905
  message: "please pass correct parameters",
736
- path: "/v1.0/commodity/rates/latest",
906
+ path: "/v2.0/commodity/rates/latest",
737
907
  status: 400,
738
- timestamp: "2026-07-27T11:36:13.312Z"
908
+ timestamp: "2026-09-14T08:43:43.964Z"
739
909
  }
740
910
  },
741
911
  invalidUpdates: {
742
- summary: "updates is not 1m or 10m",
912
+ summary: "updates is not 10m or 1m",
743
913
  value: {
744
914
  error: "Invalid Param Exception",
745
915
  message: "please pass correct parameters",
746
- path: "/v1.0/commodity/rates/latest",
916
+ path: "/v2.0/commodity/rates/latest",
747
917
  status: 400,
748
- timestamp: "2026-07-27T11:36:35.755Z"
918
+ timestamp: "2026-09-14T08:43:44.440Z"
919
+ }
920
+ }
921
+ }
922
+ }
923
+ },
924
+ headers: {
925
+ "X-AF-Credits-Cost": {
926
+ $ref: "#/components/headers/X-AF-Credits-Cost"
927
+ }
928
+ }
929
+ },
930
+ "402": {
931
+ description: "Payment Required \u2014 Maximum symbols per request exceeded",
932
+ content: {
933
+ "application/json": {
934
+ schema: {
935
+ $ref: "#/components/schemas/CommodityNotFoundError"
936
+ },
937
+ examples: {
938
+ maxSymbolsExceeded: {
939
+ summary: "Too many symbols requested",
940
+ value: {
941
+ timestamp: "2026-09-14T08:43:44.957Z",
942
+ path: "/rates/latestRates",
943
+ code: 402,
944
+ error: "PAYMENT_REQUIRED",
945
+ message: "Maximum symbols per request exceeded"
749
946
  }
750
947
  }
751
948
  }
@@ -768,17 +965,38 @@ var commodity_prices_default = {
768
965
  symbolNotFound: {
769
966
  summary: "Symbol Not Found",
770
967
  value: {
771
- timestamp: 1781792620618,
968
+ timestamp: "2026-09-14T08:43:44.957Z",
772
969
  path: "/rates/latestRates",
773
970
  code: 404,
774
971
  error: "SYMBOL_NOT_FOUND",
775
- message: "The symbol is not supported, please visit the documentation for a list of supported symbols"
972
+ message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
973
+ unresolved: {
974
+ FAKESYM: {
975
+ message: "We don't support this symbol, please visit our symbols page to see supported symbols."
976
+ }
977
+ }
978
+ }
979
+ },
980
+ symbolNotFoundWithSuggestions: {
981
+ summary: "Symbol Not Found, with close-match suggestions",
982
+ value: {
983
+ timestamp: "2026-09-14T09:04:04.878Z",
984
+ path: "/rates/latestRates",
985
+ code: 404,
986
+ error: "SYMBOL_NOT_FOUND",
987
+ message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
988
+ unresolved: {
989
+ ZW: {
990
+ message: "Did you mean ZW-SPOT (Wheat Spot) or ZW-FUT (Wheat Futures)?",
991
+ suggestions: ["ZW-SPOT", "ZW-FUT"]
992
+ }
993
+ }
776
994
  }
777
995
  },
778
996
  quoteNotFound: {
779
997
  summary: "Quote Currency Not Found",
780
998
  value: {
781
- timestamp: 1781792620618,
999
+ timestamp: "2026-09-14T08:43:45.461Z",
782
1000
  path: "/rates/latestRates",
783
1001
  code: 404,
784
1002
  error: "QUOTE_NOT_FOUND",
@@ -831,6 +1049,30 @@ var commodity_prices_default = {
831
1049
  },
832
1050
  metadata: {
833
1051
  $ref: "#/components/schemas/CommodityMetadata"
1052
+ },
1053
+ unresolved: {
1054
+ type: "object",
1055
+ 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.",
1056
+ additionalProperties: {
1057
+ type: "object",
1058
+ properties: {
1059
+ message: {
1060
+ type: "string",
1061
+ description: "Detail message explaining why this symbol was not resolved."
1062
+ },
1063
+ suggestions: {
1064
+ type: "array",
1065
+ description: "Optional list of supported symbols that closely match the unresolved symbol.",
1066
+ items: {
1067
+ type: "string"
1068
+ }
1069
+ }
1070
+ }
1071
+ }
1072
+ },
1073
+ warning: {
1074
+ type: "string",
1075
+ description: "Present only when currency conversion for the requested `quote` is temporarily unavailable; rates are returned in each commodity's default currency instead."
834
1076
  }
835
1077
  },
836
1078
  description: "Live commodity prices response containing success status, timestamp, rates, and metadata."
@@ -894,12 +1136,13 @@ var commodity_prices_default = {
894
1136
  },
895
1137
  CommodityNotFoundError: {
896
1138
  type: "object",
897
- 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.",
1139
+ 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
1140
  required: ["code", "error", "message"],
899
1141
  properties: {
900
1142
  timestamp: {
901
- type: "integer",
902
- description: "Unix timestamp in milliseconds when the error occurred."
1143
+ type: "string",
1144
+ format: "date-time",
1145
+ description: "Timestamp when the error occurred (ISO 8601)."
903
1146
  },
904
1147
  path: {
905
1148
  type: "string",
@@ -916,6 +1159,26 @@ var commodity_prices_default = {
916
1159
  message: {
917
1160
  type: "string",
918
1161
  description: "Human-readable error message describing the failure."
1162
+ },
1163
+ unresolved: {
1164
+ type: "object",
1165
+ description: "Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
1166
+ additionalProperties: {
1167
+ type: "object",
1168
+ properties: {
1169
+ message: {
1170
+ type: "string",
1171
+ description: "Detail message explaining why this symbol was not resolved."
1172
+ },
1173
+ suggestions: {
1174
+ type: "array",
1175
+ description: "Optional list of supported symbols that closely match the unresolved symbol.",
1176
+ items: {
1177
+ type: "string"
1178
+ }
1179
+ }
1180
+ }
1181
+ }
919
1182
  }
920
1183
  }
921
1184
  }
@@ -944,8 +1207,8 @@ var commodity_symbols_default = {
944
1207
  openapi: "3.1.1",
945
1208
  info: {
946
1209
  title: "Commodity Symbols API Reference",
947
- version: "1.0.0",
948
- description: "List all supported commodity symbols available in the APIFreaks Commodity API. Returns an array of commodity objects with symbol, name, category, pricing currency, unit of measurement, status, and update interval. Supports metals, energy, agriculture, and livestock categories.",
1210
+ version: "2.0.0",
1211
+ description: 'List all supported commodity symbols available in the APIFreaks Commodity API. Returns an array of commodity objects with symbol, name, category, pricing currency, unit of measurement, status, and update interval. Supports metals, energy, agriculture, industrial, raw materials, oils and meals, textiles, meats, poultry, and livestock categories across 245+ commodities. Deprecated symbols are included with `status: "inactive"` and a `deprecationDate`; historical rates remain available for them up to their deprecation date, but latest rates do not.',
949
1212
  contact: {
950
1213
  name: "APIFreaks Support",
951
1214
  url: "https://apifreaks.com/contact",
@@ -954,7 +1217,7 @@ var commodity_symbols_default = {
954
1217
  },
955
1218
  servers: [
956
1219
  {
957
- url: "https://api.apifreaks.com/v1.0",
1220
+ url: "https://api.apifreaks.com/v2.0",
958
1221
  description: "Commodity Symbols API Server"
959
1222
  }
960
1223
  ],
@@ -1023,6 +1286,40 @@ var commodity_symbols_default = {
1023
1286
  symbol: "MMBtu",
1024
1287
  name: "Million British Thermal Units"
1025
1288
  }
1289
+ },
1290
+ {
1291
+ symbol: "NG-EU",
1292
+ name: "Natural Gas, Europe",
1293
+ category: "Energy",
1294
+ status: "active",
1295
+ updateInterval: "PER_MONTH",
1296
+ exchange: "World Bank",
1297
+ currency: {
1298
+ code: "USD",
1299
+ name: "US Dollar",
1300
+ symbol: "$"
1301
+ },
1302
+ unit: {
1303
+ symbol: "MMBtu",
1304
+ name: "Million British Thermal Units"
1305
+ }
1306
+ },
1307
+ {
1308
+ symbol: "UANEU",
1309
+ name: "Urea Ammonium Nitrate",
1310
+ category: "Industrial",
1311
+ status: "inactive",
1312
+ updateInterval: "PER_MINUTE",
1313
+ deprecationDate: "2024-04-14",
1314
+ currency: {
1315
+ code: "USD",
1316
+ name: "US Dollar",
1317
+ symbol: "$"
1318
+ },
1319
+ unit: {
1320
+ symbol: "T",
1321
+ name: "Metric Ton"
1322
+ }
1026
1323
  }
1027
1324
  ]
1028
1325
  }
@@ -1089,23 +1386,46 @@ var commodity_symbols_default = {
1089
1386
  properties: {
1090
1387
  symbol: {
1091
1388
  type: "string",
1092
- description: "Unique identifier/ticker symbol for the commodity (e.g., XAU, NG-FUT)."
1389
+ 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
1390
  },
1094
1391
  name: {
1095
1392
  type: "string",
1096
1393
  description: "Full name of the commodity (e.g., Gold, Natural Gas Futures)."
1097
1394
  },
1395
+ description: {
1396
+ type: "string",
1397
+ description: "Short description of the commodity. May be an empty string for some symbols."
1398
+ },
1098
1399
  category: {
1099
1400
  type: "string",
1100
- description: "Category the commodity belongs to (e.g., Metals, Energy)."
1401
+ description: "Category the commodity belongs to (e.g., Metals, Energy, Agriculture, Industrial, Raw Materials, Oils and Meals, Textiles, Meats, Poultry, Livestock)."
1101
1402
  },
1102
1403
  status: {
1103
1404
  type: "string",
1104
- description: "Current status of the commodity. Value: active."
1405
+ enum: ["active", "inactive"],
1406
+ 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
1407
  },
1106
1408
  updateInterval: {
1107
1409
  type: "string",
1108
- description: "Rate at which the price is updated. Values: PER_SECOND, PER_MINUTE."
1410
+ enum: [
1411
+ "PER_SECOND",
1412
+ "PER_MINUTE",
1413
+ "PER_10_MINUTES",
1414
+ "PER_HOUR",
1415
+ "PER_DAY",
1416
+ "PER_WEEK",
1417
+ "PER_MONTH"
1418
+ ],
1419
+ description: "Rate at which the price is updated."
1420
+ },
1421
+ exchange: {
1422
+ type: "string",
1423
+ description: "Optional. Data source for the symbol (e.g., World Bank). Present only for some symbols."
1424
+ },
1425
+ deprecationDate: {
1426
+ type: "string",
1427
+ format: "date",
1428
+ description: "Optional. Present only when `status` is `inactive`. Date the symbol was deprecated (YYYY-MM-DD)."
1109
1429
  },
1110
1430
  currency: {
1111
1431
  $ref: "#/components/schemas/CommodityCurrency"
@@ -1174,8 +1494,8 @@ var commodity_time_series_default = {
1174
1494
  openapi: "3.1.1",
1175
1495
  info: {
1176
1496
  title: "Commodities Time Series API",
1177
- version: "1.0.0",
1178
- 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.",
1497
+ version: "2.0.0",
1498
+ description: "Retrieve daily OHLC (open, high, low, close) price data for any supported commodity over a date range of up to 365 days. Accepts one or more comma-separated commodity symbols with a start and end date in YYYY-MM-DD format. Returns a date-indexed object where each date key maps to per-symbol OHLC data. Non-trading days are automatically excluded, and only closing rates are available for monthly-updated commodities. A symbol is considered resolved if it appears on at least one date in the range; if some requested symbols can't be resolved at all, a 206 Partial Content response is returned with an `unresolved` object. Returns a 400 error for invalid dates or a range exceeding 365 days, and a 404 error for unsupported symbols or a date range with no available data.",
1179
1499
  contact: {
1180
1500
  name: "APIFreaks Support",
1181
1501
  url: "https://apifreaks.com/contact",
@@ -1184,7 +1504,7 @@ var commodity_time_series_default = {
1184
1504
  },
1185
1505
  servers: [
1186
1506
  {
1187
- url: "https://api.apifreaks.com/v1.0",
1507
+ url: "https://api.apifreaks.com/v2.0",
1188
1508
  description: "Commodity Time Series API Server"
1189
1509
  }
1190
1510
  ],
@@ -1287,6 +1607,62 @@ var commodity_time_series_default = {
1287
1607
  }
1288
1608
  }
1289
1609
  },
1610
+ "206": {
1611
+ description: "Partial Content \u2014 Some requested symbols could not be resolved",
1612
+ content: {
1613
+ "application/json": {
1614
+ schema: {
1615
+ $ref: "#/components/schemas/CommodityTimeSeriesResponse"
1616
+ },
1617
+ examples: {
1618
+ partial: {
1619
+ summary: "One valid symbol, one unresolved symbol",
1620
+ value: {
1621
+ success: true,
1622
+ startDate: "2025-01-06",
1623
+ endDate: "2025-01-08",
1624
+ rates: {
1625
+ "2025-01-06": {
1626
+ XAU: {
1627
+ open: 2649.01,
1628
+ high: 2651.33,
1629
+ low: 2645.36,
1630
+ close: 2646.91
1631
+ }
1632
+ },
1633
+ "2025-01-07": {
1634
+ XAU: {
1635
+ open: 2662.45,
1636
+ high: 2663.06,
1637
+ low: 2655.66,
1638
+ close: 2658.9
1639
+ }
1640
+ },
1641
+ "2025-01-08": {
1642
+ XAU: {
1643
+ open: 2669.69,
1644
+ high: 2674.68,
1645
+ low: 2668.58,
1646
+ close: 2671.8
1647
+ }
1648
+ }
1649
+ },
1650
+ unresolved: {
1651
+ FAKESYM: {
1652
+ message: "We don't support this symbol, please visit our symbols page to see supported symbols."
1653
+ }
1654
+ }
1655
+ }
1656
+ }
1657
+ }
1658
+ }
1659
+ },
1660
+ headers: {
1661
+ "X-AF-Credits-Cost": {
1662
+ $ref: "#/components/headers/X-AF-Credits-Cost"
1663
+ }
1664
+ }
1665
+ },
1290
1666
  "400": {
1291
1667
  description: "Bad Request \u2014 Missing parameters, invalid dates, or date range exceeded",
1292
1668
  content: {
@@ -1297,9 +1673,9 @@ var commodity_time_series_default = {
1297
1673
  value: {
1298
1674
  error: "Invalid Param Exception",
1299
1675
  message: "please pass correct parameters",
1300
- path: "/v1.0/commodity/time-series",
1676
+ path: "/v2.0/commodity/time-series",
1301
1677
  status: 400,
1302
- timestamp: "2026-07-27T11:38:40.063Z"
1678
+ timestamp: "2026-09-14T08:43:58.547Z"
1303
1679
  }
1304
1680
  },
1305
1681
  invalidDate: {
@@ -1344,6 +1720,33 @@ var commodity_time_series_default = {
1344
1720
  }
1345
1721
  }
1346
1722
  },
1723
+ "402": {
1724
+ description: "Payment Required \u2014 Maximum symbols per request exceeded",
1725
+ content: {
1726
+ "application/json": {
1727
+ schema: {
1728
+ $ref: "#/components/schemas/ErrorResponse"
1729
+ },
1730
+ examples: {
1731
+ maxSymbolsExceeded: {
1732
+ summary: "Too many symbols requested",
1733
+ value: {
1734
+ timestamp: "2026-09-14T08:44:00.586Z",
1735
+ path: "/rates/time-series",
1736
+ code: 402,
1737
+ error: "PAYMENT_REQUIRED",
1738
+ message: "Maximum symbols per request exceeded"
1739
+ }
1740
+ }
1741
+ }
1742
+ }
1743
+ },
1744
+ headers: {
1745
+ "X-AF-Credits-Cost": {
1746
+ $ref: "#/components/headers/X-AF-Credits-Cost"
1747
+ }
1748
+ }
1749
+ },
1347
1750
  "404": {
1348
1751
  description: "Not found - Symbol or data not available",
1349
1752
  content: {
@@ -1355,17 +1758,22 @@ var commodity_time_series_default = {
1355
1758
  symbolNotFound: {
1356
1759
  summary: "Symbol Not Found",
1357
1760
  value: {
1358
- timestamp: "2026-07-27T11:38:41.234Z",
1761
+ timestamp: "2026-09-14T08:44:00.586Z",
1359
1762
  path: "/rates/time-series",
1360
1763
  code: 404,
1361
1764
  error: "SYMBOL_NOT_FOUND",
1362
- message: "The symbol is not supported, please visit the documentation for a list of supported symbols"
1765
+ message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
1766
+ unresolved: {
1767
+ FAKESYM: {
1768
+ message: "We don't support this symbol, please visit our symbols page to see supported symbols."
1769
+ }
1770
+ }
1363
1771
  }
1364
1772
  },
1365
1773
  dataNotFound: {
1366
1774
  summary: "No data available for the given date range",
1367
1775
  value: {
1368
- timestamp: "2026-07-27T11:38:41.234Z",
1776
+ timestamp: "2026-09-14T08:44:31.547Z",
1369
1777
  path: "/rates/time-series",
1370
1778
  code: 404,
1371
1779
  error: "DATA_NOT_FOUND",
@@ -1419,6 +1827,26 @@ var commodity_time_series_default = {
1419
1827
  },
1420
1828
  rates: {
1421
1829
  $ref: "#/components/schemas/CommodityTimeSeriesRates"
1830
+ },
1831
+ unresolved: {
1832
+ type: "object",
1833
+ 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.",
1834
+ additionalProperties: {
1835
+ type: "object",
1836
+ properties: {
1837
+ message: {
1838
+ type: "string",
1839
+ description: "Detail message explaining why this symbol was not resolved."
1840
+ },
1841
+ suggestions: {
1842
+ type: "array",
1843
+ description: "Optional list of supported symbols that closely match the unresolved symbol.",
1844
+ items: {
1845
+ type: "string"
1846
+ }
1847
+ }
1848
+ }
1849
+ }
1422
1850
  }
1423
1851
  },
1424
1852
  description: "Commodity time series response containing date-indexed OHLC data per symbol."
@@ -1491,6 +1919,26 @@ var commodity_time_series_default = {
1491
1919
  type: "string",
1492
1920
  format: "date-time",
1493
1921
  description: "Timestamp when the error occurred (ISO 8601)."
1922
+ },
1923
+ unresolved: {
1924
+ type: "object",
1925
+ description: "Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
1926
+ additionalProperties: {
1927
+ type: "object",
1928
+ properties: {
1929
+ message: {
1930
+ type: "string",
1931
+ description: "Detail message explaining why this symbol was not resolved."
1932
+ },
1933
+ suggestions: {
1934
+ type: "array",
1935
+ description: "Optional list of supported symbols that closely match the unresolved symbol.",
1936
+ items: {
1937
+ type: "string"
1938
+ }
1939
+ }
1940
+ }
1941
+ }
1494
1942
  }
1495
1943
  }
1496
1944
  }
@@ -1519,8 +1967,8 @@ var historical_commodity_prices_default = {
1519
1967
  openapi: "3.1.1",
1520
1968
  info: {
1521
1969
  title: "Historical Commodity Prices, Delivered Simply.",
1522
- version: "1.0.0",
1523
- 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.",
1970
+ version: "2.0.0",
1971
+ description: "Retrieve OHLC (open, high, low, close) price data for any supported commodity on a specific date. Data is available from January 1990 onwards for 245+ commodities, and only closing rates are available for monthly-updated commodities. If a commodity has no rate on the requested date, the API falls back to the last available rate before that date and returns it along with its actual date. Accepts one or more comma-separated commodity symbols and a date in YYYY-MM-DD format. If some requested symbols can't be resolved (unsupported, or no rate on or before the requested date), a 206 Partial Content response is returned with the resolved rates plus an `unresolved` object. Returns a 400 error for invalid dates and a 404 error for unsupported symbols or missing rates.",
1524
1972
  contact: {
1525
1973
  name: "APIFreaks Support",
1526
1974
  url: "https://apifreaks.com/contact",
@@ -1529,7 +1977,7 @@ var historical_commodity_prices_default = {
1529
1977
  },
1530
1978
  servers: [
1531
1979
  {
1532
- url: "https://api.apifreaks.com/v1.0",
1980
+ url: "https://api.apifreaks.com/v2.0",
1533
1981
  description: "Historical Commodity Prices API Server"
1534
1982
  }
1535
1983
  ],
@@ -1612,32 +2060,107 @@ var historical_commodity_prices_default = {
1612
2060
  }
1613
2061
  }
1614
2062
  },
2063
+ "206": {
2064
+ description: "Partial Content \u2014 Some requested symbols could not be resolved",
2065
+ content: {
2066
+ "application/json": {
2067
+ schema: {
2068
+ $ref: "#/components/schemas/HistoricalCommodityPricesResponse"
2069
+ },
2070
+ examples: {
2071
+ partial: {
2072
+ summary: "One valid symbol, one unresolved symbol",
2073
+ value: {
2074
+ success: true,
2075
+ date: "2025-01-10",
2076
+ rates: {
2077
+ XAU: {
2078
+ date: "2025-01-10",
2079
+ open: 2669.93,
2080
+ high: 2697.85,
2081
+ low: 2663.61,
2082
+ close: 2689.44
2083
+ }
2084
+ },
2085
+ unresolved: {
2086
+ FAKESYM: {
2087
+ message: "We don't support this symbol, please visit our symbols page to see supported symbols."
2088
+ }
2089
+ }
2090
+ }
2091
+ }
2092
+ }
2093
+ }
2094
+ },
2095
+ headers: {
2096
+ "X-AF-Credits-Cost": {
2097
+ $ref: "#/components/headers/X-AF-Credits-Cost"
2098
+ }
2099
+ }
2100
+ },
1615
2101
  "400": {
1616
- description: "Bad request - Invalid date format",
2102
+ description: "Bad Request \u2014 Missing parameters or invalid date",
1617
2103
  content: {
1618
2104
  "application/json": {
1619
2105
  schema: {
1620
2106
  $ref: "#/components/schemas/ErrorResponse"
1621
2107
  },
1622
2108
  examples: {
2109
+ missingSymbols: {
2110
+ summary: "Missing required symbols parameter",
2111
+ value: {
2112
+ error: "Invalid Param Exception",
2113
+ message: "please pass correct parameters",
2114
+ path: "/v2.0/commodity/rates/historical",
2115
+ status: 400,
2116
+ timestamp: "2026-09-14T08:44:32.013Z"
2117
+ }
2118
+ },
1623
2119
  invalidDateFormat: {
1624
2120
  summary: "Invalid date format",
1625
2121
  value: {
1626
- timestamp: 1781792620618,
1627
- status: 400,
2122
+ timestamp: "2026-09-14T08:45:13.934Z",
2123
+ path: "/rates/historical",
2124
+ code: 400,
1628
2125
  error: "VALIDATION_ERROR",
1629
- message: "Invalid Date Format (YYYY-MM-DD).",
1630
- path: "/v1.0/commodity/rates/historical"
2126
+ message: "Invalid Date Format (YYYY-MM-DD)."
1631
2127
  }
1632
2128
  },
1633
2129
  dateNotExist: {
1634
2130
  summary: "Date does not exist",
1635
2131
  value: {
1636
- timestamp: 1781792620618,
1637
- status: 400,
2132
+ timestamp: "2026-09-14T08:44:01.487Z",
2133
+ path: "/rates/historical",
2134
+ code: 400,
1638
2135
  error: "VALIDATION_ERROR",
1639
- message: "Invalid Date: The provided date does not exist.",
1640
- path: "/v1.0/commodity/rates/historical"
2136
+ message: "Invalid Date: The provided date does not exist."
2137
+ }
2138
+ }
2139
+ }
2140
+ }
2141
+ },
2142
+ headers: {
2143
+ "X-AF-Credits-Cost": {
2144
+ $ref: "#/components/headers/X-AF-Credits-Cost"
2145
+ }
2146
+ }
2147
+ },
2148
+ "402": {
2149
+ description: "Payment Required \u2014 Maximum symbols per request exceeded",
2150
+ content: {
2151
+ "application/json": {
2152
+ schema: {
2153
+ $ref: "#/components/schemas/ErrorResponse"
2154
+ },
2155
+ examples: {
2156
+ maxSymbolsExceeded: {
2157
+ summary: "Too many symbols requested",
2158
+ value: {
2159
+ timestamp: "2026-09-14T08:44:01.978Z",
2160
+ path: "/rates/historical",
2161
+ code: 402,
2162
+ error: "PAYMENT_REQUIRED",
2163
+ message: "Maximum symbols per request exceeded"
1641
2164
  }
1642
2165
  }
1643
2166
  }
@@ -1660,21 +2183,26 @@ var historical_commodity_prices_default = {
1660
2183
  symbolNotFound: {
1661
2184
  summary: "Symbol Not Found",
1662
2185
  value: {
1663
- timestamp: 1781792620618,
1664
- status: 404,
2186
+ timestamp: "2026-09-14T08:44:01.978Z",
2187
+ path: "/rates/historical",
2188
+ code: 404,
1665
2189
  error: "SYMBOL_NOT_FOUND",
1666
2190
  message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
1667
- path: "/v1.0/commodity/rates/historical"
2191
+ unresolved: {
2192
+ FAKESYM: {
2193
+ message: "We don't support this symbol, please visit our symbols page to see supported symbols."
2194
+ }
2195
+ }
1668
2196
  }
1669
2197
  },
1670
2198
  rateNotFound: {
1671
2199
  summary: "Rate Not Found",
1672
2200
  value: {
1673
- timestamp: 1781792620618,
1674
- status: 404,
2201
+ timestamp: "2026-09-14T08:44:02.528Z",
2202
+ path: "/rates/historical",
2203
+ code: 404,
1675
2204
  error: "RATE_NOT_FOUND",
1676
- message: "no rates found for the specified date",
1677
- path: "/v1.0/commodity/rates/historical"
2205
+ message: "no rates found for the specified date"
1678
2206
  }
1679
2207
  }
1680
2208
  }
@@ -1720,6 +2248,26 @@ var historical_commodity_prices_default = {
1720
2248
  },
1721
2249
  rates: {
1722
2250
  $ref: "#/components/schemas/HistoricalCommodityRates"
2251
+ },
2252
+ unresolved: {
2253
+ type: "object",
2254
+ 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.",
2255
+ additionalProperties: {
2256
+ type: "object",
2257
+ properties: {
2258
+ message: {
2259
+ type: "string",
2260
+ description: "Detail message explaining why this symbol was not resolved."
2261
+ },
2262
+ suggestions: {
2263
+ type: "array",
2264
+ description: "Optional list of supported symbols that closely match the unresolved symbol.",
2265
+ items: {
2266
+ type: "string"
2267
+ }
2268
+ }
2269
+ }
2270
+ }
1723
2271
  }
1724
2272
  },
1725
2273
  description: "Historical commodity prices response containing success status, date, and OHLC rate data."
@@ -1741,7 +2289,7 @@ var historical_commodity_prices_default = {
1741
2289
  properties: {
1742
2290
  date: {
1743
2291
  type: "string",
1744
- description: "Date for which prices were fetched (YYYY-MM-DD)."
2292
+ 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."
1745
2293
  },
1746
2294
  open: {
1747
2295
  type: "number",
@@ -1767,19 +2315,12 @@ var historical_commodity_prices_default = {
1767
2315
  },
1768
2316
  ErrorResponse: {
1769
2317
  type: "object",
1770
- required: ["timestamp", "status", "error", "message", "path"],
2318
+ 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.",
2319
+ required: ["message"],
1771
2320
  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
2321
  error: {
1781
2322
  type: "string",
1782
- description: "Specific error type (e.g., SYMBOL_NOT_FOUND, VALIDATION_ERROR)."
2323
+ description: "Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, RATE_NOT_FOUND)."
1783
2324
  },
1784
2325
  message: {
1785
2326
  type: "string",
@@ -1787,10 +2328,42 @@ var historical_commodity_prices_default = {
1787
2328
  },
1788
2329
  path: {
1789
2330
  type: "string",
1790
- description: "API endpoint path that produced the error."
2331
+ description: "API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error."
2332
+ },
2333
+ status: {
2334
+ type: "integer",
2335
+ description: "HTTP status code. Present on gateway-level errors."
2336
+ },
2337
+ code: {
2338
+ type: "integer",
2339
+ description: "HTTP status code. Present on commodity-service errors instead of status."
2340
+ },
2341
+ timestamp: {
2342
+ type: "string",
2343
+ format: "date-time",
2344
+ description: "Timestamp when the error occurred (ISO 8601)."
2345
+ },
2346
+ unresolved: {
2347
+ type: "object",
2348
+ description: "Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
2349
+ additionalProperties: {
2350
+ type: "object",
2351
+ properties: {
2352
+ message: {
2353
+ type: "string",
2354
+ description: "Detail message explaining why this symbol was not resolved."
2355
+ },
2356
+ suggestions: {
2357
+ type: "array",
2358
+ description: "Optional list of supported symbols that closely match the unresolved symbol.",
2359
+ items: {
2360
+ type: "string"
2361
+ }
2362
+ }
2363
+ }
2364
+ }
1791
2365
  }
1792
- },
1793
- description: "Standard error envelope returned by the API on failed requests."
2366
+ }
1794
2367
  }
1795
2368
  },
1796
2369
  headers: {
@@ -49553,11 +50126,11 @@ var SPECS = {
49553
50126
  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
50127
  var SPECS_YAML = {
49555
50128
  "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: 1.0.0\n description: List all supported commodity symbols available in the APIFreaks Commodity API. Returns an array of commodity objects with symbol, name, category, pricing currency, unit of measurement, status, and update interval. Supports metals, energy, agriculture, and livestock categories.\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 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 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).\n name:\n type: string\n description: Full name of the commodity (e.g., Gold, Natural Gas Futures).\n category:\n type: string\n description: Category the commodity belongs to (e.g., Metals, Energy).\n status:\n type: string\n description: 'Current status of the commodity. Value: active.'\n updateInterval:\n type: string\n description: 'Rate at which the price is updated. Values: PER_SECOND, PER_MINUTE.'\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",
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",
50129
+ "commodity-fluctuation": "openapi: 3.1.1\ninfo:\n title: 'Commodity Fluctuation API '\n version: 2.0.0\n description: Calculate price change and percentage movement for any commodity over a custom date range. Returns the opening price, closing price, absolute change, and percentage change for each symbol, rounded to 2 decimal places. For monthly-updated commodities, the fluctuation is computed between the first day of the start month and the first day of the end month. There is no limit on the date range. Accepts one or more comma-separated commodity symbols with a start and end date in YYYY-MM-DD format. If some requested symbols can't be resolved, a 206 Partial Content response is returned with the resolved rates plus an `unresolved` object. Returns a 400 error for invalid dates or a date range where start is after end, and a 404 error for unsupported symbols or a date range with no available data.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v2.0\n description: Commodity Fluctuation API Server\npaths:\n /commodity/fluctuation:\n get:\n tags:\n - Commodity APIs\n summary: Get commodity price fluctuations\n description: Returns price fluctuation metrics (start, end, change, percent change) for the requested commodity symbols over a date range.\n operationId: getCommodityFluctuation\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols.\n schema:\n type: string\n - name: startDate\n in: query\n required: true\n description: Start date in `YYYY-MM-DD` format.\n schema:\n type: string\n - name: endDate\n in: query\n required: true\n description: End date in `YYYY-MM-DD` format.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityFluctuationResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n startDate: '2024-01-01'\n endDate: '2024-01-31'\n rates:\n WTIOIL-SPOT:\n startRate: 72.02\n endRate: 75.81\n change: 3.79\n changePercent: 5.26\n XAU:\n startRate: 2063.63\n endRate: 2039.83\n change: -23.8\n changePercent: -1.15\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '206':\n description: Partial Content \u2014 Some requested symbols could not be resolved\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityFluctuationResponse'\n examples:\n partial:\n summary: One valid symbol, one unresolved symbol\n value:\n success: true\n startDate: '2024-01-01'\n endDate: '2024-01-31'\n rates:\n XAU:\n startRate: 2063.63\n endRate: 2039.83\n change: -23.8\n changePercent: -1.15\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad Request \u2014 Missing parameters or invalid dates\n content:\n application/json:\n examples:\n missingSymbols:\n summary: Missing required symbols parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v2.0/commodity/fluctuation\n status: 400\n timestamp: '2026-09-14T08:43:46.481Z'\n invalidDateFormat:\n summary: Date is not in YYYY-MM-DD format\n value:\n timestamp: '2026-07-27T11:37:22.687Z'\n path: /rates/fluctuation\n code: 400\n error: VALIDATION_ERROR\n message: Invalid Date Format (YYYY-MM-DD).\n dateNotExist:\n summary: Date does not exist on the calendar (e.g. Feb 30)\n value:\n timestamp: '2026-07-27T11:37:33.565Z'\n path: /rates/fluctuation\n code: 400\n error: VALIDATION_ERROR\n message: 'Invalid Date: The provided start date or end date does not exist.'\n startAfterEnd:\n summary: startDate is after endDate\n value:\n timestamp: '2026-07-27T11:37:23.206Z'\n path: /rates/fluctuation\n code: 400\n error: VALIDATION_ERROR\n message: Start date cannot be after end date\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '402':\n description: Payment Required \u2014 Maximum symbols per request exceeded\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n maxSymbolsExceeded:\n summary: Too many symbols requested\n value:\n timestamp: '2026-09-14T08:43:48.408Z'\n path: /rates/fluctuation\n code: 402\n error: PAYMENT_REQUIRED\n message: Maximum symbols per request exceeded\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or data not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: '2026-09-14T08:43:48.408Z'\n path: /rates/fluctuation\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n noData:\n summary: No data available for the given date range\n value:\n timestamp: '2026-09-14T08:44:31.022Z'\n path: /rates/fluctuation\n code: 404\n error: DATA_NOT_FOUND\n message: No data found for the given date range\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n CommodityFluctuationResponse:\n type: object\n required:\n - success\n - startDate\n - endDate\n - rates\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n startDate:\n type: string\n description: Start date of the interval (YYYY-MM-DD).\n endDate:\n type: string\n description: End date of the interval (YYYY-MM-DD).\n rates:\n $ref: '#/components/schemas/CommodityFluctuationRates'\n unresolved:\n type: object\n description: Present only on a 206 Partial Content response, when some requested symbols could not be resolved. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n description: Commodity fluctuation response containing price change data per symbol over a date range.\n CommodityFluctuationRates:\n type: object\n description: Map of requested commodity symbols to their fluctuation metrics. Each key is a commodity symbol (e.g. XAU).\n additionalProperties:\n title: CommodityFluctuationItem\n type: object\n description: Fluctuation metrics for a single commodity over a date range.\n required:\n - startRate\n - endRate\n - change\n - changePercent\n properties:\n startRate:\n type: number\n format: float\n description: Price of the commodity on the start date.\n endRate:\n type: number\n format: float\n description: Price of the commodity on the end date.\n change:\n type: number\n format: float\n description: Absolute price difference between end and start dates. May be negative.\n changePercent:\n type: number\n format: float\n description: Percentage price change from start to end date. May be negative.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests. Gateway-level validation errors populate status; commodity-service errors (date/symbol/data validation) populate code instead \u2014 check whichever is present.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, DATA_NOT_FOUND).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error.\n status:\n type: integer\n description: HTTP status code. Present on gateway-level errors.\n code:\n type: integer\n description: HTTP status code. Present on commodity-service errors instead of status.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n unresolved:\n type: object\n description: Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
50130
+ "commodity-prices": "openapi: 3.1.1\ninfo:\n title: Live Commodity Prices API - Real Time Market Insights\n version: 2.0.0\n description: Get real-time prices for 245+ commodities in a single request. Returns current market prices for each requested symbol plus unit and quote currency metadata. Supports an optional quote parameter to convert prices into a desired currency, defaulting to each commodity's native market currency. Accepts 10-minute or 1-minute update frequencies for price freshness. If some requested symbols can't be resolved, a 206 Partial Content response is returned with the resolved rates plus an `unresolved` object; if none resolve, a 404 is returned instead. An unsupported quote currency also returns a 404.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v2.0\n description: Live Commodity Prices API Server\npaths:\n /commodity/rates/latest:\n get:\n tags:\n - Commodity APIs\n summary: Get latest commodity prices\n description: Returns the current live price for the requested commodity symbols.\n operationId: getLatestCommodityPrices\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols (e.g., `XAU`, `WTIOIL-SPOT`).\n schema:\n type: string\n - name: updates\n in: query\n required: true\n description: 'Update frequency. Accepted values: `10m` (default), `1m`.'\n schema:\n type: string\n enum:\n - 10m\n - 1m\n default: 10m\n - name: quote\n in: query\n required: false\n description: Target currency for the exchange rate. Defaults to the market currency of each commodity.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/LiveCommodityPricesResponse'\n examples:\n success:\n summary: Successful response (10m update frequency)\n value:\n success: true\n timestamp: 1789375397\n rates:\n XAU: 4313.04\n WTIOIL-SPOT: 100\n metadata:\n XAU:\n unit: T.oz\n quote: USD\n WTIOIL-SPOT:\n unit: Bbl\n quote: USD\n withQuoteConversion:\n summary: Price converted to a target quote currency\n value:\n success: true\n timestamp: 1789375426\n rates:\n XAU: 3739.023\n metadata:\n XAU:\n unit: T.oz\n quote: EUR\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '206':\n description: Partial Content \u2014 Some requested symbols could not be resolved\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/LiveCommodityPricesResponse'\n examples:\n partial:\n summary: One valid symbol, one unresolved symbol\n value:\n success: true\n timestamp: 1789376193\n rates:\n XAU: 4311.88\n metadata:\n XAU:\n unit: T.oz\n quote: USD\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n partialWithSuggestions:\n summary: Unresolved symbol with close-match suggestions\n value:\n success: true\n timestamp: 1789376644\n rates:\n XAU: 4306.06\n metadata:\n XAU:\n unit: T.oz\n quote: USD\n unresolved:\n ZW:\n message: Did you mean ZW-SPOT (Wheat Spot) or ZW-FUT (Wheat Futures)?\n suggestions:\n - ZW-SPOT\n - ZW-FUT\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad Request \u2014 Missing or invalid query parameters\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n missingSymbols:\n summary: Missing required symbols parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v2.0/commodity/rates/latest\n status: 400\n timestamp: '2026-09-14T08:43:43.964Z'\n invalidUpdates:\n summary: updates is not 10m or 1m\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v2.0/commodity/rates/latest\n status: 400\n timestamp: '2026-09-14T08:43:44.440Z'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '402':\n description: Payment Required \u2014 Maximum symbols per request exceeded\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityNotFoundError'\n examples:\n maxSymbolsExceeded:\n summary: Too many symbols requested\n value:\n timestamp: '2026-09-14T08:43:44.957Z'\n path: /rates/latestRates\n code: 402\n error: PAYMENT_REQUIRED\n message: Maximum symbols per request exceeded\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or quote currency not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityNotFoundError'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: '2026-09-14T08:43:44.957Z'\n path: /rates/latestRates\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n symbolNotFoundWithSuggestions:\n summary: Symbol Not Found, with close-match suggestions\n value:\n timestamp: '2026-09-14T09:04:04.878Z'\n path: /rates/latestRates\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n unresolved:\n ZW:\n message: Did you mean ZW-SPOT (Wheat Spot) or ZW-FUT (Wheat Futures)?\n suggestions:\n - ZW-SPOT\n - ZW-FUT\n quoteNotFound:\n summary: Quote Currency Not Found\n value:\n timestamp: '2026-09-14T08:43:45.461Z'\n path: /rates/latestRates\n code: 404\n error: QUOTE_NOT_FOUND\n message: The quote currency is invalid, please visit the documentation for a list of valid quote currencies\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n LiveCommodityPricesResponse:\n type: object\n required:\n - success\n - timestamp\n - rates\n - metadata\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n timestamp:\n type: integer\n description: Unix timestamp (seconds) indicating when the response was generated.\n rates:\n $ref: '#/components/schemas/CommodityRates'\n metadata:\n $ref: '#/components/schemas/CommodityMetadata'\n unresolved:\n type: object\n description: Present only on a 206 Partial Content response, when some requested symbols could not be resolved. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n warning:\n type: string\n description: Present only when currency conversion for the requested `quote` is temporarily unavailable; rates are returned in each commodity's default currency instead.\n description: Live commodity prices response containing success status, timestamp, rates, and metadata.\n CommodityRates:\n type: object\n description: Map of requested commodity symbols to their current live price. Each key is a commodity symbol (e.g. XAU); the value is the current price.\n additionalProperties:\n title: CommodityPrice\n type: number\n description: Current live price for this commodity symbol.\n CommodityMetadata:\n type: object\n description: Map of requested commodity symbols to their unit and quote currency metadata. Each key is a commodity symbol (e.g. XAU).\n additionalProperties:\n title: CommodityMetadataItem\n type: object\n description: Unit and currency metadata for a single commodity.\n required:\n - unit\n - quote\n properties:\n unit:\n type: string\n description: Unit of measurement for the commodity (e.g., Bbl, T.oz).\n quote:\n type: string\n description: Quote currency used for this commodity's price.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type.\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path that produced the error.\n status:\n type: integer\n description: HTTP status code returned with the error.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n CommodityNotFoundError:\n type: object\n description: Error envelope returned by the commodity pricing service specifically for unresolvable symbol/quote errors. Uses `code` instead of `status` and an ISO 8601 `timestamp`, unlike the standard ErrorResponse.\n required:\n - code\n - error\n - message\n properties:\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n path:\n type: string\n description: Internal service path that produced the error.\n code:\n type: integer\n description: HTTP status code returned with the error.\n error:\n type: string\n description: Specific error type (e.g., SYMBOL_NOT_FOUND, QUOTE_NOT_FOUND).\n message:\n type: string\n description: Human-readable error message describing the failure.\n unresolved:\n type: object\n description: Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
50131
+ "commodity-symbols": "openapi: 3.1.1\ninfo:\n title: Commodity Symbols API Reference\n version: 2.0.0\n description: 'List all supported commodity symbols available in the APIFreaks Commodity API. Returns an array of commodity objects with symbol, name, category, pricing currency, unit of measurement, status, and update interval. Supports metals, energy, agriculture, industrial, raw materials, oils and meals, textiles, meats, poultry, and livestock categories across 245+ commodities. Deprecated symbols are included with `status: \"inactive\"` and a `deprecationDate`; historical rates remain available for them up to their deprecation date, but latest rates do not.'\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v2.0\n description: Commodity Symbols API Server\npaths:\n /commodity/symbols:\n get:\n tags:\n - Commodity APIs\n summary: Get all supported commodity symbols\n description: Returns the list of supported commodity symbols with metadata.\n operationId: getCommoditySymbols\n parameters:\n - name: format\n in: query\n required: false\n description: 'Response format. Accepted values: `json` (default) or `xml`.'\n schema:\n type: string\n enum:\n - json\n default: json\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommoditySymbolsResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n symbols:\n - symbol: XAU\n name: Gold\n category: Metals\n status: active\n updateInterval: PER_SECOND\n currency:\n code: USD\n name: US Dollar\n symbol: $\n unit:\n symbol: T.oz\n name: Troy Ounce\n - symbol: NG-FUT\n name: Natural Gas Futures\n category: Energy\n status: active\n updateInterval: PER_MINUTE\n currency:\n code: USD\n name: US Dollar\n symbol: $\n unit:\n symbol: MMBtu\n name: Million British Thermal Units\n - symbol: NG-EU\n name: Natural Gas, Europe\n category: Energy\n status: active\n updateInterval: PER_MONTH\n exchange: World Bank\n currency:\n code: USD\n name: US Dollar\n symbol: $\n unit:\n symbol: MMBtu\n name: Million British Thermal Units\n - symbol: UANEU\n name: Urea Ammonium Nitrate\n category: Industrial\n status: inactive\n updateInterval: PER_MINUTE\n deprecationDate: '2024-04-14'\n currency:\n code: USD\n name: US Dollar\n symbol: $\n unit:\n symbol: T\n name: Metric Ton\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n CommoditySymbolsResponse:\n type: object\n required:\n - success\n - symbols\n properties:\n success:\n type: boolean\n description: Indicates whether the API request was successful.\n symbols:\n type: array\n description: Array of commodity symbol objects with metadata.\n items:\n $ref: '#/components/schemas/CommoditySymbolItem'\n description: Commodity symbols response containing an array of supported commodity symbol objects.\n CommoditySymbolItem:\n type: object\n description: A single commodity symbol with metadata.\n required:\n - symbol\n - name\n - category\n - status\n - updateInterval\n - currency\n - unit\n properties:\n symbol:\n type: string\n description: Unique identifier/ticker symbol for the commodity (e.g., XAU, NG-FUT). Use this value in the `symbols` parameter of the rate endpoints.\n name:\n type: string\n description: Full name of the commodity (e.g., Gold, Natural Gas Futures).\n description:\n type: string\n description: Short description of the commodity. May be an empty string for some symbols.\n category:\n type: string\n description: Category the commodity belongs to (e.g., Metals, Energy, Agriculture, Industrial, Raw Materials, Oils and Meals, Textiles, Meats, Poultry, Livestock).\n status:\n type: string\n enum:\n - active\n - inactive\n description: 'Current status of the commodity. `inactive` means the symbol is deprecated: latest rates are unavailable, but historical rates remain available up to its `deprecationDate`.'\n updateInterval:\n type: string\n enum:\n - PER_SECOND\n - PER_MINUTE\n - PER_10_MINUTES\n - PER_HOUR\n - PER_DAY\n - PER_WEEK\n - PER_MONTH\n description: Rate at which the price is updated.\n exchange:\n type: string\n description: Optional. Data source for the symbol (e.g., World Bank). Present only for some symbols.\n deprecationDate:\n type: string\n format: date\n description: Optional. Present only when `status` is `inactive`. Date the symbol was deprecated (YYYY-MM-DD).\n currency:\n $ref: '#/components/schemas/CommodityCurrency'\n unit:\n $ref: '#/components/schemas/CommodityUnit'\n CommodityCurrency:\n type: object\n description: Currency information for a commodity.\n required:\n - code\n - name\n - symbol\n properties:\n code:\n type: string\n description: ISO 4217 currency code.\n name:\n type: string\n description: Full name of the currency.\n symbol:\n type: string\n description: Symbol of the currency (e.g., $).\n CommodityUnit:\n type: object\n description: Unit of measurement for a commodity.\n required:\n - symbol\n - name\n properties:\n symbol:\n type: string\n description: Abbreviated unit symbol (e.g., T.oz, MMBtu).\n name:\n type: string\n description: Full name of the unit of measurement (e.g., Troy Ounce).\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
50132
+ "commodity-time-series": "openapi: 3.1.1\ninfo:\n title: Commodities Time Series API\n version: 2.0.0\n description: Retrieve daily OHLC (open, high, low, close) price data for any supported commodity over a date range of up to 365 days. Accepts one or more comma-separated commodity symbols with a start and end date in YYYY-MM-DD format. Returns a date-indexed object where each date key maps to per-symbol OHLC data. Non-trading days are automatically excluded, and only closing rates are available for monthly-updated commodities. A symbol is considered resolved if it appears on at least one date in the range; if some requested symbols can't be resolved at all, a 206 Partial Content response is returned with an `unresolved` object. Returns a 400 error for invalid dates or a range exceeding 365 days, and a 404 error for unsupported symbols or a date range with no available data.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v2.0\n description: Commodity Time Series API Server\npaths:\n /commodity/time-series:\n get:\n tags:\n - Commodity APIs\n summary: Get commodity price time series\n description: Returns day-by-day OHLC data for the requested commodity symbols within a date range.\n operationId: getCommodityTimeSeries\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols.\n schema:\n type: string\n - name: startDate\n in: query\n required: true\n description: Start date in `YYYY-MM-DD` format.\n schema:\n type: string\n - name: endDate\n in: query\n required: true\n description: End date in `YYYY-MM-DD` format. Maximum range is 365 days.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityTimeSeriesResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n startDate: '2025-01-06'\n endDate: '2025-01-08'\n rates:\n '2025-01-06':\n XAU:\n open: 2649.01\n high: 2651.33\n low: 2645.36\n close: 2646.91\n '2025-01-07':\n XAU:\n open: 2662.45\n high: 2663.06\n low: 2655.66\n close: 2658.9\n '2025-01-08':\n XAU:\n open: 2669.69\n high: 2674.68\n low: 2668.58\n close: 2671.8\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '206':\n description: Partial Content \u2014 Some requested symbols could not be resolved\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityTimeSeriesResponse'\n examples:\n partial:\n summary: One valid symbol, one unresolved symbol\n value:\n success: true\n startDate: '2025-01-06'\n endDate: '2025-01-08'\n rates:\n '2025-01-06':\n XAU:\n open: 2649.01\n high: 2651.33\n low: 2645.36\n close: 2646.91\n '2025-01-07':\n XAU:\n open: 2662.45\n high: 2663.06\n low: 2655.66\n close: 2658.9\n '2025-01-08':\n XAU:\n open: 2669.69\n high: 2674.68\n low: 2668.58\n close: 2671.8\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad Request \u2014 Missing parameters, invalid dates, or date range exceeded\n content:\n application/json:\n examples:\n missingSymbols:\n summary: Missing required symbols parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v2.0/commodity/time-series\n status: 400\n timestamp: '2026-09-14T08:43:58.547Z'\n invalidDate:\n summary: Date does not exist on the calendar\n value:\n timestamp: '2026-07-27T11:38:41.234Z'\n path: /rates/time-series\n code: 400\n error: VALIDATION_ERROR\n message: 'Invalid Date: The provided start date or end date does not exist.'\n startAfterEnd:\n summary: startDate is after endDate\n value:\n timestamp: '2026-07-27T11:38:41.234Z'\n path: /rates/time-series\n code: 400\n error: VALIDATION_ERROR\n message: start date cannot be after end date\n dateRangeExceeded:\n summary: Date range exceeds 365 days\n value:\n timestamp: '2026-07-27T11:38:40.699Z'\n path: /rates/time-series\n code: 400\n error: VALIDATION_ERROR\n message: Date range exceeds the allowed limit.\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '402':\n description: Payment Required \u2014 Maximum symbols per request exceeded\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n maxSymbolsExceeded:\n summary: Too many symbols requested\n value:\n timestamp: '2026-09-14T08:44:00.586Z'\n path: /rates/time-series\n code: 402\n error: PAYMENT_REQUIRED\n message: Maximum symbols per request exceeded\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or data not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: '2026-09-14T08:44:00.586Z'\n path: /rates/time-series\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n dataNotFound:\n summary: No data available for the given date range\n value:\n timestamp: '2026-09-14T08:44:31.547Z'\n path: /rates/time-series\n code: 404\n error: DATA_NOT_FOUND\n message: No data found for the specified date range\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n CommodityTimeSeriesResponse:\n type: object\n required:\n - success\n - startDate\n - endDate\n - rates\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n startDate:\n type: string\n description: Start date of the time series (YYYY-MM-DD).\n endDate:\n type: string\n description: End date of the time series (YYYY-MM-DD).\n rates:\n $ref: '#/components/schemas/CommodityTimeSeriesRates'\n unresolved:\n type: object\n description: Present only on a 206 Partial Content response, when some requested symbols could not be resolved on any date in the range. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n description: Commodity time series response containing date-indexed OHLC data per symbol.\n CommodityTimeSeriesRates:\n type: object\n description: Map of trading dates to per-symbol OHLC data. Each key is a trading date (YYYY-MM-DD); non-trading days are excluded.\n additionalProperties:\n title: CommodityTimeSeriesSymbolData\n type: object\n description: Map of commodity symbols to their OHLC data for a single trading date. Each key is a commodity symbol (e.g. XAU).\n additionalProperties:\n $ref: '#/components/schemas/CommodityOhlc'\n CommodityOhlc:\n type: object\n description: OHLC price data for a single commodity on a single trading day.\n required:\n - open\n - high\n - low\n - close\n properties:\n open:\n type: number\n format: float\n description: Opening price on the given date.\n high:\n type: number\n format: float\n description: Highest price on the given date.\n low:\n type: number\n format: float\n description: Lowest price on the given date.\n close:\n type: number\n format: float\n description: Closing price on the given date.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests. Gateway-level validation errors populate status; commodity-service errors (date/symbol/data validation) populate code instead \u2014 check whichever is present.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, DATA_NOT_FOUND).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error.\n status:\n type: integer\n description: HTTP status code. Present on gateway-level errors.\n code:\n type: integer\n description: HTTP status code. Present on commodity-service errors instead of status.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n unresolved:\n type: object\n description: Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
50133
+ "historical-commodity-prices": "openapi: 3.1.1\ninfo:\n title: Historical Commodity Prices, Delivered Simply.\n version: 2.0.0\n description: Retrieve OHLC (open, high, low, close) price data for any supported commodity on a specific date. Data is available from January 1990 onwards for 245+ commodities, and only closing rates are available for monthly-updated commodities. If a commodity has no rate on the requested date, the API falls back to the last available rate before that date and returns it along with its actual date. Accepts one or more comma-separated commodity symbols and a date in YYYY-MM-DD format. If some requested symbols can't be resolved (unsupported, or no rate on or before the requested date), a 206 Partial Content response is returned with the resolved rates plus an `unresolved` object. Returns a 400 error for invalid dates and a 404 error for unsupported symbols or missing rates.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v2.0\n description: Historical Commodity Prices API Server\npaths:\n /commodity/rates/historical:\n get:\n tags:\n - Commodity APIs\n summary: Get historical commodity prices\n description: Returns OHLC price data for the requested commodity symbols on a specific date.\n operationId: getHistoricalCommodityPrices\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols.\n schema:\n type: string\n - name: date\n in: query\n required: true\n description: Date in `YYYY-MM-DD` format. Data available from 1990 onwards.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/HistoricalCommodityPricesResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n date: '2025-01-10'\n rates:\n WTIOIL-SPOT:\n date: '2025-01-10'\n open: 73.77\n high: 77.16\n low: 73.55\n close: 75.97\n XAU:\n date: '2025-01-10'\n open: 2669.93\n high: 2697.85\n low: 2663.61\n close: 2689.44\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '206':\n description: Partial Content \u2014 Some requested symbols could not be resolved\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/HistoricalCommodityPricesResponse'\n examples:\n partial:\n summary: One valid symbol, one unresolved symbol\n value:\n success: true\n date: '2025-01-10'\n rates:\n XAU:\n date: '2025-01-10'\n open: 2669.93\n high: 2697.85\n low: 2663.61\n close: 2689.44\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad Request \u2014 Missing parameters or invalid date\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n missingSymbols:\n summary: Missing required symbols parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v2.0/commodity/rates/historical\n status: 400\n timestamp: '2026-09-14T08:44:32.013Z'\n invalidDateFormat:\n summary: Invalid date format\n value:\n timestamp: '2026-09-14T08:45:13.934Z'\n path: /rates/historical\n code: 400\n error: VALIDATION_ERROR\n message: Invalid Date Format (YYYY-MM-DD).\n dateNotExist:\n summary: Date does not exist\n value:\n timestamp: '2026-09-14T08:44:01.487Z'\n path: /rates/historical\n code: 400\n error: VALIDATION_ERROR\n message: 'Invalid Date: The provided date does not exist.'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '402':\n description: Payment Required \u2014 Maximum symbols per request exceeded\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n maxSymbolsExceeded:\n summary: Too many symbols requested\n value:\n timestamp: '2026-09-14T08:44:01.978Z'\n path: /rates/historical\n code: 402\n error: PAYMENT_REQUIRED\n message: Maximum symbols per request exceeded\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or rate not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: '2026-09-14T08:44:01.978Z'\n path: /rates/historical\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n rateNotFound:\n summary: Rate Not Found\n value:\n timestamp: '2026-09-14T08:44:02.528Z'\n path: /rates/historical\n code: 404\n error: RATE_NOT_FOUND\n message: no rates found for the specified date\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n HistoricalCommodityPricesResponse:\n type: object\n required:\n - success\n - date\n - rates\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n date:\n type: string\n description: Date for which prices were fetched (YYYY-MM-DD).\n rates:\n $ref: '#/components/schemas/HistoricalCommodityRates'\n unresolved:\n type: object\n description: Present only on a 206 Partial Content response, when some requested symbols could not be resolved. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n description: Historical commodity prices response containing success status, date, and OHLC rate data.\n HistoricalCommodityRates:\n type: object\n description: Object of commodity symbols to their OHLC price data. Each key is a commodity symbol and the value contains date, open, high, low, and close prices.\n properties:\n symbol:\n $ref: '#/components/schemas/HistoricalCommodityRate'\n required:\n - symbol\n HistoricalCommodityRate:\n type: object\n description: OHLC price data for a single commodity on a specific date.\n required:\n - date\n - open\n - high\n - low\n - close\n properties:\n date:\n type: string\n description: Date for which prices were fetched (YYYY-MM-DD). May differ from the requested `date` when the API falls back to the last available rate before it.\n open:\n type: number\n format: float\n description: Opening price on the given date.\n high:\n type: number\n format: float\n description: Highest price recorded on the given date.\n low:\n type: number\n format: float\n description: Lowest price recorded on the given date.\n close:\n type: number\n format: float\n description: Closing price on the given date.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests. Gateway-level validation errors populate status; commodity-service errors (date/symbol/rate validation) populate code instead \u2014 check whichever is present.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, RATE_NOT_FOUND).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error.\n status:\n type: integer\n description: HTTP status code. Present on gateway-level errors.\n code:\n type: integer\n description: HTTP status code. Present on commodity-service errors instead of status.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n unresolved:\n type: object\n description: Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
49561
50134
  "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
50135
  "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
50136
  "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",