@apifreaks/openapi-specs 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -241,8 +241,8 @@ var commodity_fluctuation_default = {
241
241
  openapi: "3.1.1",
242
242
  info: {
243
243
  title: "Commodity Fluctuation API ",
244
- version: "1.0.0",
245
- description: "Calculate price change and percentage movement for any commodity over a custom date range. Returns the opening price, closing price, absolute change, and percentage change for each symbol. Accepts one or more comma-separated commodity symbols with a start and end date in YYYY-MM-DD format. Returns a 400 error for invalid dates or a date range where start is after end, and a 404 error for unsupported symbols or a date range with no available data.",
244
+ version: "2.0.0",
245
+ description: "Price change and percentage movement for one or more commodities over a custom date range, with no limit on range length. For monthly-updated commodities the range snaps to month boundaries. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.",
246
246
  contact: {
247
247
  name: "APIFreaks Support",
248
248
  url: "https://apifreaks.com/contact",
@@ -251,7 +251,7 @@ var commodity_fluctuation_default = {
251
251
  },
252
252
  servers: [
253
253
  {
254
- url: "https://api.apifreaks.com/v1.0",
254
+ url: "https://api.apifreaks.com/v2.0",
255
255
  description: "Commodity Fluctuation API Server"
256
256
  }
257
257
  ],
@@ -342,6 +342,44 @@ var commodity_fluctuation_default = {
342
342
  }
343
343
  }
344
344
  },
345
+ "206": {
346
+ description: "Partial Content \u2014 Some requested symbols could not be resolved",
347
+ content: {
348
+ "application/json": {
349
+ schema: {
350
+ $ref: "#/components/schemas/CommodityFluctuationResponse"
351
+ },
352
+ examples: {
353
+ partial: {
354
+ summary: "One valid symbol, one unresolved symbol",
355
+ value: {
356
+ success: true,
357
+ startDate: "2024-01-01",
358
+ endDate: "2024-01-31",
359
+ rates: {
360
+ XAU: {
361
+ startRate: 2063.63,
362
+ endRate: 2039.83,
363
+ change: -23.8,
364
+ changePercent: -1.15
365
+ }
366
+ },
367
+ unresolved: {
368
+ FAKESYM: {
369
+ message: "We don't support this symbol, please visit our symbols page to see supported symbols."
370
+ }
371
+ }
372
+ }
373
+ }
374
+ }
375
+ }
376
+ },
377
+ headers: {
378
+ "X-AF-Credits-Cost": {
379
+ $ref: "#/components/headers/X-AF-Credits-Cost"
380
+ }
381
+ }
382
+ },
345
383
  "400": {
346
384
  description: "Bad Request \u2014 Missing parameters or invalid dates",
347
385
  content: {
@@ -352,9 +390,9 @@ var commodity_fluctuation_default = {
352
390
  value: {
353
391
  error: "Invalid Param Exception",
354
392
  message: "please pass correct parameters",
355
- path: "/v1.0/commodity/fluctuation",
393
+ path: "/v2.0/commodity/fluctuation",
356
394
  status: 400,
357
- timestamp: "2026-07-27T11:37:24.273Z"
395
+ timestamp: "2026-09-14T08:43:46.481Z"
358
396
  }
359
397
  },
360
398
  invalidDateFormat: {
@@ -399,6 +437,33 @@ var commodity_fluctuation_default = {
399
437
  }
400
438
  }
401
439
  },
440
+ "402": {
441
+ description: "Payment Required \u2014 Maximum symbols per request exceeded",
442
+ content: {
443
+ "application/json": {
444
+ schema: {
445
+ $ref: "#/components/schemas/ErrorResponse"
446
+ },
447
+ examples: {
448
+ maxSymbolsExceeded: {
449
+ summary: "Too many symbols requested",
450
+ value: {
451
+ timestamp: "2026-09-14T08:43:48.408Z",
452
+ path: "/rates/fluctuation",
453
+ code: 402,
454
+ error: "PAYMENT_REQUIRED",
455
+ message: "Maximum symbols per request exceeded"
456
+ }
457
+ }
458
+ }
459
+ }
460
+ },
461
+ headers: {
462
+ "X-AF-Credits-Cost": {
463
+ $ref: "#/components/headers/X-AF-Credits-Cost"
464
+ }
465
+ }
466
+ },
402
467
  "404": {
403
468
  description: "Not found - Symbol or data not available",
404
469
  content: {
@@ -410,17 +475,22 @@ var commodity_fluctuation_default = {
410
475
  symbolNotFound: {
411
476
  summary: "Symbol Not Found",
412
477
  value: {
413
- timestamp: "2026-07-27T11:37:23.759Z",
478
+ timestamp: "2026-09-14T08:43:48.408Z",
414
479
  path: "/rates/fluctuation",
415
480
  code: 404,
416
481
  error: "SYMBOL_NOT_FOUND",
417
- message: "The symbol is not supported, please visit the documentation for a list of supported symbols"
482
+ message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
483
+ unresolved: {
484
+ FAKESYM: {
485
+ message: "We don't support this symbol, please visit our symbols page to see supported symbols."
486
+ }
487
+ }
418
488
  }
419
489
  },
420
490
  noData: {
421
491
  summary: "No data available for the given date range",
422
492
  value: {
423
- timestamp: "2026-07-27T11:37:34.167Z",
493
+ timestamp: "2026-09-14T08:44:31.022Z",
424
494
  path: "/rates/fluctuation",
425
495
  code: 404,
426
496
  error: "DATA_NOT_FOUND",
@@ -474,6 +544,26 @@ var commodity_fluctuation_default = {
474
544
  },
475
545
  rates: {
476
546
  $ref: "#/components/schemas/CommodityFluctuationRates"
547
+ },
548
+ unresolved: {
549
+ type: "object",
550
+ description: "Present only on a 206 Partial Content response, when some requested symbols could not be resolved. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
551
+ additionalProperties: {
552
+ type: "object",
553
+ properties: {
554
+ message: {
555
+ type: "string",
556
+ description: "Detail message explaining why this symbol was not resolved."
557
+ },
558
+ suggestions: {
559
+ type: "array",
560
+ description: "Optional list of supported symbols that closely match the unresolved symbol.",
561
+ items: {
562
+ type: "string"
563
+ }
564
+ }
565
+ }
566
+ }
477
567
  }
478
568
  },
479
569
  description: "Commodity fluctuation response containing price change data per symbol over a date range."
@@ -539,6 +629,26 @@ var commodity_fluctuation_default = {
539
629
  type: "string",
540
630
  format: "date-time",
541
631
  description: "Timestamp when the error occurred (ISO 8601)."
632
+ },
633
+ unresolved: {
634
+ type: "object",
635
+ description: "Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
636
+ additionalProperties: {
637
+ type: "object",
638
+ properties: {
639
+ message: {
640
+ type: "string",
641
+ description: "Detail message explaining why this symbol was not resolved."
642
+ },
643
+ suggestions: {
644
+ type: "array",
645
+ description: "Optional list of supported symbols that closely match the unresolved symbol.",
646
+ items: {
647
+ type: "string"
648
+ }
649
+ }
650
+ }
651
+ }
542
652
  }
543
653
  }
544
654
  }
@@ -567,8 +677,8 @@ var commodity_prices_default = {
567
677
  openapi: "3.1.1",
568
678
  info: {
569
679
  title: "Live Commodity Prices API - Real Time Market Insights",
570
- version: "1.0.0",
571
- 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.",
680
+ version: "2.0.0",
681
+ description: "Real-time prices for 245+ commodities in a single request, updated on a rolling ~10 minute cadence. Optionally convert prices into a target quote currency. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.",
572
682
  contact: {
573
683
  name: "APIFreaks Support",
574
684
  url: "https://apifreaks.com/contact",
@@ -577,7 +687,7 @@ var commodity_prices_default = {
577
687
  },
578
688
  servers: [
579
689
  {
580
- url: "https://api.apifreaks.com/v1.0",
690
+ url: "https://api.apifreaks.com/v2.0",
581
691
  description: "Live Commodity Prices API Server"
582
692
  }
583
693
  ],
@@ -609,17 +719,6 @@ var commodity_prices_default = {
609
719
  type: "string"
610
720
  }
611
721
  },
612
- {
613
- name: "updates",
614
- in: "query",
615
- required: true,
616
- description: "Update frequency. Accepted values: `1m` (default), `10m`.",
617
- schema: {
618
- type: "string",
619
- enum: ["1m", "10m"],
620
- default: "1m"
621
- }
622
- },
623
722
  {
624
723
  name: "quote",
625
724
  in: "query",
@@ -643,10 +742,10 @@ var commodity_prices_default = {
643
742
  summary: "Successful response",
644
743
  value: {
645
744
  success: true,
646
- timestamp: 1785152172,
745
+ timestamp: 1789375397,
647
746
  rates: {
648
- XAU: 4099.1,
649
- "WTIOIL-SPOT": 81.88
747
+ XAU: 4313.04,
748
+ "WTIOIL-SPOT": 100
650
749
  },
651
750
  metadata: {
652
751
  XAU: {
@@ -664,9 +763,9 @@ var commodity_prices_default = {
664
763
  summary: "Price converted to a target quote currency",
665
764
  value: {
666
765
  success: true,
667
- timestamp: 1785152172,
766
+ timestamp: 1789375426,
668
767
  rates: {
669
- XAU: 3597.734
768
+ XAU: 3739.023
670
769
  },
671
770
  metadata: {
672
771
  XAU: {
@@ -685,6 +784,66 @@ var commodity_prices_default = {
685
784
  }
686
785
  }
687
786
  },
787
+ "206": {
788
+ description: "Partial Content \u2014 Some requested symbols could not be resolved",
789
+ content: {
790
+ "application/json": {
791
+ schema: {
792
+ $ref: "#/components/schemas/LiveCommodityPricesResponse"
793
+ },
794
+ examples: {
795
+ partial: {
796
+ summary: "One valid symbol, one unresolved symbol",
797
+ value: {
798
+ success: true,
799
+ timestamp: 1789376193,
800
+ rates: {
801
+ XAU: 4311.88
802
+ },
803
+ metadata: {
804
+ XAU: {
805
+ unit: "T.oz",
806
+ quote: "USD"
807
+ }
808
+ },
809
+ unresolved: {
810
+ FAKESYM: {
811
+ message: "We don't support this symbol, please visit our symbols page to see supported symbols."
812
+ }
813
+ }
814
+ }
815
+ },
816
+ partialWithSuggestions: {
817
+ summary: "Unresolved symbol with close-match suggestions",
818
+ value: {
819
+ success: true,
820
+ timestamp: 1789376644,
821
+ rates: {
822
+ XAU: 4306.06
823
+ },
824
+ metadata: {
825
+ XAU: {
826
+ unit: "T.oz",
827
+ quote: "USD"
828
+ }
829
+ },
830
+ unresolved: {
831
+ ZW: {
832
+ message: "Did you mean ZW-SPOT (Wheat Spot) or ZW-FUT (Wheat Futures)?",
833
+ suggestions: ["ZW-SPOT", "ZW-FUT"]
834
+ }
835
+ }
836
+ }
837
+ }
838
+ }
839
+ }
840
+ },
841
+ headers: {
842
+ "X-AF-Credits-Cost": {
843
+ $ref: "#/components/headers/X-AF-Credits-Cost"
844
+ }
845
+ }
846
+ },
688
847
  "400": {
689
848
  description: "Bad Request \u2014 Missing or invalid query parameters",
690
849
  content: {
@@ -698,19 +857,36 @@ var commodity_prices_default = {
698
857
  value: {
699
858
  error: "Invalid Param Exception",
700
859
  message: "please pass correct parameters",
701
- path: "/v1.0/commodity/rates/latest",
860
+ path: "/v2.0/commodity/rates/latest",
702
861
  status: 400,
703
- timestamp: "2026-07-27T11:36:13.312Z"
862
+ timestamp: "2026-09-14T08:43:43.964Z"
704
863
  }
705
- },
706
- invalidUpdates: {
707
- summary: "updates is not 1m or 10m",
864
+ }
865
+ }
866
+ }
867
+ },
868
+ headers: {
869
+ "X-AF-Credits-Cost": {
870
+ $ref: "#/components/headers/X-AF-Credits-Cost"
871
+ }
872
+ }
873
+ },
874
+ "402": {
875
+ description: "Payment Required \u2014 Maximum symbols per request exceeded",
876
+ content: {
877
+ "application/json": {
878
+ schema: {
879
+ $ref: "#/components/schemas/CommodityNotFoundError"
880
+ },
881
+ examples: {
882
+ maxSymbolsExceeded: {
883
+ summary: "Too many symbols requested",
708
884
  value: {
709
- error: "Invalid Param Exception",
710
- message: "please pass correct parameters",
711
- path: "/v1.0/commodity/rates/latest",
712
- status: 400,
713
- timestamp: "2026-07-27T11:36:35.755Z"
885
+ timestamp: "2026-09-14T08:43:44.957Z",
886
+ path: "/rates/latestRates",
887
+ code: 402,
888
+ error: "PAYMENT_REQUIRED",
889
+ message: "Maximum symbols per request exceeded"
714
890
  }
715
891
  }
716
892
  }
@@ -733,17 +909,38 @@ var commodity_prices_default = {
733
909
  symbolNotFound: {
734
910
  summary: "Symbol Not Found",
735
911
  value: {
736
- timestamp: 1781792620618,
912
+ timestamp: "2026-09-14T08:43:44.957Z",
737
913
  path: "/rates/latestRates",
738
914
  code: 404,
739
915
  error: "SYMBOL_NOT_FOUND",
740
- message: "The symbol is not supported, please visit the documentation for a list of supported symbols"
916
+ message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
917
+ unresolved: {
918
+ FAKESYM: {
919
+ message: "We don't support this symbol, please visit our symbols page to see supported symbols."
920
+ }
921
+ }
922
+ }
923
+ },
924
+ symbolNotFoundWithSuggestions: {
925
+ summary: "Symbol Not Found, with close-match suggestions",
926
+ value: {
927
+ timestamp: "2026-09-14T09:04:04.878Z",
928
+ path: "/rates/latestRates",
929
+ code: 404,
930
+ error: "SYMBOL_NOT_FOUND",
931
+ message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
932
+ unresolved: {
933
+ ZW: {
934
+ message: "Did you mean ZW-SPOT (Wheat Spot) or ZW-FUT (Wheat Futures)?",
935
+ suggestions: ["ZW-SPOT", "ZW-FUT"]
936
+ }
937
+ }
741
938
  }
742
939
  },
743
940
  quoteNotFound: {
744
941
  summary: "Quote Currency Not Found",
745
942
  value: {
746
- timestamp: 1781792620618,
943
+ timestamp: "2026-09-14T08:43:45.461Z",
747
944
  path: "/rates/latestRates",
748
945
  code: 404,
749
946
  error: "QUOTE_NOT_FOUND",
@@ -796,6 +993,30 @@ var commodity_prices_default = {
796
993
  },
797
994
  metadata: {
798
995
  $ref: "#/components/schemas/CommodityMetadata"
996
+ },
997
+ unresolved: {
998
+ type: "object",
999
+ 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.",
1000
+ additionalProperties: {
1001
+ type: "object",
1002
+ properties: {
1003
+ message: {
1004
+ type: "string",
1005
+ description: "Detail message explaining why this symbol was not resolved."
1006
+ },
1007
+ suggestions: {
1008
+ type: "array",
1009
+ description: "Optional list of supported symbols that closely match the unresolved symbol.",
1010
+ items: {
1011
+ type: "string"
1012
+ }
1013
+ }
1014
+ }
1015
+ }
1016
+ },
1017
+ warning: {
1018
+ type: "string",
1019
+ description: "Present only when currency conversion for the requested `quote` is temporarily unavailable; rates are returned in each commodity's default currency instead."
799
1020
  }
800
1021
  },
801
1022
  description: "Live commodity prices response containing success status, timestamp, rates, and metadata."
@@ -859,12 +1080,13 @@ var commodity_prices_default = {
859
1080
  },
860
1081
  CommodityNotFoundError: {
861
1082
  type: "object",
862
- 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.",
1083
+ description: "Error envelope returned by the commodity pricing service specifically for unresolvable symbol/quote errors. Uses `code` instead of `status` and an ISO 8601 `timestamp`, unlike the standard ErrorResponse.",
863
1084
  required: ["code", "error", "message"],
864
1085
  properties: {
865
1086
  timestamp: {
866
- type: "integer",
867
- description: "Unix timestamp in milliseconds when the error occurred."
1087
+ type: "string",
1088
+ format: "date-time",
1089
+ description: "Timestamp when the error occurred (ISO 8601)."
868
1090
  },
869
1091
  path: {
870
1092
  type: "string",
@@ -881,6 +1103,26 @@ var commodity_prices_default = {
881
1103
  message: {
882
1104
  type: "string",
883
1105
  description: "Human-readable error message describing the failure."
1106
+ },
1107
+ unresolved: {
1108
+ type: "object",
1109
+ description: "Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
1110
+ additionalProperties: {
1111
+ type: "object",
1112
+ properties: {
1113
+ message: {
1114
+ type: "string",
1115
+ description: "Detail message explaining why this symbol was not resolved."
1116
+ },
1117
+ suggestions: {
1118
+ type: "array",
1119
+ description: "Optional list of supported symbols that closely match the unresolved symbol.",
1120
+ items: {
1121
+ type: "string"
1122
+ }
1123
+ }
1124
+ }
1125
+ }
884
1126
  }
885
1127
  }
886
1128
  }
@@ -909,8 +1151,8 @@ var commodity_symbols_default = {
909
1151
  openapi: "3.1.1",
910
1152
  info: {
911
1153
  title: "Commodity Symbols API Reference",
912
- version: "1.0.0",
913
- 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.",
1154
+ version: "2.0.0",
1155
+ description: 'Full catalog of 245+ supported commodities across Metals, Energy, Agriculture, Industrial, Raw Materials, Oils and Meals, Textiles, Meats, Poultry, and Livestock, with pricing currency, unit, and update interval per symbol. Deprecated symbols stay listed with `status: "inactive"` and a `deprecationDate`.',
914
1156
  contact: {
915
1157
  name: "APIFreaks Support",
916
1158
  url: "https://apifreaks.com/contact",
@@ -919,7 +1161,7 @@ var commodity_symbols_default = {
919
1161
  },
920
1162
  servers: [
921
1163
  {
922
- url: "https://api.apifreaks.com/v1.0",
1164
+ url: "https://api.apifreaks.com/v2.0",
923
1165
  description: "Commodity Symbols API Server"
924
1166
  }
925
1167
  ],
@@ -988,6 +1230,40 @@ var commodity_symbols_default = {
988
1230
  symbol: "MMBtu",
989
1231
  name: "Million British Thermal Units"
990
1232
  }
1233
+ },
1234
+ {
1235
+ symbol: "NG-EU",
1236
+ name: "Natural Gas, Europe",
1237
+ category: "Energy",
1238
+ status: "active",
1239
+ updateInterval: "PER_MONTH",
1240
+ exchange: "World Bank",
1241
+ currency: {
1242
+ code: "USD",
1243
+ name: "US Dollar",
1244
+ symbol: "$"
1245
+ },
1246
+ unit: {
1247
+ symbol: "MMBtu",
1248
+ name: "Million British Thermal Units"
1249
+ }
1250
+ },
1251
+ {
1252
+ symbol: "UANEU",
1253
+ name: "Urea Ammonium Nitrate",
1254
+ category: "Industrial",
1255
+ status: "inactive",
1256
+ updateInterval: "PER_MINUTE",
1257
+ deprecationDate: "2024-04-14",
1258
+ currency: {
1259
+ code: "USD",
1260
+ name: "US Dollar",
1261
+ symbol: "$"
1262
+ },
1263
+ unit: {
1264
+ symbol: "T",
1265
+ name: "Metric Ton"
1266
+ }
991
1267
  }
992
1268
  ]
993
1269
  }
@@ -1054,23 +1330,46 @@ var commodity_symbols_default = {
1054
1330
  properties: {
1055
1331
  symbol: {
1056
1332
  type: "string",
1057
- description: "Unique identifier/ticker symbol for the commodity (e.g., XAU, NG-FUT)."
1333
+ description: "Unique identifier/ticker symbol for the commodity (e.g., XAU, NG-FUT). Use this value in the `symbols` parameter of the rate endpoints."
1058
1334
  },
1059
1335
  name: {
1060
1336
  type: "string",
1061
1337
  description: "Full name of the commodity (e.g., Gold, Natural Gas Futures)."
1062
1338
  },
1339
+ description: {
1340
+ type: "string",
1341
+ description: "Short description of the commodity. May be an empty string for some symbols."
1342
+ },
1063
1343
  category: {
1064
1344
  type: "string",
1065
- description: "Category the commodity belongs to (e.g., Metals, Energy)."
1345
+ description: "Category the commodity belongs to (e.g., Metals, Energy, Agriculture, Industrial, Raw Materials, Oils and Meals, Textiles, Meats, Poultry, Livestock)."
1066
1346
  },
1067
1347
  status: {
1068
1348
  type: "string",
1069
- description: "Current status of the commodity. Value: active."
1349
+ enum: ["active", "inactive"],
1350
+ description: "Current status of the commodity. `inactive` means the symbol is deprecated: latest rates are unavailable, but historical rates remain available up to its `deprecationDate`."
1070
1351
  },
1071
1352
  updateInterval: {
1072
1353
  type: "string",
1073
- description: "Rate at which the price is updated. Values: PER_SECOND, PER_MINUTE."
1354
+ enum: [
1355
+ "PER_SECOND",
1356
+ "PER_MINUTE",
1357
+ "PER_10_MINUTES",
1358
+ "PER_HOUR",
1359
+ "PER_DAY",
1360
+ "PER_WEEK",
1361
+ "PER_MONTH"
1362
+ ],
1363
+ description: "Rate at which the price is updated."
1364
+ },
1365
+ exchange: {
1366
+ type: "string",
1367
+ description: "Optional. Data source for the symbol (e.g., World Bank). Present only for some symbols."
1368
+ },
1369
+ deprecationDate: {
1370
+ type: "string",
1371
+ format: "date",
1372
+ description: "Optional. Present only when `status` is `inactive`. Date the symbol was deprecated (YYYY-MM-DD)."
1074
1373
  },
1075
1374
  currency: {
1076
1375
  $ref: "#/components/schemas/CommodityCurrency"
@@ -1139,8 +1438,8 @@ var commodity_time_series_default = {
1139
1438
  openapi: "3.1.1",
1140
1439
  info: {
1141
1440
  title: "Commodities Time Series API",
1142
- version: "1.0.0",
1143
- description: "Retrieve daily OHLC (open, high, low, close) price data for any supported commodity over a date range of up to 365 days. Accepts one or more comma-separated commodity symbols with a start and end date in YYYY-MM-DD format. Returns a date-indexed object where each date key maps to per-symbol OHLC data. Non-trading days are automatically excluded. Returns a 400 error for invalid dates or a range exceeding 365 days, and a 404 error for unsupported symbols or a date range with no available data.",
1441
+ version: "2.0.0",
1442
+ description: "Daily OHLC history for one or more commodities over a date range of up to 365 days, indexed by date. Non-trading days are excluded. Monthly-updated commodities only have a closing price \u2014 `open`, `high`, and `low` come back as `0`. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.",
1144
1443
  contact: {
1145
1444
  name: "APIFreaks Support",
1146
1445
  url: "https://apifreaks.com/contact",
@@ -1149,7 +1448,7 @@ var commodity_time_series_default = {
1149
1448
  },
1150
1449
  servers: [
1151
1450
  {
1152
- url: "https://api.apifreaks.com/v1.0",
1451
+ url: "https://api.apifreaks.com/v2.0",
1153
1452
  description: "Commodity Time Series API Server"
1154
1453
  }
1155
1454
  ],
@@ -1242,6 +1541,96 @@ var commodity_time_series_default = {
1242
1541
  }
1243
1542
  }
1244
1543
  }
1544
+ },
1545
+ monthlyCommodity: {
1546
+ summary: "Monthly-updated commodity (open/high/low unavailable)",
1547
+ value: {
1548
+ success: true,
1549
+ startDate: "2025-01-01",
1550
+ endDate: "2025-03-01",
1551
+ rates: {
1552
+ "2025-01-01": {
1553
+ "NG-EU": {
1554
+ open: 0,
1555
+ high: 0,
1556
+ low: 0,
1557
+ close: 14.66
1558
+ }
1559
+ },
1560
+ "2025-02-01": {
1561
+ "NG-EU": {
1562
+ open: 0,
1563
+ high: 0,
1564
+ low: 0,
1565
+ close: 15.34
1566
+ }
1567
+ },
1568
+ "2025-03-01": {
1569
+ "NG-EU": {
1570
+ open: 0,
1571
+ high: 0,
1572
+ low: 0,
1573
+ close: 13.24
1574
+ }
1575
+ }
1576
+ }
1577
+ }
1578
+ }
1579
+ }
1580
+ }
1581
+ },
1582
+ headers: {
1583
+ "X-AF-Credits-Cost": {
1584
+ $ref: "#/components/headers/X-AF-Credits-Cost"
1585
+ }
1586
+ }
1587
+ },
1588
+ "206": {
1589
+ description: "Partial Content \u2014 Some requested symbols could not be resolved",
1590
+ content: {
1591
+ "application/json": {
1592
+ schema: {
1593
+ $ref: "#/components/schemas/CommodityTimeSeriesResponse"
1594
+ },
1595
+ examples: {
1596
+ partial: {
1597
+ summary: "One valid symbol, one unresolved symbol",
1598
+ value: {
1599
+ success: true,
1600
+ startDate: "2025-01-06",
1601
+ endDate: "2025-01-08",
1602
+ rates: {
1603
+ "2025-01-06": {
1604
+ XAU: {
1605
+ open: 2649.01,
1606
+ high: 2651.33,
1607
+ low: 2645.36,
1608
+ close: 2646.91
1609
+ }
1610
+ },
1611
+ "2025-01-07": {
1612
+ XAU: {
1613
+ open: 2662.45,
1614
+ high: 2663.06,
1615
+ low: 2655.66,
1616
+ close: 2658.9
1617
+ }
1618
+ },
1619
+ "2025-01-08": {
1620
+ XAU: {
1621
+ open: 2669.69,
1622
+ high: 2674.68,
1623
+ low: 2668.58,
1624
+ close: 2671.8
1625
+ }
1626
+ }
1627
+ },
1628
+ unresolved: {
1629
+ FAKESYM: {
1630
+ message: "We don't support this symbol, please visit our symbols page to see supported symbols."
1631
+ }
1632
+ }
1633
+ }
1245
1634
  }
1246
1635
  }
1247
1636
  }
@@ -1262,9 +1651,9 @@ var commodity_time_series_default = {
1262
1651
  value: {
1263
1652
  error: "Invalid Param Exception",
1264
1653
  message: "please pass correct parameters",
1265
- path: "/v1.0/commodity/time-series",
1654
+ path: "/v2.0/commodity/time-series",
1266
1655
  status: 400,
1267
- timestamp: "2026-07-27T11:38:40.063Z"
1656
+ timestamp: "2026-09-14T08:43:58.547Z"
1268
1657
  }
1269
1658
  },
1270
1659
  invalidDate: {
@@ -1309,6 +1698,33 @@ var commodity_time_series_default = {
1309
1698
  }
1310
1699
  }
1311
1700
  },
1701
+ "402": {
1702
+ description: "Payment Required \u2014 Maximum symbols per request exceeded",
1703
+ content: {
1704
+ "application/json": {
1705
+ schema: {
1706
+ $ref: "#/components/schemas/ErrorResponse"
1707
+ },
1708
+ examples: {
1709
+ maxSymbolsExceeded: {
1710
+ summary: "Too many symbols requested",
1711
+ value: {
1712
+ timestamp: "2026-09-14T08:44:00.586Z",
1713
+ path: "/rates/time-series",
1714
+ code: 402,
1715
+ error: "PAYMENT_REQUIRED",
1716
+ message: "Maximum symbols per request exceeded"
1717
+ }
1718
+ }
1719
+ }
1720
+ }
1721
+ },
1722
+ headers: {
1723
+ "X-AF-Credits-Cost": {
1724
+ $ref: "#/components/headers/X-AF-Credits-Cost"
1725
+ }
1726
+ }
1727
+ },
1312
1728
  "404": {
1313
1729
  description: "Not found - Symbol or data not available",
1314
1730
  content: {
@@ -1320,17 +1736,22 @@ var commodity_time_series_default = {
1320
1736
  symbolNotFound: {
1321
1737
  summary: "Symbol Not Found",
1322
1738
  value: {
1323
- timestamp: "2026-07-27T11:38:41.234Z",
1739
+ timestamp: "2026-09-14T08:44:00.586Z",
1324
1740
  path: "/rates/time-series",
1325
1741
  code: 404,
1326
1742
  error: "SYMBOL_NOT_FOUND",
1327
- message: "The symbol is not supported, please visit the documentation for a list of supported symbols"
1743
+ message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
1744
+ unresolved: {
1745
+ FAKESYM: {
1746
+ message: "We don't support this symbol, please visit our symbols page to see supported symbols."
1747
+ }
1748
+ }
1328
1749
  }
1329
1750
  },
1330
1751
  dataNotFound: {
1331
1752
  summary: "No data available for the given date range",
1332
1753
  value: {
1333
- timestamp: "2026-07-27T11:38:41.234Z",
1754
+ timestamp: "2026-09-14T08:44:31.547Z",
1334
1755
  path: "/rates/time-series",
1335
1756
  code: 404,
1336
1757
  error: "DATA_NOT_FOUND",
@@ -1384,6 +1805,26 @@ var commodity_time_series_default = {
1384
1805
  },
1385
1806
  rates: {
1386
1807
  $ref: "#/components/schemas/CommodityTimeSeriesRates"
1808
+ },
1809
+ unresolved: {
1810
+ type: "object",
1811
+ 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.",
1812
+ additionalProperties: {
1813
+ type: "object",
1814
+ properties: {
1815
+ message: {
1816
+ type: "string",
1817
+ description: "Detail message explaining why this symbol was not resolved."
1818
+ },
1819
+ suggestions: {
1820
+ type: "array",
1821
+ description: "Optional list of supported symbols that closely match the unresolved symbol.",
1822
+ items: {
1823
+ type: "string"
1824
+ }
1825
+ }
1826
+ }
1827
+ }
1387
1828
  }
1388
1829
  },
1389
1830
  description: "Commodity time series response containing date-indexed OHLC data per symbol."
@@ -1402,23 +1843,23 @@ var commodity_time_series_default = {
1402
1843
  },
1403
1844
  CommodityOhlc: {
1404
1845
  type: "object",
1405
- description: "OHLC price data for a single commodity on a single trading day.",
1846
+ description: "OHLC price data for a single commodity on a single trading day. For monthly-updated commodities, only `close` is meaningful \u2014 `open`, `high`, and `low` are returned as `0`.",
1406
1847
  required: ["open", "high", "low", "close"],
1407
1848
  properties: {
1408
1849
  open: {
1409
1850
  type: "number",
1410
1851
  format: "float",
1411
- description: "Opening price on the given date."
1852
+ description: "Opening price on the given date. `0` for monthly-updated commodities."
1412
1853
  },
1413
1854
  high: {
1414
1855
  type: "number",
1415
1856
  format: "float",
1416
- description: "Highest price on the given date."
1857
+ description: "Highest price on the given date. `0` for monthly-updated commodities."
1417
1858
  },
1418
1859
  low: {
1419
1860
  type: "number",
1420
1861
  format: "float",
1421
- description: "Lowest price on the given date."
1862
+ description: "Lowest price on the given date. `0` for monthly-updated commodities."
1422
1863
  },
1423
1864
  close: {
1424
1865
  type: "number",
@@ -1456,6 +1897,26 @@ var commodity_time_series_default = {
1456
1897
  type: "string",
1457
1898
  format: "date-time",
1458
1899
  description: "Timestamp when the error occurred (ISO 8601)."
1900
+ },
1901
+ unresolved: {
1902
+ type: "object",
1903
+ description: "Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
1904
+ additionalProperties: {
1905
+ type: "object",
1906
+ properties: {
1907
+ message: {
1908
+ type: "string",
1909
+ description: "Detail message explaining why this symbol was not resolved."
1910
+ },
1911
+ suggestions: {
1912
+ type: "array",
1913
+ description: "Optional list of supported symbols that closely match the unresolved symbol.",
1914
+ items: {
1915
+ type: "string"
1916
+ }
1917
+ }
1918
+ }
1919
+ }
1459
1920
  }
1460
1921
  }
1461
1922
  }
@@ -1484,8 +1945,8 @@ var historical_commodity_prices_default = {
1484
1945
  openapi: "3.1.1",
1485
1946
  info: {
1486
1947
  title: "Historical Commodity Prices, Delivered Simply.",
1487
- version: "1.0.0",
1488
- description: "Retrieve OHLC (open, high, low, close) price data for any supported commodity on a specific date. Data is available from January 1990 onwards for 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.",
1948
+ version: "2.0.0",
1949
+ description: "OHLC price data for one or more commodities on a specific date, back to January 1990. Falls back to the nearest earlier rate if none exists for the exact date. Monthly-updated commodities only have a closing price \u2014 `open`, `high`, and `low` come back as `0`. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.",
1489
1950
  contact: {
1490
1951
  name: "APIFreaks Support",
1491
1952
  url: "https://apifreaks.com/contact",
@@ -1494,7 +1955,7 @@ var historical_commodity_prices_default = {
1494
1955
  },
1495
1956
  servers: [
1496
1957
  {
1497
- url: "https://api.apifreaks.com/v1.0",
1958
+ url: "https://api.apifreaks.com/v2.0",
1498
1959
  description: "Historical Commodity Prices API Server"
1499
1960
  }
1500
1961
  ],
@@ -1567,6 +2028,60 @@ var historical_commodity_prices_default = {
1567
2028
  }
1568
2029
  }
1569
2030
  }
2031
+ },
2032
+ monthlyCommodity: {
2033
+ summary: "Monthly-updated commodity (open/high/low unavailable)",
2034
+ value: {
2035
+ success: true,
2036
+ date: "2025-01-10",
2037
+ rates: {
2038
+ "NG-EU": {
2039
+ date: "2025-01-01",
2040
+ open: 0,
2041
+ high: 0,
2042
+ low: 0,
2043
+ close: 14.66
2044
+ }
2045
+ }
2046
+ }
2047
+ }
2048
+ }
2049
+ }
2050
+ },
2051
+ headers: {
2052
+ "X-AF-Credits-Cost": {
2053
+ $ref: "#/components/headers/X-AF-Credits-Cost"
2054
+ }
2055
+ }
2056
+ },
2057
+ "206": {
2058
+ description: "Partial Content \u2014 Some requested symbols could not be resolved",
2059
+ content: {
2060
+ "application/json": {
2061
+ schema: {
2062
+ $ref: "#/components/schemas/HistoricalCommodityPricesResponse"
2063
+ },
2064
+ examples: {
2065
+ partial: {
2066
+ summary: "One valid symbol, one unresolved symbol",
2067
+ value: {
2068
+ success: true,
2069
+ date: "2025-01-10",
2070
+ rates: {
2071
+ XAU: {
2072
+ date: "2025-01-10",
2073
+ open: 2669.93,
2074
+ high: 2697.85,
2075
+ low: 2663.61,
2076
+ close: 2689.44
2077
+ }
2078
+ },
2079
+ unresolved: {
2080
+ FAKESYM: {
2081
+ message: "We don't support this symbol, please visit our symbols page to see supported symbols."
2082
+ }
2083
+ }
2084
+ }
1570
2085
  }
1571
2086
  }
1572
2087
  }
@@ -1578,31 +2093,68 @@ var historical_commodity_prices_default = {
1578
2093
  }
1579
2094
  },
1580
2095
  "400": {
1581
- description: "Bad request - Invalid date format",
2096
+ description: "Bad Request \u2014 Missing parameters or invalid date",
1582
2097
  content: {
1583
2098
  "application/json": {
1584
2099
  schema: {
1585
2100
  $ref: "#/components/schemas/ErrorResponse"
1586
2101
  },
1587
2102
  examples: {
2103
+ missingSymbols: {
2104
+ summary: "Missing required symbols parameter",
2105
+ value: {
2106
+ error: "Invalid Param Exception",
2107
+ message: "please pass correct parameters",
2108
+ path: "/v2.0/commodity/rates/historical",
2109
+ status: 400,
2110
+ timestamp: "2026-09-14T08:44:32.013Z"
2111
+ }
2112
+ },
1588
2113
  invalidDateFormat: {
1589
2114
  summary: "Invalid date format",
1590
2115
  value: {
1591
- timestamp: 1781792620618,
1592
- status: 400,
2116
+ timestamp: "2026-09-14T08:45:13.934Z",
2117
+ path: "/rates/historical",
2118
+ code: 400,
1593
2119
  error: "VALIDATION_ERROR",
1594
- message: "Invalid Date Format (YYYY-MM-DD).",
1595
- path: "/v1.0/commodity/rates/historical"
2120
+ message: "Invalid Date Format (YYYY-MM-DD)."
1596
2121
  }
1597
2122
  },
1598
2123
  dateNotExist: {
1599
2124
  summary: "Date does not exist",
1600
2125
  value: {
1601
- timestamp: 1781792620618,
1602
- status: 400,
2126
+ timestamp: "2026-09-14T08:44:01.487Z",
2127
+ path: "/rates/historical",
2128
+ code: 400,
1603
2129
  error: "VALIDATION_ERROR",
1604
- message: "Invalid Date: The provided date does not exist.",
1605
- path: "/v1.0/commodity/rates/historical"
2130
+ message: "Invalid Date: The provided date does not exist."
2131
+ }
2132
+ }
2133
+ }
2134
+ }
2135
+ },
2136
+ headers: {
2137
+ "X-AF-Credits-Cost": {
2138
+ $ref: "#/components/headers/X-AF-Credits-Cost"
2139
+ }
2140
+ }
2141
+ },
2142
+ "402": {
2143
+ description: "Payment Required \u2014 Maximum symbols per request exceeded",
2144
+ content: {
2145
+ "application/json": {
2146
+ schema: {
2147
+ $ref: "#/components/schemas/ErrorResponse"
2148
+ },
2149
+ examples: {
2150
+ maxSymbolsExceeded: {
2151
+ summary: "Too many symbols requested",
2152
+ value: {
2153
+ timestamp: "2026-09-14T08:44:01.978Z",
2154
+ path: "/rates/historical",
2155
+ code: 402,
2156
+ error: "PAYMENT_REQUIRED",
2157
+ message: "Maximum symbols per request exceeded"
1606
2158
  }
1607
2159
  }
1608
2160
  }
@@ -1625,21 +2177,26 @@ var historical_commodity_prices_default = {
1625
2177
  symbolNotFound: {
1626
2178
  summary: "Symbol Not Found",
1627
2179
  value: {
1628
- timestamp: 1781792620618,
1629
- status: 404,
2180
+ timestamp: "2026-09-14T08:44:01.978Z",
2181
+ path: "/rates/historical",
2182
+ code: 404,
1630
2183
  error: "SYMBOL_NOT_FOUND",
1631
2184
  message: "The symbol is not supported, please visit the documentation for a list of supported symbols",
1632
- path: "/v1.0/commodity/rates/historical"
2185
+ unresolved: {
2186
+ FAKESYM: {
2187
+ message: "We don't support this symbol, please visit our symbols page to see supported symbols."
2188
+ }
2189
+ }
1633
2190
  }
1634
2191
  },
1635
2192
  rateNotFound: {
1636
2193
  summary: "Rate Not Found",
1637
2194
  value: {
1638
- timestamp: 1781792620618,
1639
- status: 404,
2195
+ timestamp: "2026-09-14T08:44:02.528Z",
2196
+ path: "/rates/historical",
2197
+ code: 404,
1640
2198
  error: "RATE_NOT_FOUND",
1641
- message: "no rates found for the specified date",
1642
- path: "/v1.0/commodity/rates/historical"
2199
+ message: "no rates found for the specified date"
1643
2200
  }
1644
2201
  }
1645
2202
  }
@@ -1685,6 +2242,26 @@ var historical_commodity_prices_default = {
1685
2242
  },
1686
2243
  rates: {
1687
2244
  $ref: "#/components/schemas/HistoricalCommodityRates"
2245
+ },
2246
+ unresolved: {
2247
+ type: "object",
2248
+ 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.",
2249
+ additionalProperties: {
2250
+ type: "object",
2251
+ properties: {
2252
+ message: {
2253
+ type: "string",
2254
+ description: "Detail message explaining why this symbol was not resolved."
2255
+ },
2256
+ suggestions: {
2257
+ type: "array",
2258
+ description: "Optional list of supported symbols that closely match the unresolved symbol.",
2259
+ items: {
2260
+ type: "string"
2261
+ }
2262
+ }
2263
+ }
2264
+ }
1688
2265
  }
1689
2266
  },
1690
2267
  description: "Historical commodity prices response containing success status, date, and OHLC rate data."
@@ -1701,27 +2278,27 @@ var historical_commodity_prices_default = {
1701
2278
  },
1702
2279
  HistoricalCommodityRate: {
1703
2280
  type: "object",
1704
- description: "OHLC price data for a single commodity on a specific date.",
2281
+ description: "OHLC price data for a single commodity on a specific date. For monthly-updated commodities, only `close` is meaningful \u2014 `open`, `high`, and `low` are returned as `0`.",
1705
2282
  required: ["date", "open", "high", "low", "close"],
1706
2283
  properties: {
1707
2284
  date: {
1708
2285
  type: "string",
1709
- description: "Date for which prices were fetched (YYYY-MM-DD)."
2286
+ description: "Date for which prices were fetched (YYYY-MM-DD). May differ from the requested `date` when the API falls back to the last available rate before it, or snaps to the first day of the month for monthly-updated commodities."
1710
2287
  },
1711
2288
  open: {
1712
2289
  type: "number",
1713
2290
  format: "float",
1714
- description: "Opening price on the given date."
2291
+ description: "Opening price on the given date. `0` for monthly-updated commodities."
1715
2292
  },
1716
2293
  high: {
1717
2294
  type: "number",
1718
2295
  format: "float",
1719
- description: "Highest price recorded on the given date."
2296
+ description: "Highest price recorded on the given date. `0` for monthly-updated commodities."
1720
2297
  },
1721
2298
  low: {
1722
2299
  type: "number",
1723
2300
  format: "float",
1724
- description: "Lowest price recorded on the given date."
2301
+ description: "Lowest price recorded on the given date. `0` for monthly-updated commodities."
1725
2302
  },
1726
2303
  close: {
1727
2304
  type: "number",
@@ -1732,19 +2309,12 @@ var historical_commodity_prices_default = {
1732
2309
  },
1733
2310
  ErrorResponse: {
1734
2311
  type: "object",
1735
- required: ["timestamp", "status", "error", "message", "path"],
2312
+ 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.",
2313
+ required: ["message"],
1736
2314
  properties: {
1737
- timestamp: {
1738
- type: "integer",
1739
- description: "Unix timestamp in milliseconds when the error occurred."
1740
- },
1741
- status: {
1742
- type: "integer",
1743
- description: "HTTP status code returned with the error."
1744
- },
1745
2315
  error: {
1746
2316
  type: "string",
1747
- description: "Specific error type (e.g., SYMBOL_NOT_FOUND, VALIDATION_ERROR)."
2317
+ description: "Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, RATE_NOT_FOUND)."
1748
2318
  },
1749
2319
  message: {
1750
2320
  type: "string",
@@ -1752,10 +2322,42 @@ var historical_commodity_prices_default = {
1752
2322
  },
1753
2323
  path: {
1754
2324
  type: "string",
1755
- description: "API endpoint path that produced the error."
2325
+ description: "API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error."
2326
+ },
2327
+ status: {
2328
+ type: "integer",
2329
+ description: "HTTP status code. Present on gateway-level errors."
2330
+ },
2331
+ code: {
2332
+ type: "integer",
2333
+ description: "HTTP status code. Present on commodity-service errors instead of status."
2334
+ },
2335
+ timestamp: {
2336
+ type: "string",
2337
+ format: "date-time",
2338
+ description: "Timestamp when the error occurred (ISO 8601)."
2339
+ },
2340
+ unresolved: {
2341
+ type: "object",
2342
+ description: "Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.",
2343
+ additionalProperties: {
2344
+ type: "object",
2345
+ properties: {
2346
+ message: {
2347
+ type: "string",
2348
+ description: "Detail message explaining why this symbol was not resolved."
2349
+ },
2350
+ suggestions: {
2351
+ type: "array",
2352
+ description: "Optional list of supported symbols that closely match the unresolved symbol.",
2353
+ items: {
2354
+ type: "string"
2355
+ }
2356
+ }
2357
+ }
2358
+ }
1756
2359
  }
1757
- },
1758
- description: "Standard error envelope returned by the API on failed requests."
2360
+ }
1759
2361
  }
1760
2362
  },
1761
2363
  headers: {
@@ -49518,11 +50120,11 @@ var SPECS = {
49518
50120
  var SPEC_SLUGS = ["usage-credits", "commodity-fluctuation", "commodity-prices", "commodity-symbols", "commodity-time-series", "historical-commodity-prices", "currency-converter", "currency-fluctuation", "currency-historical-data-limit", "currency-rate", "currency-supported", "currency-symbols", "currency-time-series", "geolocalized-currency-conversion", "historical-currency-converter", "historical-currency-rate", "bulk-dns-lookup", "dns-history-lookup", "dns-lookup", "reverse-dns-lookup", "bulk-domain-checker", "domain-reputation", "domain-search-with-suggestions", "domain-search", "domain-typosquatting", "subdomain-lookup", "bulk-email-validation", "email-checker", "bulk-vat-rates-country", "financial-apis-supported-countries", "iban-validation", "swift-code-finder", "swift-code-lookup", "vat-number-validation", "vat-rates-by-ip", "vat-rates-country", "forward-geocoding", "reverse-geocoding", "administrative-units-details", "administrative-units-levels", "administrative-units", "cities", "countries-details", "countries", "flags-supported", "flags", "regions", "subregions", "bulk-ip-lookup", "bulk-ip-threat-intelligence", "ip-locator", "ip-threat-intelligence", "delete-pdf-page", "linearize-pdf", "merge-pdf", "pdf-compress", "pdf-decrypt", "pdf-encrypt", "pdf-extract-pages", "pdf-file-status", "pdf-file", "pdf-files", "pdf-generator-bulk", "pdf-generator", "pdf-resource-download", "pdf-resource-upload-binary", "pdf-resource-upload", "pdf-restrict", "pdf-task-status", "pdf-to-image", "pdf-unrestrict", "rotate-pdf-pages", "split-pdf", "bulk-phone-number-validation", "phone-validation", "web-scraper", "bulk-screenshot", "website-screenshot", "ssl-certificate-chain-lookup", "ssl-certificate-lookup", "timezone-converter", "timezone-lookup", "bulk-user-agent-parser", "user-agent-parser", "air-quality", "astronomy-data", "bulk-live-weather", "flood-forecast", "historical-weather", "live-weather", "marine-weather", "time-series-weather", "weather-forecast", "asn-lookup", "bulk-whois-lookup", "domain-whois-history-lookup", "reverse-whois", "whois-domain-lookup", "whois-ip-lookup", "bulk-zip-code-lookup", "zip-code-api", "zip-code-distance-match", "zip-code-distance", "zip-codes-by-city", "zip-codes-by-region", "zip-codes-radius-search"];
49519
50121
  var SPECS_YAML = {
49520
50122
  "usage-credits": "openapi: 3.1.1\ninfo:\n title: Credits Usage API\n version: 1.0.0\n description: Retrieve the remaining and consumed API credit balances for the authenticated organization. Returns subscription-plan credits, subscription surcharge (overage) credits, and one-off credit purchases as separate balances, each with allowed and used counts. Only an organization admin API key can call this endpoint; all other keys receive a 403. There are no optional data modules for this endpoint \u2014 the response always includes the full credit breakdown.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v1.0\n description: Credits Usage API Server\npaths:\n /credits/usage/info:\n get:\n tags:\n - General APIs\n summary: Get remaining and consumed API credit balances for the organization\n description: Returns subscription, subscription-surcharge, and one-off credit balances for the authenticated organization's account.\n operationId: getCreditsUsage\n parameters:\n - name: format\n in: query\n required: false\n description: 'Format of the response. Possible values: json, xml.'\n schema:\n type: string\n enum:\n - json\n - xml\n default: json\n responses:\n '200':\n description: Successful response with credit balances\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CreditsUsageResponse'\n examples:\n success:\n summary: Typical response\n value:\n apiKey: demo\n userStatus: active\n subActive: true\n subStatus: active\n subAllowedCredits: 10000\n subUsedCredits: 2500\n subSurchargeStatus: none\n subSurchargeAllowedCredits: 0\n subSurchargeUsedCredits: 0\n subSurchargeAllowed: false\n oneOffCreditsActive: true\n oneOffAllowedCredits: 5000\n oneOffUsedCredits: 1000\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '403':\n description: Forbidden \u2014 Caller is not an organization admin\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n notOrgAdmin:\n summary: Not an organization admin\n value:\n timestamp: '2026-07-27T10:23:16.548Z'\n path: /v1.0/credits/usage/info\n status: 403\n error: API Access Exception\n message: You need to be organization admin to access this endpoint.\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n CreditsUsageResponse:\n type: object\n description: Credit balances for the organization's subscription, subscription surcharge, and one-off purchases.\n required:\n - apiKey\n - userStatus\n - oneOffCreditsActive\n - oneOffAllowedCredits\n - oneOffUsedCredits\n properties:\n apiKey:\n type: string\n description: The API key the credit balances belong to.\n userStatus:\n type: string\n enum:\n - active\n - inactive\n - deleted\n description: Status of the user account.\n subActive:\n type:\n - boolean\n - 'null'\n description: Whether a subscription plan is currently active. Null if the account has no subscription.\n subStatus:\n type:\n - string\n - 'null'\n enum:\n - active\n - overdue\n - cancelled\n - deactivated\n - null\n description: Status of the subscription credits. Null if the account has no subscription.\n subAllowedCredits:\n type:\n - integer\n - 'null'\n description: Total credits allowed under the subscription plan. Null if the account has no subscription.\n subUsedCredits:\n type:\n - integer\n - 'null'\n description: Credits consumed under the subscription plan. Null if the account has no subscription.\n subSurchargeStatus:\n type:\n - string\n - 'null'\n enum:\n - none\n - payment_added\n - payment_cleared\n - null\n description: Status of the subscription surcharge (overage) credits. Null if the account has no subscription.\n subSurchargeAllowedCredits:\n type:\n - integer\n - 'null'\n description: Total surcharge credits allowed. Null if the account has no subscription.\n subSurchargeUsedCredits:\n type:\n - integer\n - 'null'\n description: Surcharge credits consumed. Null if the account has no subscription.\n subSurchargeAllowed:\n type:\n - boolean\n - 'null'\n description: Whether surcharge (overage) usage is allowed on the subscription. Null if the account has no subscription.\n oneOffCreditsActive:\n type: boolean\n description: Whether the account has active one-off (pay-as-you-go) credits.\n oneOffAllowedCredits:\n type: integer\n description: Total one-off credits purchased.\n oneOffUsedCredits:\n type: integer\n description: One-off credits consumed.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type.\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path that produced the error.\n status:\n type: integer\n description: HTTP status code returned with the error.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
49521
- "commodity-fluctuation": "openapi: 3.1.1\ninfo:\n title: 'Commodity Fluctuation API '\n version: 1.0.0\n description: Calculate price change and percentage movement for any commodity over a custom date range. Returns the opening price, closing price, absolute change, and percentage change for each symbol. Accepts one or more comma-separated commodity symbols with a start and end date in YYYY-MM-DD format. Returns a 400 error for invalid dates or a date range where start is after end, and a 404 error for unsupported symbols or a date range with no available data.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v1.0\n description: Commodity Fluctuation API Server\npaths:\n /commodity/fluctuation:\n get:\n tags:\n - Commodity APIs\n summary: Get commodity price fluctuations\n description: Returns price fluctuation metrics (start, end, change, percent change) for the requested commodity symbols over a date range.\n operationId: getCommodityFluctuation\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols.\n schema:\n type: string\n - name: startDate\n in: query\n required: true\n description: Start date in `YYYY-MM-DD` format.\n schema:\n type: string\n - name: endDate\n in: query\n required: true\n description: End date in `YYYY-MM-DD` format.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityFluctuationResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n startDate: '2024-01-01'\n endDate: '2024-01-31'\n rates:\n WTIOIL-SPOT:\n startRate: 72.02\n endRate: 75.81\n change: 3.79\n changePercent: 5.26\n XAU:\n startRate: 2063.63\n endRate: 2039.83\n change: -23.8\n changePercent: -1.15\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad Request \u2014 Missing parameters or invalid dates\n content:\n application/json:\n examples:\n missingSymbols:\n summary: Missing required symbols parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v1.0/commodity/fluctuation\n status: 400\n timestamp: '2026-07-27T11:37:24.273Z'\n invalidDateFormat:\n summary: Date is not in YYYY-MM-DD format\n value:\n timestamp: '2026-07-27T11:37:22.687Z'\n path: /rates/fluctuation\n code: 400\n error: VALIDATION_ERROR\n message: Invalid Date Format (YYYY-MM-DD).\n dateNotExist:\n summary: Date does not exist on the calendar (e.g. Feb 30)\n value:\n timestamp: '2026-07-27T11:37:33.565Z'\n path: /rates/fluctuation\n code: 400\n error: VALIDATION_ERROR\n message: 'Invalid Date: The provided start date or end date does not exist.'\n startAfterEnd:\n summary: startDate is after endDate\n value:\n timestamp: '2026-07-27T11:37:23.206Z'\n path: /rates/fluctuation\n code: 400\n error: VALIDATION_ERROR\n message: Start date cannot be after end date\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or data not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: '2026-07-27T11:37:23.759Z'\n path: /rates/fluctuation\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n noData:\n summary: No data available for the given date range\n value:\n timestamp: '2026-07-27T11:37:34.167Z'\n path: /rates/fluctuation\n code: 404\n error: DATA_NOT_FOUND\n message: No data found for the given date range\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n CommodityFluctuationResponse:\n type: object\n required:\n - success\n - startDate\n - endDate\n - rates\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n startDate:\n type: string\n description: Start date of the interval (YYYY-MM-DD).\n endDate:\n type: string\n description: End date of the interval (YYYY-MM-DD).\n rates:\n $ref: '#/components/schemas/CommodityFluctuationRates'\n description: Commodity fluctuation response containing price change data per symbol over a date range.\n CommodityFluctuationRates:\n type: object\n description: Map of requested commodity symbols to their fluctuation metrics. Each key is a commodity symbol (e.g. XAU).\n additionalProperties:\n title: CommodityFluctuationItem\n type: object\n description: Fluctuation metrics for a single commodity over a date range.\n required:\n - startRate\n - endRate\n - change\n - changePercent\n properties:\n startRate:\n type: number\n format: float\n description: Price of the commodity on the start date.\n endRate:\n type: number\n format: float\n description: Price of the commodity on the end date.\n change:\n type: number\n format: float\n description: Absolute price difference between end and start dates. May be negative.\n changePercent:\n type: number\n format: float\n description: Percentage price change from start to end date. May be negative.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests. Gateway-level validation errors populate status; commodity-service errors (date/symbol/data validation) populate code instead \u2014 check whichever is present.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, DATA_NOT_FOUND).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error.\n status:\n type: integer\n description: HTTP status code. Present on gateway-level errors.\n code:\n type: integer\n description: HTTP status code. Present on commodity-service errors instead of status.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
49522
- "commodity-prices": "openapi: 3.1.1\ninfo:\n title: Live Commodity Prices API - Real Time Market Insights\n version: 1.0.0\n description: Get real-time prices for 130+ commodities in a single request. Returns current market prices for each requested symbol plus unit and quote currency metadata. Supports an optional quote parameter to convert prices into a desired currency, defaulting to each commodity's native market currency. Accepts 1-minute or 10-minute update frequencies for price freshness. An unsupported symbol or quote currency returns a 404.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v1.0\n description: Live Commodity Prices API Server\npaths:\n /commodity/rates/latest:\n get:\n tags:\n - Commodity APIs\n summary: Get latest commodity prices\n description: Returns the current live price for the requested commodity symbols.\n operationId: getLatestCommodityPrices\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols (e.g., `XAU`, `WTIOIL-SPOT`).\n schema:\n type: string\n - name: updates\n in: query\n required: true\n description: 'Update frequency. Accepted values: `1m` (default), `10m`.'\n schema:\n type: string\n enum:\n - 1m\n - 10m\n default: 1m\n - name: quote\n in: query\n required: false\n description: Target currency for the exchange rate. Defaults to the market currency of each commodity.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/LiveCommodityPricesResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n timestamp: 1785152172\n rates:\n XAU: 4099.1\n WTIOIL-SPOT: 81.88\n metadata:\n XAU:\n unit: T.oz\n quote: USD\n WTIOIL-SPOT:\n unit: Bbl\n quote: USD\n withQuoteConversion:\n summary: Price converted to a target quote currency\n value:\n success: true\n timestamp: 1785152172\n rates:\n XAU: 3597.734\n metadata:\n XAU:\n unit: T.oz\n quote: EUR\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad Request \u2014 Missing or invalid query parameters\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n missingSymbols:\n summary: Missing required symbols parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v1.0/commodity/rates/latest\n status: 400\n timestamp: '2026-07-27T11:36:13.312Z'\n invalidUpdates:\n summary: updates is not 1m or 10m\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v1.0/commodity/rates/latest\n status: 400\n timestamp: '2026-07-27T11:36:35.755Z'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or quote currency not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityNotFoundError'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: 1781792620618\n path: /rates/latestRates\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n quoteNotFound:\n summary: Quote Currency Not Found\n value:\n timestamp: 1781792620618\n path: /rates/latestRates\n code: 404\n error: QUOTE_NOT_FOUND\n message: The quote currency is invalid, please visit the documentation for a list of valid quote currencies\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n LiveCommodityPricesResponse:\n type: object\n required:\n - success\n - timestamp\n - rates\n - metadata\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n timestamp:\n type: integer\n description: Unix timestamp (seconds) indicating when the response was generated.\n rates:\n $ref: '#/components/schemas/CommodityRates'\n metadata:\n $ref: '#/components/schemas/CommodityMetadata'\n description: Live commodity prices response containing success status, timestamp, rates, and metadata.\n CommodityRates:\n type: object\n description: Map of requested commodity symbols to their current live price. Each key is a commodity symbol (e.g. XAU); the value is the current price.\n additionalProperties:\n title: CommodityPrice\n type: number\n description: Current live price for this commodity symbol.\n CommodityMetadata:\n type: object\n description: Map of requested commodity symbols to their unit and quote currency metadata. Each key is a commodity symbol (e.g. XAU).\n additionalProperties:\n title: CommodityMetadataItem\n type: object\n description: Unit and currency metadata for a single commodity.\n required:\n - unit\n - quote\n properties:\n unit:\n type: string\n description: Unit of measurement for the commodity (e.g., Bbl, T.oz).\n quote:\n type: string\n description: Quote currency used for this commodity's price.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type.\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path that produced the error.\n status:\n type: integer\n description: HTTP status code returned with the error.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n CommodityNotFoundError:\n type: object\n description: Error envelope returned by the commodity pricing service specifically for unresolvable symbol/quote errors. Uses `code` instead of `status` and a Unix millisecond `timestamp`, unlike the standard ErrorResponse.\n required:\n - code\n - error\n - message\n properties:\n timestamp:\n type: integer\n description: Unix timestamp in milliseconds when the error occurred.\n path:\n type: string\n description: Internal service path that produced the error.\n code:\n type: integer\n description: HTTP status code returned with the error.\n error:\n type: string\n description: Specific error type (e.g., SYMBOL_NOT_FOUND, QUOTE_NOT_FOUND).\n message:\n type: string\n description: Human-readable error message describing the failure.\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
49523
- "commodity-symbols": "openapi: 3.1.1\ninfo:\n title: Commodity Symbols API Reference\n version: 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",
49524
- "commodity-time-series": "openapi: 3.1.1\ninfo:\n title: Commodities Time Series API\n version: 1.0.0\n description: Retrieve daily OHLC (open, high, low, close) price data for any supported commodity over a date range of up to 365 days. Accepts one or more comma-separated commodity symbols with a start and end date in YYYY-MM-DD format. Returns a date-indexed object where each date key maps to per-symbol OHLC data. Non-trading days are automatically excluded. Returns a 400 error for invalid dates or a range exceeding 365 days, and a 404 error for unsupported symbols or a date range with no available data.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v1.0\n description: Commodity Time Series API Server\npaths:\n /commodity/time-series:\n get:\n tags:\n - Commodity APIs\n summary: Get commodity price time series\n description: Returns day-by-day OHLC data for the requested commodity symbols within a date range.\n operationId: getCommodityTimeSeries\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols.\n schema:\n type: string\n - name: startDate\n in: query\n required: true\n description: Start date in `YYYY-MM-DD` format.\n schema:\n type: string\n - name: endDate\n in: query\n required: true\n description: End date in `YYYY-MM-DD` format. Maximum range is 365 days.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityTimeSeriesResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n startDate: '2025-01-06'\n endDate: '2025-01-08'\n rates:\n '2025-01-06':\n XAU:\n open: 2649.01\n high: 2651.33\n low: 2645.36\n close: 2646.91\n '2025-01-07':\n XAU:\n open: 2662.45\n high: 2663.06\n low: 2655.66\n close: 2658.9\n '2025-01-08':\n XAU:\n open: 2669.69\n high: 2674.68\n low: 2668.58\n close: 2671.8\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad Request \u2014 Missing parameters, invalid dates, or date range exceeded\n content:\n application/json:\n examples:\n missingSymbols:\n summary: Missing required symbols parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v1.0/commodity/time-series\n status: 400\n timestamp: '2026-07-27T11:38:40.063Z'\n invalidDate:\n summary: Date does not exist on the calendar\n value:\n timestamp: '2026-07-27T11:38:41.234Z'\n path: /rates/time-series\n code: 400\n error: VALIDATION_ERROR\n message: 'Invalid Date: The provided start date or end date does not exist.'\n startAfterEnd:\n summary: startDate is after endDate\n value:\n timestamp: '2026-07-27T11:38:41.234Z'\n path: /rates/time-series\n code: 400\n error: VALIDATION_ERROR\n message: start date cannot be after end date\n dateRangeExceeded:\n summary: Date range exceeds 365 days\n value:\n timestamp: '2026-07-27T11:38:40.699Z'\n path: /rates/time-series\n code: 400\n error: VALIDATION_ERROR\n message: Date range exceeds the allowed limit.\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or data not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: '2026-07-27T11:38:41.234Z'\n path: /rates/time-series\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n dataNotFound:\n summary: No data available for the given date range\n value:\n timestamp: '2026-07-27T11:38:41.234Z'\n path: /rates/time-series\n code: 404\n error: DATA_NOT_FOUND\n message: No data found for the specified date range\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n CommodityTimeSeriesResponse:\n type: object\n required:\n - success\n - startDate\n - endDate\n - rates\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n startDate:\n type: string\n description: Start date of the time series (YYYY-MM-DD).\n endDate:\n type: string\n description: End date of the time series (YYYY-MM-DD).\n rates:\n $ref: '#/components/schemas/CommodityTimeSeriesRates'\n description: Commodity time series response containing date-indexed OHLC data per symbol.\n CommodityTimeSeriesRates:\n type: object\n description: Map of trading dates to per-symbol OHLC data. Each key is a trading date (YYYY-MM-DD); non-trading days are excluded.\n additionalProperties:\n title: CommodityTimeSeriesSymbolData\n type: object\n description: Map of commodity symbols to their OHLC data for a single trading date. Each key is a commodity symbol (e.g. XAU).\n additionalProperties:\n $ref: '#/components/schemas/CommodityOhlc'\n CommodityOhlc:\n type: object\n description: OHLC price data for a single commodity on a single trading day.\n required:\n - open\n - high\n - low\n - close\n properties:\n open:\n type: number\n format: float\n description: Opening price on the given date.\n high:\n type: number\n format: float\n description: Highest price on the given date.\n low:\n type: number\n format: float\n description: Lowest price on the given date.\n close:\n type: number\n format: float\n description: Closing price on the given date.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests. Gateway-level validation errors populate status; commodity-service errors (date/symbol/data validation) populate code instead \u2014 check whichever is present.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, DATA_NOT_FOUND).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error.\n status:\n type: integer\n description: HTTP status code. Present on gateway-level errors.\n code:\n type: integer\n description: HTTP status code. Present on commodity-service errors instead of status.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
49525
- "historical-commodity-prices": "openapi: 3.1.1\ninfo:\n title: Historical Commodity Prices, Delivered Simply.\n version: 1.0.0\n description: Retrieve OHLC (open, high, low, close) price data for any supported commodity on a specific date. Data is available from January 1990 onwards for 130+ commodities. Accepts one or more comma-separated commodity symbols and a date in YYYY-MM-DD format. The response contains the opening, high, low, and closing price for each symbol on the given date. Returns a 400 error for invalid dates and a 404 error for unsupported symbols or missing rates.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v1.0\n description: Historical Commodity Prices API Server\npaths:\n /commodity/rates/historical:\n get:\n tags:\n - Commodity APIs\n summary: Get historical commodity prices\n description: Returns OHLC price data for the requested commodity symbols on a specific date.\n operationId: getHistoricalCommodityPrices\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols.\n schema:\n type: string\n - name: date\n in: query\n required: true\n description: Date in `YYYY-MM-DD` format. Data available from 1990 onwards.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/HistoricalCommodityPricesResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n date: '2025-01-10'\n rates:\n WTIOIL-SPOT:\n date: '2025-01-10'\n open: 73.77\n high: 77.16\n low: 73.55\n close: 75.97\n XAU:\n date: '2025-01-10'\n open: 2669.93\n high: 2697.85\n low: 2663.61\n close: 2689.44\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad request - Invalid date format\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n invalidDateFormat:\n summary: Invalid date format\n value:\n timestamp: 1781792620618\n status: 400\n error: VALIDATION_ERROR\n message: Invalid Date Format (YYYY-MM-DD).\n path: /v1.0/commodity/rates/historical\n dateNotExist:\n summary: Date does not exist\n value:\n timestamp: 1781792620618\n status: 400\n error: VALIDATION_ERROR\n message: 'Invalid Date: The provided date does not exist.'\n path: /v1.0/commodity/rates/historical\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or rate not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: 1781792620618\n status: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n path: /v1.0/commodity/rates/historical\n rateNotFound:\n summary: Rate Not Found\n value:\n timestamp: 1781792620618\n status: 404\n error: RATE_NOT_FOUND\n message: no rates found for the specified date\n path: /v1.0/commodity/rates/historical\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n HistoricalCommodityPricesResponse:\n type: object\n required:\n - success\n - date\n - rates\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n date:\n type: string\n description: Date for which prices were fetched (YYYY-MM-DD).\n rates:\n $ref: '#/components/schemas/HistoricalCommodityRates'\n description: Historical commodity prices response containing success status, date, and OHLC rate data.\n HistoricalCommodityRates:\n type: object\n description: Object of commodity symbols to their OHLC price data. Each key is a commodity symbol and the value contains date, open, high, low, and close prices.\n properties:\n symbol:\n $ref: '#/components/schemas/HistoricalCommodityRate'\n required:\n - symbol\n HistoricalCommodityRate:\n type: object\n description: OHLC price data for a single commodity on a specific date.\n required:\n - date\n - open\n - high\n - low\n - close\n properties:\n date:\n type: string\n description: Date for which prices were fetched (YYYY-MM-DD).\n open:\n type: number\n format: float\n description: Opening price on the given date.\n high:\n type: number\n format: float\n description: Highest price recorded on the given date.\n low:\n type: number\n format: float\n description: Lowest price recorded on the given date.\n close:\n type: number\n format: float\n description: Closing price on the given date.\n ErrorResponse:\n type: object\n required:\n - timestamp\n - status\n - error\n - message\n - path\n properties:\n timestamp:\n type: integer\n description: Unix timestamp in milliseconds when the error occurred.\n status:\n type: integer\n description: HTTP status code returned with the error.\n error:\n type: string\n description: Specific error type (e.g., SYMBOL_NOT_FOUND, VALIDATION_ERROR).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path that produced the error.\n description: Standard error envelope returned by the API on failed requests.\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
50123
+ "commodity-fluctuation": "openapi: 3.1.1\ninfo:\n title: 'Commodity Fluctuation API '\n version: 2.0.0\n description: Price change and percentage movement for one or more commodities over a custom date range, with no limit on range length. For monthly-updated commodities the range snaps to month boundaries. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v2.0\n description: Commodity Fluctuation API Server\npaths:\n /commodity/fluctuation:\n get:\n tags:\n - Commodity APIs\n summary: Get commodity price fluctuations\n description: Returns price fluctuation metrics (start, end, change, percent change) for the requested commodity symbols over a date range.\n operationId: getCommodityFluctuation\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols.\n schema:\n type: string\n - name: startDate\n in: query\n required: true\n description: Start date in `YYYY-MM-DD` format.\n schema:\n type: string\n - name: endDate\n in: query\n required: true\n description: End date in `YYYY-MM-DD` format.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityFluctuationResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n startDate: '2024-01-01'\n endDate: '2024-01-31'\n rates:\n WTIOIL-SPOT:\n startRate: 72.02\n endRate: 75.81\n change: 3.79\n changePercent: 5.26\n XAU:\n startRate: 2063.63\n endRate: 2039.83\n change: -23.8\n changePercent: -1.15\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '206':\n description: Partial Content \u2014 Some requested symbols could not be resolved\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityFluctuationResponse'\n examples:\n partial:\n summary: One valid symbol, one unresolved symbol\n value:\n success: true\n startDate: '2024-01-01'\n endDate: '2024-01-31'\n rates:\n XAU:\n startRate: 2063.63\n endRate: 2039.83\n change: -23.8\n changePercent: -1.15\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad Request \u2014 Missing parameters or invalid dates\n content:\n application/json:\n examples:\n missingSymbols:\n summary: Missing required symbols parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v2.0/commodity/fluctuation\n status: 400\n timestamp: '2026-09-14T08:43:46.481Z'\n invalidDateFormat:\n summary: Date is not in YYYY-MM-DD format\n value:\n timestamp: '2026-07-27T11:37:22.687Z'\n path: /rates/fluctuation\n code: 400\n error: VALIDATION_ERROR\n message: Invalid Date Format (YYYY-MM-DD).\n dateNotExist:\n summary: Date does not exist on the calendar (e.g. Feb 30)\n value:\n timestamp: '2026-07-27T11:37:33.565Z'\n path: /rates/fluctuation\n code: 400\n error: VALIDATION_ERROR\n message: 'Invalid Date: The provided start date or end date does not exist.'\n startAfterEnd:\n summary: startDate is after endDate\n value:\n timestamp: '2026-07-27T11:37:23.206Z'\n path: /rates/fluctuation\n code: 400\n error: VALIDATION_ERROR\n message: Start date cannot be after end date\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '402':\n description: Payment Required \u2014 Maximum symbols per request exceeded\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n maxSymbolsExceeded:\n summary: Too many symbols requested\n value:\n timestamp: '2026-09-14T08:43:48.408Z'\n path: /rates/fluctuation\n code: 402\n error: PAYMENT_REQUIRED\n message: Maximum symbols per request exceeded\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or data not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: '2026-09-14T08:43:48.408Z'\n path: /rates/fluctuation\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n noData:\n summary: No data available for the given date range\n value:\n timestamp: '2026-09-14T08:44:31.022Z'\n path: /rates/fluctuation\n code: 404\n error: DATA_NOT_FOUND\n message: No data found for the given date range\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n CommodityFluctuationResponse:\n type: object\n required:\n - success\n - startDate\n - endDate\n - rates\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n startDate:\n type: string\n description: Start date of the interval (YYYY-MM-DD).\n endDate:\n type: string\n description: End date of the interval (YYYY-MM-DD).\n rates:\n $ref: '#/components/schemas/CommodityFluctuationRates'\n unresolved:\n type: object\n description: Present only on a 206 Partial Content response, when some requested symbols could not be resolved. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n description: Commodity fluctuation response containing price change data per symbol over a date range.\n CommodityFluctuationRates:\n type: object\n description: Map of requested commodity symbols to their fluctuation metrics. Each key is a commodity symbol (e.g. XAU).\n additionalProperties:\n title: CommodityFluctuationItem\n type: object\n description: Fluctuation metrics for a single commodity over a date range.\n required:\n - startRate\n - endRate\n - change\n - changePercent\n properties:\n startRate:\n type: number\n format: float\n description: Price of the commodity on the start date.\n endRate:\n type: number\n format: float\n description: Price of the commodity on the end date.\n change:\n type: number\n format: float\n description: Absolute price difference between end and start dates. May be negative.\n changePercent:\n type: number\n format: float\n description: Percentage price change from start to end date. May be negative.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests. Gateway-level validation errors populate status; commodity-service errors (date/symbol/data validation) populate code instead \u2014 check whichever is present.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, DATA_NOT_FOUND).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error.\n status:\n type: integer\n description: HTTP status code. Present on gateway-level errors.\n code:\n type: integer\n description: HTTP status code. Present on commodity-service errors instead of status.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n unresolved:\n type: object\n description: Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
50124
+ "commodity-prices": "openapi: 3.1.1\ninfo:\n title: Live Commodity Prices API - Real Time Market Insights\n version: 2.0.0\n description: Real-time prices for 245+ commodities in a single request, updated on a rolling ~10 minute cadence. Optionally convert prices into a target quote currency. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v2.0\n description: Live Commodity Prices API Server\npaths:\n /commodity/rates/latest:\n get:\n tags:\n - Commodity APIs\n summary: Get latest commodity prices\n description: Returns the current live price for the requested commodity symbols.\n operationId: getLatestCommodityPrices\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols (e.g., `XAU`, `WTIOIL-SPOT`).\n schema:\n type: string\n - name: quote\n in: query\n required: false\n description: Target currency for the exchange rate. Defaults to the market currency of each commodity.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/LiveCommodityPricesResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n timestamp: 1789375397\n rates:\n XAU: 4313.04\n WTIOIL-SPOT: 100\n metadata:\n XAU:\n unit: T.oz\n quote: USD\n WTIOIL-SPOT:\n unit: Bbl\n quote: USD\n withQuoteConversion:\n summary: Price converted to a target quote currency\n value:\n success: true\n timestamp: 1789375426\n rates:\n XAU: 3739.023\n metadata:\n XAU:\n unit: T.oz\n quote: EUR\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '206':\n description: Partial Content \u2014 Some requested symbols could not be resolved\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/LiveCommodityPricesResponse'\n examples:\n partial:\n summary: One valid symbol, one unresolved symbol\n value:\n success: true\n timestamp: 1789376193\n rates:\n XAU: 4311.88\n metadata:\n XAU:\n unit: T.oz\n quote: USD\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n partialWithSuggestions:\n summary: Unresolved symbol with close-match suggestions\n value:\n success: true\n timestamp: 1789376644\n rates:\n XAU: 4306.06\n metadata:\n XAU:\n unit: T.oz\n quote: USD\n unresolved:\n ZW:\n message: Did you mean ZW-SPOT (Wheat Spot) or ZW-FUT (Wheat Futures)?\n suggestions:\n - ZW-SPOT\n - ZW-FUT\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad Request \u2014 Missing or invalid query parameters\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n missingSymbols:\n summary: Missing required symbols parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v2.0/commodity/rates/latest\n status: 400\n timestamp: '2026-09-14T08:43:43.964Z'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '402':\n description: Payment Required \u2014 Maximum symbols per request exceeded\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityNotFoundError'\n examples:\n maxSymbolsExceeded:\n summary: Too many symbols requested\n value:\n timestamp: '2026-09-14T08:43:44.957Z'\n path: /rates/latestRates\n code: 402\n error: PAYMENT_REQUIRED\n message: Maximum symbols per request exceeded\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or quote currency not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityNotFoundError'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: '2026-09-14T08:43:44.957Z'\n path: /rates/latestRates\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n symbolNotFoundWithSuggestions:\n summary: Symbol Not Found, with close-match suggestions\n value:\n timestamp: '2026-09-14T09:04:04.878Z'\n path: /rates/latestRates\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n unresolved:\n ZW:\n message: Did you mean ZW-SPOT (Wheat Spot) or ZW-FUT (Wheat Futures)?\n suggestions:\n - ZW-SPOT\n - ZW-FUT\n quoteNotFound:\n summary: Quote Currency Not Found\n value:\n timestamp: '2026-09-14T08:43:45.461Z'\n path: /rates/latestRates\n code: 404\n error: QUOTE_NOT_FOUND\n message: The quote currency is invalid, please visit the documentation for a list of valid quote currencies\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n LiveCommodityPricesResponse:\n type: object\n required:\n - success\n - timestamp\n - rates\n - metadata\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n timestamp:\n type: integer\n description: Unix timestamp (seconds) indicating when the response was generated.\n rates:\n $ref: '#/components/schemas/CommodityRates'\n metadata:\n $ref: '#/components/schemas/CommodityMetadata'\n unresolved:\n type: object\n description: Present only on a 206 Partial Content response, when some requested symbols could not be resolved. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n warning:\n type: string\n description: Present only when currency conversion for the requested `quote` is temporarily unavailable; rates are returned in each commodity's default currency instead.\n description: Live commodity prices response containing success status, timestamp, rates, and metadata.\n CommodityRates:\n type: object\n description: Map of requested commodity symbols to their current live price. Each key is a commodity symbol (e.g. XAU); the value is the current price.\n additionalProperties:\n title: CommodityPrice\n type: number\n description: Current live price for this commodity symbol.\n CommodityMetadata:\n type: object\n description: Map of requested commodity symbols to their unit and quote currency metadata. Each key is a commodity symbol (e.g. XAU).\n additionalProperties:\n title: CommodityMetadataItem\n type: object\n description: Unit and currency metadata for a single commodity.\n required:\n - unit\n - quote\n properties:\n unit:\n type: string\n description: Unit of measurement for the commodity (e.g., Bbl, T.oz).\n quote:\n type: string\n description: Quote currency used for this commodity's price.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type.\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path that produced the error.\n status:\n type: integer\n description: HTTP status code returned with the error.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n CommodityNotFoundError:\n type: object\n description: Error envelope returned by the commodity pricing service specifically for unresolvable symbol/quote errors. Uses `code` instead of `status` and an ISO 8601 `timestamp`, unlike the standard ErrorResponse.\n required:\n - code\n - error\n - message\n properties:\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n path:\n type: string\n description: Internal service path that produced the error.\n code:\n type: integer\n description: HTTP status code returned with the error.\n error:\n type: string\n description: Specific error type (e.g., SYMBOL_NOT_FOUND, QUOTE_NOT_FOUND).\n message:\n type: string\n description: Human-readable error message describing the failure.\n unresolved:\n type: object\n description: Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
50125
+ "commodity-symbols": "openapi: 3.1.1\ninfo:\n title: Commodity Symbols API Reference\n version: 2.0.0\n description: 'Full catalog of 245+ supported commodities across Metals, Energy, Agriculture, Industrial, Raw Materials, Oils and Meals, Textiles, Meats, Poultry, and Livestock, with pricing currency, unit, and update interval per symbol. Deprecated symbols stay listed with `status: \"inactive\"` and a `deprecationDate`.'\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v2.0\n description: Commodity Symbols API Server\npaths:\n /commodity/symbols:\n get:\n tags:\n - Commodity APIs\n summary: Get all supported commodity symbols\n description: Returns the list of supported commodity symbols with metadata.\n operationId: getCommoditySymbols\n parameters:\n - name: format\n in: query\n required: false\n description: 'Response format. Accepted values: `json` (default) or `xml`.'\n schema:\n type: string\n enum:\n - json\n default: json\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommoditySymbolsResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n symbols:\n - symbol: XAU\n name: Gold\n category: Metals\n status: active\n updateInterval: PER_SECOND\n currency:\n code: USD\n name: US Dollar\n symbol: $\n unit:\n symbol: T.oz\n name: Troy Ounce\n - symbol: NG-FUT\n name: Natural Gas Futures\n category: Energy\n status: active\n updateInterval: PER_MINUTE\n currency:\n code: USD\n name: US Dollar\n symbol: $\n unit:\n symbol: MMBtu\n name: Million British Thermal Units\n - symbol: NG-EU\n name: Natural Gas, Europe\n category: Energy\n status: active\n updateInterval: PER_MONTH\n exchange: World Bank\n currency:\n code: USD\n name: US Dollar\n symbol: $\n unit:\n symbol: MMBtu\n name: Million British Thermal Units\n - symbol: UANEU\n name: Urea Ammonium Nitrate\n category: Industrial\n status: inactive\n updateInterval: PER_MINUTE\n deprecationDate: '2024-04-14'\n currency:\n code: USD\n name: US Dollar\n symbol: $\n unit:\n symbol: T\n name: Metric Ton\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n CommoditySymbolsResponse:\n type: object\n required:\n - success\n - symbols\n properties:\n success:\n type: boolean\n description: Indicates whether the API request was successful.\n symbols:\n type: array\n description: Array of commodity symbol objects with metadata.\n items:\n $ref: '#/components/schemas/CommoditySymbolItem'\n description: Commodity symbols response containing an array of supported commodity symbol objects.\n CommoditySymbolItem:\n type: object\n description: A single commodity symbol with metadata.\n required:\n - symbol\n - name\n - category\n - status\n - updateInterval\n - currency\n - unit\n properties:\n symbol:\n type: string\n description: Unique identifier/ticker symbol for the commodity (e.g., XAU, NG-FUT). Use this value in the `symbols` parameter of the rate endpoints.\n name:\n type: string\n description: Full name of the commodity (e.g., Gold, Natural Gas Futures).\n description:\n type: string\n description: Short description of the commodity. May be an empty string for some symbols.\n category:\n type: string\n description: Category the commodity belongs to (e.g., Metals, Energy, Agriculture, Industrial, Raw Materials, Oils and Meals, Textiles, Meats, Poultry, Livestock).\n status:\n type: string\n enum:\n - active\n - inactive\n description: 'Current status of the commodity. `inactive` means the symbol is deprecated: latest rates are unavailable, but historical rates remain available up to its `deprecationDate`.'\n updateInterval:\n type: string\n enum:\n - PER_SECOND\n - PER_MINUTE\n - PER_10_MINUTES\n - PER_HOUR\n - PER_DAY\n - PER_WEEK\n - PER_MONTH\n description: Rate at which the price is updated.\n exchange:\n type: string\n description: Optional. Data source for the symbol (e.g., World Bank). Present only for some symbols.\n deprecationDate:\n type: string\n format: date\n description: Optional. Present only when `status` is `inactive`. Date the symbol was deprecated (YYYY-MM-DD).\n currency:\n $ref: '#/components/schemas/CommodityCurrency'\n unit:\n $ref: '#/components/schemas/CommodityUnit'\n CommodityCurrency:\n type: object\n description: Currency information for a commodity.\n required:\n - code\n - name\n - symbol\n properties:\n code:\n type: string\n description: ISO 4217 currency code.\n name:\n type: string\n description: Full name of the currency.\n symbol:\n type: string\n description: Symbol of the currency (e.g., $).\n CommodityUnit:\n type: object\n description: Unit of measurement for a commodity.\n required:\n - symbol\n - name\n properties:\n symbol:\n type: string\n description: Abbreviated unit symbol (e.g., T.oz, MMBtu).\n name:\n type: string\n description: Full name of the unit of measurement (e.g., Troy Ounce).\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
50126
+ "commodity-time-series": "openapi: 3.1.1\ninfo:\n title: Commodities Time Series API\n version: 2.0.0\n description: Daily OHLC history for one or more commodities over a date range of up to 365 days, indexed by date. Non-trading days are excluded. Monthly-updated commodities only have a closing price \u2014 `open`, `high`, and `low` come back as `0`. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v2.0\n description: Commodity Time Series API Server\npaths:\n /commodity/time-series:\n get:\n tags:\n - Commodity APIs\n summary: Get commodity price time series\n description: Returns day-by-day OHLC data for the requested commodity symbols within a date range.\n operationId: getCommodityTimeSeries\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols.\n schema:\n type: string\n - name: startDate\n in: query\n required: true\n description: Start date in `YYYY-MM-DD` format.\n schema:\n type: string\n - name: endDate\n in: query\n required: true\n description: End date in `YYYY-MM-DD` format. Maximum range is 365 days.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityTimeSeriesResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n startDate: '2025-01-06'\n endDate: '2025-01-08'\n rates:\n '2025-01-06':\n XAU:\n open: 2649.01\n high: 2651.33\n low: 2645.36\n close: 2646.91\n '2025-01-07':\n XAU:\n open: 2662.45\n high: 2663.06\n low: 2655.66\n close: 2658.9\n '2025-01-08':\n XAU:\n open: 2669.69\n high: 2674.68\n low: 2668.58\n close: 2671.8\n monthlyCommodity:\n summary: Monthly-updated commodity (open/high/low unavailable)\n value:\n success: true\n startDate: '2025-01-01'\n endDate: '2025-03-01'\n rates:\n '2025-01-01':\n NG-EU:\n open: 0\n high: 0\n low: 0\n close: 14.66\n '2025-02-01':\n NG-EU:\n open: 0\n high: 0\n low: 0\n close: 15.34\n '2025-03-01':\n NG-EU:\n open: 0\n high: 0\n low: 0\n close: 13.24\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '206':\n description: Partial Content \u2014 Some requested symbols could not be resolved\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CommodityTimeSeriesResponse'\n examples:\n partial:\n summary: One valid symbol, one unresolved symbol\n value:\n success: true\n startDate: '2025-01-06'\n endDate: '2025-01-08'\n rates:\n '2025-01-06':\n XAU:\n open: 2649.01\n high: 2651.33\n low: 2645.36\n close: 2646.91\n '2025-01-07':\n XAU:\n open: 2662.45\n high: 2663.06\n low: 2655.66\n close: 2658.9\n '2025-01-08':\n XAU:\n open: 2669.69\n high: 2674.68\n low: 2668.58\n close: 2671.8\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad Request \u2014 Missing parameters, invalid dates, or date range exceeded\n content:\n application/json:\n examples:\n missingSymbols:\n summary: Missing required symbols parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v2.0/commodity/time-series\n status: 400\n timestamp: '2026-09-14T08:43:58.547Z'\n invalidDate:\n summary: Date does not exist on the calendar\n value:\n timestamp: '2026-07-27T11:38:41.234Z'\n path: /rates/time-series\n code: 400\n error: VALIDATION_ERROR\n message: 'Invalid Date: The provided start date or end date does not exist.'\n startAfterEnd:\n summary: startDate is after endDate\n value:\n timestamp: '2026-07-27T11:38:41.234Z'\n path: /rates/time-series\n code: 400\n error: VALIDATION_ERROR\n message: start date cannot be after end date\n dateRangeExceeded:\n summary: Date range exceeds 365 days\n value:\n timestamp: '2026-07-27T11:38:40.699Z'\n path: /rates/time-series\n code: 400\n error: VALIDATION_ERROR\n message: Date range exceeds the allowed limit.\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '402':\n description: Payment Required \u2014 Maximum symbols per request exceeded\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n maxSymbolsExceeded:\n summary: Too many symbols requested\n value:\n timestamp: '2026-09-14T08:44:00.586Z'\n path: /rates/time-series\n code: 402\n error: PAYMENT_REQUIRED\n message: Maximum symbols per request exceeded\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or data not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: '2026-09-14T08:44:00.586Z'\n path: /rates/time-series\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n dataNotFound:\n summary: No data available for the given date range\n value:\n timestamp: '2026-09-14T08:44:31.547Z'\n path: /rates/time-series\n code: 404\n error: DATA_NOT_FOUND\n message: No data found for the specified date range\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n CommodityTimeSeriesResponse:\n type: object\n required:\n - success\n - startDate\n - endDate\n - rates\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n startDate:\n type: string\n description: Start date of the time series (YYYY-MM-DD).\n endDate:\n type: string\n description: End date of the time series (YYYY-MM-DD).\n rates:\n $ref: '#/components/schemas/CommodityTimeSeriesRates'\n unresolved:\n type: object\n description: Present only on a 206 Partial Content response, when some requested symbols could not be resolved on any date in the range. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n description: Commodity time series response containing date-indexed OHLC data per symbol.\n CommodityTimeSeriesRates:\n type: object\n description: Map of trading dates to per-symbol OHLC data. Each key is a trading date (YYYY-MM-DD); non-trading days are excluded.\n additionalProperties:\n title: CommodityTimeSeriesSymbolData\n type: object\n description: Map of commodity symbols to their OHLC data for a single trading date. Each key is a commodity symbol (e.g. XAU).\n additionalProperties:\n $ref: '#/components/schemas/CommodityOhlc'\n CommodityOhlc:\n type: object\n description: OHLC price data for a single commodity on a single trading day. For monthly-updated commodities, only `close` is meaningful \u2014 `open`, `high`, and `low` are returned as `0`.\n required:\n - open\n - high\n - low\n - close\n properties:\n open:\n type: number\n format: float\n description: Opening price on the given date. `0` for monthly-updated commodities.\n high:\n type: number\n format: float\n description: Highest price on the given date. `0` for monthly-updated commodities.\n low:\n type: number\n format: float\n description: Lowest price on the given date. `0` for monthly-updated commodities.\n close:\n type: number\n format: float\n description: Closing price on the given date.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests. Gateway-level validation errors populate status; commodity-service errors (date/symbol/data validation) populate code instead \u2014 check whichever is present.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, DATA_NOT_FOUND).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error.\n status:\n type: integer\n description: HTTP status code. Present on gateway-level errors.\n code:\n type: integer\n description: HTTP status code. Present on commodity-service errors instead of status.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n unresolved:\n type: object\n description: Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
50127
+ "historical-commodity-prices": "openapi: 3.1.1\ninfo:\n title: Historical Commodity Prices, Delivered Simply.\n version: 2.0.0\n description: OHLC price data for one or more commodities on a specific date, back to January 1990. Falls back to the nearest earlier rate if none exists for the exact date. Monthly-updated commodities only have a closing price \u2014 `open`, `high`, and `low` come back as `0`. Unresolved symbols degrade to a 206 partial response instead of failing the whole request.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v2.0\n description: Historical Commodity Prices API Server\npaths:\n /commodity/rates/historical:\n get:\n tags:\n - Commodity APIs\n summary: Get historical commodity prices\n description: Returns OHLC price data for the requested commodity symbols on a specific date.\n operationId: getHistoricalCommodityPrices\n parameters:\n - name: format\n in: query\n required: false\n description: Response format. Currently only `json` is supported.\n schema:\n type: string\n default: json\n enum:\n - json\n - name: symbols\n in: query\n required: true\n description: Comma-separated list of commodity symbols.\n schema:\n type: string\n - name: date\n in: query\n required: true\n description: Date in `YYYY-MM-DD` format. Data available from 1990 onwards.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/HistoricalCommodityPricesResponse'\n examples:\n success:\n summary: Successful response\n value:\n success: true\n date: '2025-01-10'\n rates:\n WTIOIL-SPOT:\n date: '2025-01-10'\n open: 73.77\n high: 77.16\n low: 73.55\n close: 75.97\n XAU:\n date: '2025-01-10'\n open: 2669.93\n high: 2697.85\n low: 2663.61\n close: 2689.44\n monthlyCommodity:\n summary: Monthly-updated commodity (open/high/low unavailable)\n value:\n success: true\n date: '2025-01-10'\n rates:\n NG-EU:\n date: '2025-01-01'\n open: 0\n high: 0\n low: 0\n close: 14.66\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '206':\n description: Partial Content \u2014 Some requested symbols could not be resolved\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/HistoricalCommodityPricesResponse'\n examples:\n partial:\n summary: One valid symbol, one unresolved symbol\n value:\n success: true\n date: '2025-01-10'\n rates:\n XAU:\n date: '2025-01-10'\n open: 2669.93\n high: 2697.85\n low: 2663.61\n close: 2689.44\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad Request \u2014 Missing parameters or invalid date\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n missingSymbols:\n summary: Missing required symbols parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v2.0/commodity/rates/historical\n status: 400\n timestamp: '2026-09-14T08:44:32.013Z'\n invalidDateFormat:\n summary: Invalid date format\n value:\n timestamp: '2026-09-14T08:45:13.934Z'\n path: /rates/historical\n code: 400\n error: VALIDATION_ERROR\n message: Invalid Date Format (YYYY-MM-DD).\n dateNotExist:\n summary: Date does not exist\n value:\n timestamp: '2026-09-14T08:44:01.487Z'\n path: /rates/historical\n code: 400\n error: VALIDATION_ERROR\n message: 'Invalid Date: The provided date does not exist.'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '402':\n description: Payment Required \u2014 Maximum symbols per request exceeded\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n maxSymbolsExceeded:\n summary: Too many symbols requested\n value:\n timestamp: '2026-09-14T08:44:01.978Z'\n path: /rates/historical\n code: 402\n error: PAYMENT_REQUIRED\n message: Maximum symbols per request exceeded\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Symbol or rate not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n symbolNotFound:\n summary: Symbol Not Found\n value:\n timestamp: '2026-09-14T08:44:01.978Z'\n path: /rates/historical\n code: 404\n error: SYMBOL_NOT_FOUND\n message: The symbol is not supported, please visit the documentation for a list of supported symbols\n unresolved:\n FAKESYM:\n message: We don't support this symbol, please visit our symbols page to see supported symbols.\n rateNotFound:\n summary: Rate Not Found\n value:\n timestamp: '2026-09-14T08:44:02.528Z'\n path: /rates/historical\n code: 404\n error: RATE_NOT_FOUND\n message: no rates found for the specified date\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n HistoricalCommodityPricesResponse:\n type: object\n required:\n - success\n - date\n - rates\n properties:\n success:\n type: boolean\n description: '`true` for successful requests.'\n date:\n type: string\n description: Date for which prices were fetched (YYYY-MM-DD).\n rates:\n $ref: '#/components/schemas/HistoricalCommodityRates'\n unresolved:\n type: object\n description: Present only on a 206 Partial Content response, when some requested symbols could not be resolved. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n description: Historical commodity prices response containing success status, date, and OHLC rate data.\n HistoricalCommodityRates:\n type: object\n description: Object of commodity symbols to their OHLC price data. Each key is a commodity symbol and the value contains date, open, high, low, and close prices.\n properties:\n symbol:\n $ref: '#/components/schemas/HistoricalCommodityRate'\n required:\n - symbol\n HistoricalCommodityRate:\n type: object\n description: OHLC price data for a single commodity on a specific date. For monthly-updated commodities, only `close` is meaningful \u2014 `open`, `high`, and `low` are returned as `0`.\n required:\n - date\n - open\n - high\n - low\n - close\n properties:\n date:\n type: string\n description: Date for which prices were fetched (YYYY-MM-DD). May differ from the requested `date` when the API falls back to the last available rate before it, or snaps to the first day of the month for monthly-updated commodities.\n open:\n type: number\n format: float\n description: Opening price on the given date. `0` for monthly-updated commodities.\n high:\n type: number\n format: float\n description: Highest price recorded on the given date. `0` for monthly-updated commodities.\n low:\n type: number\n format: float\n description: Lowest price recorded on the given date. `0` for monthly-updated commodities.\n close:\n type: number\n format: float\n description: Closing price on the given date.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests. Gateway-level validation errors populate status; commodity-service errors (date/symbol/rate validation) populate code instead \u2014 check whichever is present.\n required:\n - message\n properties:\n error:\n type: string\n description: Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, RATE_NOT_FOUND).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error.\n status:\n type: integer\n description: HTTP status code. Present on gateway-level errors.\n code:\n type: integer\n description: HTTP status code. Present on commodity-service errors instead of status.\n timestamp:\n type: string\n format: date-time\n description: Timestamp when the error occurred (ISO 8601).\n unresolved:\n type: object\n description: Present only on SYMBOL_NOT_FOUND errors. Map of each unresolved symbol to a detail message and optional close-match suggestions.\n additionalProperties:\n type: object\n properties:\n message:\n type: string\n description: Detail message explaining why this symbol was not resolved.\n suggestions:\n type: array\n description: Optional list of supported symbols that closely match the unresolved symbol.\n items:\n type: string\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
49526
50128
  "currency-converter": "openapi: 3.1.1\ninfo:\n title: Currency Converter API - Convert 970+ Fiat & Crypto Currencies at Live or Historical Rates\n version: 1.0.0\n description: Convert an amount from one currency to another using the latest exchange rates. Supports fiat, crypto, and metals. Specify source currency, target currency, and amount to receive the current rate and converted amount with timestamp. All parameters are case-insensitive for both fiat/currency codes and crypto/symbols.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v1.0\n description: Currency Converter API Server\npaths:\n /currency/converter/latest/prices:\n get:\n tags:\n - Currency APIs\n summary: Convert currency with latest rates\n description: Converts an amount from one currency to another using the latest exchange rates.\n operationId: convertLatest\n parameters:\n - name: format\n in: query\n required: false\n description: 'Response format: `json` (default) or `xml`.'\n schema:\n type: string\n enum:\n - json\n - xml\n default: json\n - name: from\n in: query\n required: true\n description: Source currency code.\n schema:\n type: string\n - name: to\n in: query\n required: true\n description: Target currency code.\n schema:\n type: string\n - name: amount\n in: query\n required: false\n description: Amount to convert, as a decimal. Defaults to `1`. Must be numeric \u2014 non-numeric values return a 400 (negative values are accepted despite the error message's wording).\n schema:\n type: string\n default: '1'\n - name: updates\n in: query\n required: false\n description: 'Update frequency: `1m` (default), `10m`, `1h`, or `1d`.'\n schema:\n type: string\n enum:\n - 1m\n - 10m\n - 1h\n - 1d\n default: 1m\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/LatestCurrencyConverterResponse'\n examples:\n success:\n summary: Successful response\n value:\n date: '2026-07-27 12:05:00+00'\n from: USD\n to: EUR\n rate: '0.87800'\n givenAmount: '100.0'\n convertedAmount: '87.800'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad request - Invalid amount or updates parameter\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n missingParams:\n summary: Missing required from/to parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v1.0/currency/converter/latest/prices\n status: 400\n timestamp: '2026-07-27T12:05:29.609Z'\n invalidAmount:\n summary: amount is not numeric\n value:\n timestamp: 1785153941995\n status: 400\n error: Method Argument Type Mismatch\n message: Invalid Amount. Please provide amount in decimal format and greater than 0!\n path: /v2.0/convert/latest\n invalidUpdates:\n summary: updates is not one of 1m/10m/1h/1d\n value:\n timestamp: 1785153942533\n status: 400\n error: Invalid Param Exception\n message: Please provide valid updates parameter (1d,1h,10m,1m)\n path: /v2.0/convert/latest\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - Currency not available\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n invalidBase:\n summary: from currency not supported\n value:\n timestamp: 1785153930704\n status: 404\n error: Not Found Exception\n message: Rates of provided currency ZZZ are not available in our database!\n path: /v2.0/convert/latest\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n LatestCurrencyConverterResponse:\n type: object\n required:\n - date\n - from\n - to\n - rate\n - givenAmount\n - convertedAmount\n properties:\n date:\n type: string\n description: Date and time with timezone (UTC) when the rate was recorded.\n from:\n type: string\n description: Source currency code.\n to:\n type: string\n description: Target currency code.\n rate:\n type: string\n description: Conversion rate from source to target currency.\n givenAmount:\n type: string\n description: The amount provided for conversion.\n convertedAmount:\n type: string\n description: The converted amount in the target currency.\n description: Currency conversion response containing the exchange rate and converted amount.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests. Gateway-level validation errors use an ISO 8601 timestamp and the public endpoint path; currency-service errors use a Unix millisecond timestamp and an internal service path instead.\n required:\n - message\n properties:\n timestamp:\n type:\n - string\n - integer\n description: Timestamp when the error occurred \u2014 ISO 8601 string for gateway errors, Unix milliseconds integer for currency-service errors.\n status:\n type: integer\n description: HTTP status code returned with the error.\n error:\n type: string\n description: Specific error type (e.g., Invalid Param Exception, Method Argument Type Mismatch, Not Found Exception).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path (gateway errors) or internal service path (currency-service errors) that produced the error.\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
49527
50129
  "currency-fluctuation": "openapi: 3.1.1\ninfo:\n title: Currency Fluctuation API - Get Currency Fluctuations Over a Time Period\n version: 1.0.0\n description: Get exchange rate fluctuation data between two dates for one or more currency pairs. Returns the start rate, end rate, absolute change, and percentage change for each requested symbol. Accepts a base currency (defaults to USD) and optional comma-separated target symbols. Returns a 400 error for invalid dates and a 404 error when no data is available for the interval.\n contact:\n name: APIFreaks Support\n url: https://apifreaks.com/contact\n email: support@apifreaks.com\nservers:\n - url: https://api.apifreaks.com/v1.0\n description: Currency Fluctuation API Server\npaths:\n /currency/fluctuation:\n get:\n tags:\n - Currency APIs\n summary: Get exchange rate fluctuations\n description: Returns exchange rate fluctuations between two dates for the requested symbols.\n operationId: getFluctuation\n parameters:\n - name: format\n in: query\n required: false\n description: 'Response format: `json` (default) or `xml`.'\n schema:\n type: string\n enum:\n - json\n - xml\n default: json\n - name: startDate\n in: query\n required: true\n description: Start date in `YYYY-MM-DD` format.\n schema:\n type: string\n - name: endDate\n in: query\n required: false\n description: End date in `YYYY-MM-DD` format. Defaults to yesterday.\n schema:\n type: string\n - name: base\n in: query\n required: false\n description: Base currency code. Defaults to `USD`.\n schema:\n type: string\n default: USD\n - name: symbols\n in: query\n required: false\n description: Comma-separated currency codes. Omit to get all available rates.\n schema:\n type: string\n responses:\n '200':\n description: Successful operation\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/CurrencyFluctuationResponse'\n examples:\n success:\n summary: Successful response\n value:\n startDate: '2025-01-01'\n endDate: '2025-01-10'\n base: USD\n rateFluctuations:\n EUR:\n startRate: '0.96605'\n endRate: '0.97620'\n change: '-0.010150'\n percentChange: '-1.05'\n PKR:\n startRate: '278.400'\n endRate: '278.650'\n change: '-0.25'\n percentChange: '-0.09'\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '400':\n description: Bad request - Invalid dates\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n missingStartDate:\n summary: Missing required startDate parameter\n value:\n error: Invalid Param Exception\n message: please pass correct parameters\n path: /v1.0/currency/fluctuation\n status: 400\n timestamp: '2026-07-27T12:09:21.348Z'\n startAfterEnd:\n summary: startDate is after endDate or the current date\n value:\n timestamp: 1785154172736\n status: 400\n error: Invalid Param Exception\n message: Starting date cannot be after current date or ending date\n path: /v2.0/fluctuation\n invalidDateFormat:\n summary: startDate/endDate not in YYYY-MM-DD format\n value:\n timestamp: 1785154172225\n status: 400\n error: Invalid Param Exception\n message: Provided Dates are in Invalid Format. Dates must be in a valid format YYYY-MM-DD!\n path: /v2.0/fluctuation\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\n '404':\n description: Not found - No data for interval\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ErrorResponse'\n examples:\n noData:\n summary: base or symbols not supported for the given interval\n value:\n timestamp: 1785154173332\n status: 404\n error: Not Found Exception\n message: Rates of provided base and symbols are not found for given intervals.\n path: /v2.0/fluctuation\n headers:\n X-AF-Credits-Cost:\n $ref: '#/components/headers/X-AF-Credits-Cost'\ncomponents:\n securitySchemes:\n ApiKeyAuthHeader:\n type: apiKey\n in: header\n name: X-apiKey\n description: Pass your API key via the X-apiKey request header.\n ApiKeyAuthQuery:\n type: apiKey\n in: query\n name: apiKey\n description: Pass your API key via the apiKey query parameter.\n schemas:\n CurrencyFluctuationResponse:\n type: object\n required:\n - startDate\n - endDate\n - base\n - rateFluctuations\n properties:\n startDate:\n type: string\n description: Start date of the interval (YYYY-MM-DD).\n endDate:\n type: string\n description: End date of the interval (YYYY-MM-DD).\n base:\n type: string\n description: Base currency used for all fluctuations.\n rateFluctuations:\n type: object\n description: Map of currency codes to their fluctuation details. Each key is a currency code and the value contains startRate, endRate, change, and percentChange.\n additionalProperties:\n title: CurrencyFluctuationItem\n $ref: '#/components/schemas/CurrencyFluctuationItem'\n description: Currency fluctuation response containing rate changes per symbol over a date interval.\n CurrencyFluctuationItem:\n type: object\n description: Fluctuation metrics for a single currency over a date interval.\n required:\n - startRate\n - endRate\n - change\n - percentChange\n properties:\n startRate:\n type: string\n description: Rate of the currency at the start of the interval.\n endRate:\n type: string\n description: Rate of the currency at the end of the interval.\n change:\n type: string\n description: Absolute change between start and end rate. Can be positive or negative.\n percentChange:\n type: string\n description: Percentage change between start and end rate. Can be positive or negative.\n ErrorResponse:\n type: object\n description: Standard error envelope returned by the API on failed requests. Gateway-level validation errors use an ISO 8601 timestamp and the public endpoint path; currency-service errors use a Unix millisecond timestamp and an internal service path instead.\n required:\n - message\n properties:\n timestamp:\n type:\n - string\n - integer\n description: Timestamp when the error occurred \u2014 ISO 8601 string for gateway errors, Unix milliseconds integer for currency-service errors.\n status:\n type: integer\n description: HTTP status code returned with the error.\n error:\n type: string\n description: Specific error type (e.g., Invalid Param Exception, Not Found Exception).\n message:\n type: string\n description: Human-readable error message describing the failure.\n path:\n type: string\n description: API endpoint path (gateway errors) or internal service path (currency-service errors) that produced the error.\n headers:\n X-AF-Credits-Cost:\n description: Specifies the number of credits consumed by the current request.\n schema:\n type: integer\nsecurity:\n - ApiKeyAuthHeader: []\n - ApiKeyAuthQuery: []\n",
49528
50130
  "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",