@apifreaks/openapi-specs 0.1.0 → 0.1.2

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.
Files changed (108) hide show
  1. package/dist/index.cjs +133 -2
  2. package/dist/index.d.cts +140 -3
  3. package/dist/index.d.ts +140 -3
  4. package/dist/index.js +131 -2
  5. package/dist/specs/commodity/commodity-fluctuation.yaml +225 -0
  6. package/dist/specs/commodity/commodity-prices.yaml +236 -0
  7. package/dist/specs/commodity/commodity-symbols.yaml +159 -0
  8. package/dist/specs/commodity/commodity-time-series.yaml +238 -0
  9. package/dist/specs/commodity/historical-commodity-prices.yaml +208 -0
  10. package/dist/specs/currency/currency-converter.yaml +193 -0
  11. package/dist/specs/currency/currency-fluctuation.yaml +211 -0
  12. package/dist/specs/currency/currency-historical-data-limit.yaml +112 -0
  13. package/dist/specs/currency/currency-rate.yaml +173 -0
  14. package/dist/specs/currency/currency-supported.yaml +176 -0
  15. package/dist/specs/currency/currency-symbols.yaml +115 -0
  16. package/dist/specs/currency/currency-time-series.yaml +232 -0
  17. package/dist/specs/currency/geolocalized-currency-conversion.yaml +214 -0
  18. package/dist/specs/currency/historical-currency-converter.yaml +195 -0
  19. package/dist/specs/currency/historical-currency-rate.yaml +180 -0
  20. package/dist/specs/dns/bulk-dns-lookup.yaml +484 -0
  21. package/dist/specs/dns/dns-history-lookup.yaml +451 -0
  22. package/dist/specs/dns/dns-lookup.yaml +360 -0
  23. package/dist/specs/dns/reverse-dns-lookup.yaml +338 -0
  24. package/dist/specs/domain/bulk-domain-checker.yaml +198 -0
  25. package/dist/specs/domain/domain-search-with-suggestions.yaml +196 -0
  26. package/dist/specs/domain/domain-search.yaml +149 -0
  27. package/dist/specs/domain/subdomain-lookup.yaml +251 -0
  28. package/dist/specs/email-validation/bulk-email-validation.yaml +403 -0
  29. package/dist/specs/email-validation/email-checker.yaml +451 -0
  30. package/dist/specs/financial/bulk-vat-rates-country.yaml +250 -0
  31. package/dist/specs/financial/financial-apis-supported-countries.yaml +152 -0
  32. package/dist/specs/financial/iban-validation.yaml +270 -0
  33. package/dist/specs/financial/swift-code-finder.yaml +146 -0
  34. package/dist/specs/financial/swift-code-lookup.yaml +156 -0
  35. package/dist/specs/financial/vat-number-validation.yaml +205 -0
  36. package/dist/specs/financial/vat-rates-by-ip.yaml +200 -0
  37. package/dist/specs/financial/vat-rates-country.yaml +212 -0
  38. package/dist/specs/general/usage-credits.yaml +188 -0
  39. package/dist/specs/geocoding/forward-geocoding.yaml +292 -0
  40. package/dist/specs/geocoding/reverse-geocoding.yaml +237 -0
  41. package/dist/specs/geodb/administrative-units-details.yaml +180 -0
  42. package/dist/specs/geodb/administrative-units-levels.yaml +140 -0
  43. package/dist/specs/geodb/administrative-units.yaml +168 -0
  44. package/dist/specs/geodb/cities.yaml +209 -0
  45. package/dist/specs/geodb/countries-details.yaml +207 -0
  46. package/dist/specs/geodb/countries.yaml +199 -0
  47. package/dist/specs/geodb/flags-supported.yaml +119 -0
  48. package/dist/specs/geodb/flags.yaml +170 -0
  49. package/dist/specs/geodb/regions.yaml +76 -0
  50. package/dist/specs/geodb/subregions.yaml +158 -0
  51. package/dist/specs/ip-intelligence/bulk-ip-lookup.yaml +895 -0
  52. package/dist/specs/ip-intelligence/bulk-ip-threat-intelligence.yaml +310 -0
  53. package/dist/specs/ip-intelligence/ip-locator.yaml +708 -0
  54. package/dist/specs/ip-intelligence/ip-threat-intelligence.yaml +230 -0
  55. package/dist/specs/other/astronomy-data.yaml +632 -0
  56. package/dist/specs/pdf/delete-pdf-page.yaml +193 -0
  57. package/dist/specs/pdf/linearize-pdf.yaml +187 -0
  58. package/dist/specs/pdf/merge-pdf.yaml +193 -0
  59. package/dist/specs/pdf/pdf-compress.yaml +208 -0
  60. package/dist/specs/pdf/pdf-decrypt.yaml +202 -0
  61. package/dist/specs/pdf/pdf-encrypt.yaml +213 -0
  62. package/dist/specs/pdf/pdf-extract-pages.yaml +199 -0
  63. package/dist/specs/pdf/pdf-file-status.yaml +148 -0
  64. package/dist/specs/pdf/pdf-file.yaml +136 -0
  65. package/dist/specs/pdf/pdf-files.yaml +85 -0
  66. package/dist/specs/pdf/pdf-resource-download.yaml +117 -0
  67. package/dist/specs/pdf/pdf-resource-upload-binary.yaml +152 -0
  68. package/dist/specs/pdf/pdf-resource-upload.yaml +163 -0
  69. package/dist/specs/pdf/pdf-restrict.yaml +246 -0
  70. package/dist/specs/pdf/pdf-split-pages.yaml +208 -0
  71. package/dist/specs/pdf/pdf-task-status.yaml +187 -0
  72. package/dist/specs/pdf/pdf-to-image.yaml +844 -0
  73. package/dist/specs/pdf/pdf-unrestrict.yaml +221 -0
  74. package/dist/specs/pdf/rotate-pdf-pages.yaml +207 -0
  75. package/dist/specs/phone-validation/bulk-phone-number-validation.yaml +374 -0
  76. package/dist/specs/phone-validation/phone-number-validation.yaml +344 -0
  77. package/dist/specs/scraper/web-scraper.yaml +479 -0
  78. package/dist/specs/screenshot/bulk-screenshot.yaml +728 -0
  79. package/dist/specs/screenshot/website-screenshot.yaml +822 -0
  80. package/dist/specs/ssl/ssl-certificate-chain-lookup.yaml +593 -0
  81. package/dist/specs/ssl/ssl-certificate-lookup.yaml +478 -0
  82. package/dist/specs/timezone/timezone-converter.yaml +249 -0
  83. package/dist/specs/timezone/timezone-lookup.yaml +712 -0
  84. package/dist/specs/user-agent/bulk-user-agent-parser.yaml +340 -0
  85. package/dist/specs/user-agent/user-agent-parser.yaml +271 -0
  86. package/dist/specs/weather/air-quality.yaml +590 -0
  87. package/dist/specs/weather/bulk-live-weather.yaml +654 -0
  88. package/dist/specs/weather/flood-forecast.yaml +519 -0
  89. package/dist/specs/weather/historical-weather.yaml +842 -0
  90. package/dist/specs/weather/live-weather.yaml +633 -0
  91. package/dist/specs/weather/marine-weather.yaml +806 -0
  92. package/dist/specs/weather/time-series-weather.yaml +821 -0
  93. package/dist/specs/weather/weather-forecast.yaml +935 -0
  94. package/dist/specs/whois/asn-lookup.yaml +618 -0
  95. package/dist/specs/whois/bulk-whois-lookup.yaml +827 -0
  96. package/dist/specs/whois/domain-whois-history-lookup.yaml +445 -0
  97. package/dist/specs/whois/reverse-whois.yaml +566 -0
  98. package/dist/specs/whois/whois-domain-lookup.yaml +537 -0
  99. package/dist/specs/whois/whois-ip-lookup.yaml +1123 -0
  100. package/dist/specs/zip-code/bulk-zip-code-lookup.yaml +232 -0
  101. package/dist/specs/zip-code/zip-code-api.yaml +216 -0
  102. package/dist/specs/zip-code/zip-code-distance-match.yaml +239 -0
  103. package/dist/specs/zip-code/zip-code-distance.yaml +233 -0
  104. package/dist/specs/zip-code/zip-codes-by-city.yaml +201 -0
  105. package/dist/specs/zip-code/zip-codes-by-region.yaml +200 -0
  106. package/dist/specs/zip-code/zip-codes-radius-search.yaml +262 -0
  107. package/package.json +6 -2
  108. package/specs/pdf/merge-pdf.json +2 -2
@@ -0,0 +1,225 @@
1
+ openapi: 3.1.1
2
+ info:
3
+ title: 'Commodity Fluctuation API '
4
+ version: 1.0.0
5
+ 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.
6
+ contact:
7
+ name: APIFreaks Support
8
+ url: https://apifreaks.com/contact
9
+ email: support@apifreaks.com
10
+ servers:
11
+ - url: https://api.apifreaks.com/v1.0
12
+ description: Commodity Fluctuation API Server
13
+ paths:
14
+ /commodity/fluctuation:
15
+ get:
16
+ tags:
17
+ - Commodity APIs
18
+ summary: Get commodity price fluctuations
19
+ description: Returns price fluctuation metrics (start, end, change, percent change) for the requested commodity symbols over a date range.
20
+ operationId: getCommodityFluctuation
21
+ parameters:
22
+ - name: format
23
+ in: query
24
+ required: false
25
+ description: Response format. Currently only `json` is supported.
26
+ schema:
27
+ type: string
28
+ default: json
29
+ enum:
30
+ - json
31
+ - name: symbols
32
+ in: query
33
+ required: true
34
+ description: Comma-separated list of commodity symbols.
35
+ schema:
36
+ type: string
37
+ - name: startDate
38
+ in: query
39
+ required: true
40
+ description: Start date in `YYYY-MM-DD` format.
41
+ schema:
42
+ type: string
43
+ - name: endDate
44
+ in: query
45
+ required: true
46
+ description: End date in `YYYY-MM-DD` format.
47
+ schema:
48
+ type: string
49
+ responses:
50
+ '200':
51
+ description: Successful operation
52
+ content:
53
+ application/json:
54
+ schema:
55
+ $ref: '#/components/schemas/CommodityFluctuationResponse'
56
+ examples:
57
+ success:
58
+ summary: Successful response
59
+ value:
60
+ success: true
61
+ startDate: '2024-01-01'
62
+ endDate: '2024-01-31'
63
+ rates:
64
+ WTIOIL-SPOT:
65
+ startRate: 72.02
66
+ endRate: 75.81
67
+ change: 3.79
68
+ changePercent: 5.26
69
+ XAU:
70
+ startRate: 2063.63
71
+ endRate: 2039.83
72
+ change: -23.8
73
+ changePercent: -1.15
74
+ '400':
75
+ description: Bad Request — Missing parameters or invalid dates
76
+ content:
77
+ application/json:
78
+ examples:
79
+ missingSymbols:
80
+ summary: Missing required symbols parameter
81
+ value:
82
+ error: Invalid Param Exception
83
+ message: please pass correct parameters
84
+ path: /v1.0/commodity/fluctuation
85
+ status: 400
86
+ timestamp: '2026-07-27T11:37:24.273Z'
87
+ invalidDateFormat:
88
+ summary: Date is not in YYYY-MM-DD format
89
+ value:
90
+ timestamp: '2026-07-27T11:37:22.687Z'
91
+ path: /rates/fluctuation
92
+ code: 400
93
+ error: VALIDATION_ERROR
94
+ message: Invalid Date Format (YYYY-MM-DD).
95
+ dateNotExist:
96
+ summary: Date does not exist on the calendar (e.g. Feb 30)
97
+ value:
98
+ timestamp: '2026-07-27T11:37:33.565Z'
99
+ path: /rates/fluctuation
100
+ code: 400
101
+ error: VALIDATION_ERROR
102
+ message: 'Invalid Date: The provided start date or end date does not exist.'
103
+ startAfterEnd:
104
+ summary: startDate is after endDate
105
+ value:
106
+ timestamp: '2026-07-27T11:37:23.206Z'
107
+ path: /rates/fluctuation
108
+ code: 400
109
+ error: VALIDATION_ERROR
110
+ message: Start date cannot be after end date
111
+ schema:
112
+ $ref: '#/components/schemas/ErrorResponse'
113
+ '404':
114
+ description: Not found - Symbol or data not available
115
+ content:
116
+ application/json:
117
+ schema:
118
+ $ref: '#/components/schemas/ErrorResponse'
119
+ examples:
120
+ symbolNotFound:
121
+ summary: Symbol Not Found
122
+ value:
123
+ timestamp: '2026-07-27T11:37:23.759Z'
124
+ path: /rates/fluctuation
125
+ code: 404
126
+ error: SYMBOL_NOT_FOUND
127
+ message: The symbol is not supported, please visit the documentation for a list of supported symbols
128
+ noData:
129
+ summary: No data available for the given date range
130
+ value:
131
+ timestamp: '2026-07-27T11:37:34.167Z'
132
+ path: /rates/fluctuation
133
+ code: 404
134
+ error: DATA_NOT_FOUND
135
+ message: No data found for the given date range
136
+ components:
137
+ securitySchemes:
138
+ ApiKeyAuthHeader:
139
+ type: apiKey
140
+ in: header
141
+ name: X-apiKey
142
+ description: Pass your API key via the X-apiKey request header.
143
+ ApiKeyAuthQuery:
144
+ type: apiKey
145
+ in: query
146
+ name: apiKey
147
+ description: Pass your API key via the apiKey query parameter.
148
+ schemas:
149
+ CommodityFluctuationResponse:
150
+ type: object
151
+ required:
152
+ - success
153
+ - startDate
154
+ - endDate
155
+ - rates
156
+ properties:
157
+ success:
158
+ type: boolean
159
+ description: '`true` for successful requests.'
160
+ startDate:
161
+ type: string
162
+ description: Start date of the interval (YYYY-MM-DD).
163
+ endDate:
164
+ type: string
165
+ description: End date of the interval (YYYY-MM-DD).
166
+ rates:
167
+ $ref: '#/components/schemas/CommodityFluctuationRates'
168
+ description: Commodity fluctuation response containing price change data per symbol over a date range.
169
+ CommodityFluctuationRates:
170
+ type: object
171
+ description: Map of requested commodity symbols to their fluctuation metrics. Each key is a commodity symbol (e.g. XAU).
172
+ additionalProperties:
173
+ title: CommodityFluctuationItem
174
+ type: object
175
+ description: Fluctuation metrics for a single commodity over a date range.
176
+ required:
177
+ - startRate
178
+ - endRate
179
+ - change
180
+ - changePercent
181
+ properties:
182
+ startRate:
183
+ type: number
184
+ format: float
185
+ description: Price of the commodity on the start date.
186
+ endRate:
187
+ type: number
188
+ format: float
189
+ description: Price of the commodity on the end date.
190
+ change:
191
+ type: number
192
+ format: float
193
+ description: Absolute price difference between end and start dates. May be negative.
194
+ changePercent:
195
+ type: number
196
+ format: float
197
+ description: Percentage price change from start to end date. May be negative.
198
+ ErrorResponse:
199
+ type: object
200
+ 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 — check whichever is present.
201
+ required:
202
+ - message
203
+ properties:
204
+ error:
205
+ type: string
206
+ description: Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, DATA_NOT_FOUND).
207
+ message:
208
+ type: string
209
+ description: Human-readable error message describing the failure.
210
+ path:
211
+ type: string
212
+ description: API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error.
213
+ status:
214
+ type: integer
215
+ description: HTTP status code. Present on gateway-level errors.
216
+ code:
217
+ type: integer
218
+ description: HTTP status code. Present on commodity-service errors instead of status.
219
+ timestamp:
220
+ type: string
221
+ format: date-time
222
+ description: Timestamp when the error occurred (ISO 8601).
223
+ security:
224
+ - ApiKeyAuthHeader: []
225
+ - ApiKeyAuthQuery: []
@@ -0,0 +1,236 @@
1
+ openapi: 3.1.1
2
+ info:
3
+ title: Live Commodity Prices API - Real Time Market Insights
4
+ version: 1.0.0
5
+ 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.
6
+ contact:
7
+ name: APIFreaks Support
8
+ url: https://apifreaks.com/contact
9
+ email: support@apifreaks.com
10
+ servers:
11
+ - url: https://api.apifreaks.com/v1.0
12
+ description: Live Commodity Prices API Server
13
+ paths:
14
+ /commodity/rates/latest:
15
+ get:
16
+ tags:
17
+ - Commodity APIs
18
+ summary: Get latest commodity prices
19
+ description: Returns the current live price for the requested commodity symbols.
20
+ operationId: getLatestCommodityPrices
21
+ parameters:
22
+ - name: format
23
+ in: query
24
+ required: false
25
+ description: Response format. Currently only `json` is supported.
26
+ schema:
27
+ type: string
28
+ default: json
29
+ enum:
30
+ - json
31
+ - name: symbols
32
+ in: query
33
+ required: true
34
+ description: Comma-separated list of commodity symbols (e.g., `XAU`, `WTIOIL-SPOT`).
35
+ schema:
36
+ type: string
37
+ - name: updates
38
+ in: query
39
+ required: true
40
+ description: 'Update frequency. Accepted values: `1m` (default), `10m`.'
41
+ schema:
42
+ type: string
43
+ enum:
44
+ - 1m
45
+ - 10m
46
+ default: 1m
47
+ - name: quote
48
+ in: query
49
+ required: false
50
+ description: Target currency for the exchange rate. Defaults to the market currency of each commodity.
51
+ schema:
52
+ type: string
53
+ responses:
54
+ '200':
55
+ description: Successful operation
56
+ content:
57
+ application/json:
58
+ schema:
59
+ $ref: '#/components/schemas/LiveCommodityPricesResponse'
60
+ examples:
61
+ success:
62
+ summary: Successful response
63
+ value:
64
+ success: true
65
+ timestamp: 1785152172
66
+ rates:
67
+ XAU: 4099.1
68
+ WTIOIL-SPOT: 81.88
69
+ metadata:
70
+ XAU:
71
+ unit: T.oz
72
+ quote: USD
73
+ WTIOIL-SPOT:
74
+ unit: Bbl
75
+ quote: USD
76
+ withQuoteConversion:
77
+ summary: Price converted to a target quote currency
78
+ value:
79
+ success: true
80
+ timestamp: 1785152172
81
+ rates:
82
+ XAU: 3597.734
83
+ metadata:
84
+ XAU:
85
+ unit: T.oz
86
+ quote: EUR
87
+ '400':
88
+ description: Bad Request — Missing or invalid query parameters
89
+ content:
90
+ application/json:
91
+ schema:
92
+ $ref: '#/components/schemas/ErrorResponse'
93
+ examples:
94
+ missingSymbols:
95
+ summary: Missing required symbols parameter
96
+ value:
97
+ error: Invalid Param Exception
98
+ message: please pass correct parameters
99
+ path: /v1.0/commodity/rates/latest
100
+ status: 400
101
+ timestamp: '2026-07-27T11:36:13.312Z'
102
+ invalidUpdates:
103
+ summary: updates is not 1m or 10m
104
+ value:
105
+ error: Invalid Param Exception
106
+ message: please pass correct parameters
107
+ path: /v1.0/commodity/rates/latest
108
+ status: 400
109
+ timestamp: '2026-07-27T11:36:35.755Z'
110
+ '404':
111
+ description: Not found - Symbol or quote currency not available
112
+ content:
113
+ application/json:
114
+ schema:
115
+ $ref: '#/components/schemas/CommodityNotFoundError'
116
+ examples:
117
+ symbolNotFound:
118
+ summary: Symbol Not Found
119
+ value:
120
+ timestamp: 1781792620618
121
+ path: /rates/latestRates
122
+ code: 404
123
+ error: SYMBOL_NOT_FOUND
124
+ message: The symbol is not supported, please visit the documentation for a list of supported symbols
125
+ quoteNotFound:
126
+ summary: Quote Currency Not Found
127
+ value:
128
+ timestamp: 1781792620618
129
+ path: /rates/latestRates
130
+ code: 404
131
+ error: QUOTE_NOT_FOUND
132
+ message: The quote currency is invalid, please visit the documentation for a list of valid quote currencies
133
+ components:
134
+ securitySchemes:
135
+ ApiKeyAuthHeader:
136
+ type: apiKey
137
+ in: header
138
+ name: X-apiKey
139
+ description: Pass your API key via the X-apiKey request header.
140
+ ApiKeyAuthQuery:
141
+ type: apiKey
142
+ in: query
143
+ name: apiKey
144
+ description: Pass your API key via the apiKey query parameter.
145
+ schemas:
146
+ LiveCommodityPricesResponse:
147
+ type: object
148
+ required:
149
+ - success
150
+ - timestamp
151
+ - rates
152
+ - metadata
153
+ properties:
154
+ success:
155
+ type: boolean
156
+ description: '`true` for successful requests.'
157
+ timestamp:
158
+ type: integer
159
+ description: Unix timestamp (seconds) indicating when the response was generated.
160
+ rates:
161
+ $ref: '#/components/schemas/CommodityRates'
162
+ metadata:
163
+ $ref: '#/components/schemas/CommodityMetadata'
164
+ description: Live commodity prices response containing success status, timestamp, rates, and metadata.
165
+ CommodityRates:
166
+ type: object
167
+ 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.
168
+ additionalProperties:
169
+ title: CommodityPrice
170
+ type: number
171
+ description: Current live price for this commodity symbol.
172
+ CommodityMetadata:
173
+ type: object
174
+ description: Map of requested commodity symbols to their unit and quote currency metadata. Each key is a commodity symbol (e.g. XAU).
175
+ additionalProperties:
176
+ title: CommodityMetadataItem
177
+ type: object
178
+ description: Unit and currency metadata for a single commodity.
179
+ required:
180
+ - unit
181
+ - quote
182
+ properties:
183
+ unit:
184
+ type: string
185
+ description: Unit of measurement for the commodity (e.g., Bbl, T.oz).
186
+ quote:
187
+ type: string
188
+ description: Quote currency used for this commodity's price.
189
+ ErrorResponse:
190
+ type: object
191
+ description: Standard error envelope returned by the API on failed requests.
192
+ required:
193
+ - message
194
+ properties:
195
+ error:
196
+ type: string
197
+ description: Short error category or exception type.
198
+ message:
199
+ type: string
200
+ description: Human-readable error message describing the failure.
201
+ path:
202
+ type: string
203
+ description: API endpoint path that produced the error.
204
+ status:
205
+ type: integer
206
+ description: HTTP status code returned with the error.
207
+ timestamp:
208
+ type: string
209
+ format: date-time
210
+ description: Timestamp when the error occurred (ISO 8601).
211
+ CommodityNotFoundError:
212
+ type: object
213
+ 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.
214
+ required:
215
+ - code
216
+ - error
217
+ - message
218
+ properties:
219
+ timestamp:
220
+ type: integer
221
+ description: Unix timestamp in milliseconds when the error occurred.
222
+ path:
223
+ type: string
224
+ description: Internal service path that produced the error.
225
+ code:
226
+ type: integer
227
+ description: HTTP status code returned with the error.
228
+ error:
229
+ type: string
230
+ description: Specific error type (e.g., SYMBOL_NOT_FOUND, QUOTE_NOT_FOUND).
231
+ message:
232
+ type: string
233
+ description: Human-readable error message describing the failure.
234
+ security:
235
+ - ApiKeyAuthHeader: []
236
+ - ApiKeyAuthQuery: []
@@ -0,0 +1,159 @@
1
+ openapi: 3.1.1
2
+ info:
3
+ title: Commodity Symbols API Reference
4
+ version: 1.0.0
5
+ 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.
6
+ contact:
7
+ name: APIFreaks Support
8
+ url: https://apifreaks.com/contact
9
+ email: support@apifreaks.com
10
+ servers:
11
+ - url: https://api.apifreaks.com/v1.0
12
+ description: Commodity Symbols API Server
13
+ paths:
14
+ /commodity/symbols:
15
+ get:
16
+ tags:
17
+ - Commodity APIs
18
+ summary: Get all supported commodity symbols
19
+ description: Returns the list of supported commodity symbols with metadata.
20
+ operationId: getCommoditySymbols
21
+ parameters:
22
+ - name: format
23
+ in: query
24
+ required: false
25
+ description: 'Response format. Accepted values: `json` (default) or `xml`.'
26
+ schema:
27
+ type: string
28
+ enum:
29
+ - json
30
+ default: json
31
+ responses:
32
+ '200':
33
+ description: Successful operation
34
+ content:
35
+ application/json:
36
+ schema:
37
+ $ref: '#/components/schemas/CommoditySymbolsResponse'
38
+ examples:
39
+ success:
40
+ summary: Successful response
41
+ value:
42
+ success: true
43
+ symbols:
44
+ - symbol: XAU
45
+ name: Gold
46
+ category: Metals
47
+ status: active
48
+ updateInterval: PER_SECOND
49
+ currency:
50
+ code: USD
51
+ name: US Dollar
52
+ symbol: $
53
+ unit:
54
+ symbol: T.oz
55
+ name: Troy Ounce
56
+ - symbol: NG-FUT
57
+ name: Natural Gas Futures
58
+ category: Energy
59
+ status: active
60
+ updateInterval: PER_MINUTE
61
+ currency:
62
+ code: USD
63
+ name: US Dollar
64
+ symbol: $
65
+ unit:
66
+ symbol: MMBtu
67
+ name: Million British Thermal Units
68
+ components:
69
+ securitySchemes:
70
+ ApiKeyAuthHeader:
71
+ type: apiKey
72
+ in: header
73
+ name: X-apiKey
74
+ description: Pass your API key via the X-apiKey request header.
75
+ ApiKeyAuthQuery:
76
+ type: apiKey
77
+ in: query
78
+ name: apiKey
79
+ description: Pass your API key via the apiKey query parameter.
80
+ schemas:
81
+ CommoditySymbolsResponse:
82
+ type: object
83
+ required:
84
+ - success
85
+ - symbols
86
+ properties:
87
+ success:
88
+ type: boolean
89
+ description: Indicates whether the API request was successful.
90
+ symbols:
91
+ type: array
92
+ description: Array of commodity symbol objects with metadata.
93
+ items:
94
+ $ref: '#/components/schemas/CommoditySymbolItem'
95
+ description: Commodity symbols response containing an array of supported commodity symbol objects.
96
+ CommoditySymbolItem:
97
+ type: object
98
+ description: A single commodity symbol with metadata.
99
+ required:
100
+ - symbol
101
+ - name
102
+ - category
103
+ - status
104
+ - updateInterval
105
+ - currency
106
+ - unit
107
+ properties:
108
+ symbol:
109
+ type: string
110
+ description: Unique identifier/ticker symbol for the commodity (e.g., XAU, NG-FUT).
111
+ name:
112
+ type: string
113
+ description: Full name of the commodity (e.g., Gold, Natural Gas Futures).
114
+ category:
115
+ type: string
116
+ description: Category the commodity belongs to (e.g., Metals, Energy).
117
+ status:
118
+ type: string
119
+ description: 'Current status of the commodity. Value: active.'
120
+ updateInterval:
121
+ type: string
122
+ description: 'Rate at which the price is updated. Values: PER_SECOND, PER_MINUTE.'
123
+ currency:
124
+ $ref: '#/components/schemas/CommodityCurrency'
125
+ unit:
126
+ $ref: '#/components/schemas/CommodityUnit'
127
+ CommodityCurrency:
128
+ type: object
129
+ description: Currency information for a commodity.
130
+ required:
131
+ - code
132
+ - name
133
+ - symbol
134
+ properties:
135
+ code:
136
+ type: string
137
+ description: ISO 4217 currency code.
138
+ name:
139
+ type: string
140
+ description: Full name of the currency.
141
+ symbol:
142
+ type: string
143
+ description: Symbol of the currency (e.g., $).
144
+ CommodityUnit:
145
+ type: object
146
+ description: Unit of measurement for a commodity.
147
+ required:
148
+ - symbol
149
+ - name
150
+ properties:
151
+ symbol:
152
+ type: string
153
+ description: Abbreviated unit symbol (e.g., T.oz, MMBtu).
154
+ name:
155
+ type: string
156
+ description: Full name of the unit of measurement (e.g., Troy Ounce).
157
+ security:
158
+ - ApiKeyAuthHeader: []
159
+ - ApiKeyAuthQuery: []