@apifreaks/openapi-specs 0.1.0
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/LICENSE +21 -0
- package/README.md +156 -0
- package/dist/index.cjs +44663 -0
- package/dist/index.d.cts +30 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +44631 -0
- package/package.json +81 -0
- package/specs/commodity/commodity-fluctuation.json +301 -0
- package/specs/commodity/commodity-prices.json +317 -0
- package/specs/commodity/commodity-symbols.json +215 -0
- package/specs/commodity/commodity-time-series.json +329 -0
- package/specs/commodity/historical-commodity-prices.json +273 -0
- package/specs/currency/currency-converter.json +261 -0
- package/specs/currency/currency-fluctuation.json +282 -0
- package/specs/currency/currency-historical-data-limit.json +158 -0
- package/specs/currency/currency-rate.json +229 -0
- package/specs/currency/currency-supported.json +234 -0
- package/specs/currency/currency-symbols.json +161 -0
- package/specs/currency/currency-time-series.json +325 -0
- package/specs/currency/geolocalized-currency-conversion.json +287 -0
- package/specs/currency/historical-currency-converter.json +269 -0
- package/specs/currency/historical-currency-rate.json +246 -0
- package/specs/dns/bulk-dns-lookup.json +624 -0
- package/specs/dns/dns-history-lookup.json +579 -0
- package/specs/dns/dns-lookup.json +466 -0
- package/specs/dns/reverse-dns-lookup.json +414 -0
- package/specs/domain/bulk-domain-checker.json +284 -0
- package/specs/domain/domain-search-with-suggestions.json +280 -0
- package/specs/domain/domain-search.json +206 -0
- package/specs/domain/subdomain-lookup.json +343 -0
- package/specs/email-validation/bulk-email-validation.json +534 -0
- package/specs/email-validation/email-checker.json +586 -0
- package/specs/financial/bulk-vat-rates-country.json +341 -0
- package/specs/financial/financial-apis-supported-countries.json +204 -0
- package/specs/financial/iban-validation.json +328 -0
- package/specs/financial/swift-code-finder.json +192 -0
- package/specs/financial/swift-code-lookup.json +220 -0
- package/specs/financial/vat-number-validation.json +283 -0
- package/specs/financial/vat-rates-by-ip.json +275 -0
- package/specs/financial/vat-rates-country.json +288 -0
- package/specs/general/usage-credits.json +218 -0
- package/specs/geocoding/forward-geocoding.json +402 -0
- package/specs/geocoding/reverse-geocoding.json +326 -0
- package/specs/geodb/administrative-units-details.json +250 -0
- package/specs/geodb/administrative-units-levels.json +198 -0
- package/specs/geodb/administrative-units.json +237 -0
- package/specs/geodb/cities.json +288 -0
- package/specs/geodb/countries-details.json +274 -0
- package/specs/geodb/countries.json +276 -0
- package/specs/geodb/flags-supported.json +166 -0
- package/specs/geodb/flags.json +227 -0
- package/specs/geodb/regions.json +109 -0
- package/specs/geodb/subregions.json +217 -0
- package/specs/ip-intelligence/bulk-ip-lookup.json +1162 -0
- package/specs/ip-intelligence/bulk-ip-threat-intelligence.json +417 -0
- package/specs/ip-intelligence/ip-locator.json +941 -0
- package/specs/ip-intelligence/ip-threat-intelligence.json +316 -0
- package/specs/other/astronomy-data.json +803 -0
- package/specs/pdf/delete-pdf-page.json +286 -0
- package/specs/pdf/linearize-pdf.json +277 -0
- package/specs/pdf/merge-pdf.json +285 -0
- package/specs/pdf/pdf-compress.json +304 -0
- package/specs/pdf/pdf-decrypt.json +297 -0
- package/specs/pdf/pdf-encrypt.json +314 -0
- package/specs/pdf/pdf-extract-pages.json +295 -0
- package/specs/pdf/pdf-file-status.json +208 -0
- package/specs/pdf/pdf-file.json +190 -0
- package/specs/pdf/pdf-files.json +126 -0
- package/specs/pdf/pdf-resource-download.json +168 -0
- package/specs/pdf/pdf-resource-upload-binary.json +218 -0
- package/specs/pdf/pdf-resource-upload.json +248 -0
- package/specs/pdf/pdf-restrict.json +343 -0
- package/specs/pdf/pdf-split-pages.json +281 -0
- package/specs/pdf/pdf-task-status.json +252 -0
- package/specs/pdf/pdf-to-image.json +1219 -0
- package/specs/pdf/pdf-unrestrict.json +324 -0
- package/specs/pdf/rotate-pdf-pages.json +305 -0
- package/specs/phone-validation/bulk-phone-number-validation.json +518 -0
- package/specs/phone-validation/phone-number-validation.json +456 -0
- package/specs/scraper/web-scraper.json +674 -0
- package/specs/screenshot/bulk-screenshot.json +949 -0
- package/specs/screenshot/website-screenshot.json +1147 -0
- package/specs/ssl/ssl-certificate-chain-lookup.json +756 -0
- package/specs/ssl/ssl-certificate-lookup.json +634 -0
- package/specs/timezone/timezone-converter.json +362 -0
- package/specs/timezone/timezone-lookup.json +910 -0
- package/specs/user-agent/bulk-user-agent-parser.json +441 -0
- package/specs/user-agent/user-agent-parser.json +346 -0
- package/specs/weather/air-quality.json +779 -0
- package/specs/weather/bulk-live-weather.json +834 -0
- package/specs/weather/flood-forecast.json +693 -0
- package/specs/weather/historical-weather.json +1019 -0
- package/specs/weather/live-weather.json +789 -0
- package/specs/weather/marine-weather.json +940 -0
- package/specs/weather/time-series-weather.json +1056 -0
- package/specs/weather/weather-forecast.json +1202 -0
- package/specs/whois/asn-lookup.json +729 -0
- package/specs/whois/bulk-whois-lookup.json +698 -0
- package/specs/whois/domain-whois-history-lookup.json +500 -0
- package/specs/whois/reverse-whois.json +625 -0
- package/specs/whois/whois-domain-lookup.json +533 -0
- package/specs/whois/whois-ip-lookup.json +1110 -0
- package/specs/zip-code/bulk-zip-code-lookup.json +318 -0
- package/specs/zip-code/zip-code-api.json +299 -0
- package/specs/zip-code/zip-code-distance-match.json +311 -0
- package/specs/zip-code/zip-code-distance.json +307 -0
- package/specs/zip-code/zip-codes-by-city.json +279 -0
- package/specs/zip-code/zip-codes-by-region.json +278 -0
- package/specs/zip-code/zip-codes-radius-search.json +349 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Currency Converter API - Convert 970+ Fiat & Crypto Currencies at Live or Historical Rates",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"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.",
|
|
7
|
+
"contact": {
|
|
8
|
+
"name": "APIFreaks Support",
|
|
9
|
+
"url": "https://apifreaks.com/contact",
|
|
10
|
+
"email": "support@apifreaks.com"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"servers": [
|
|
14
|
+
{
|
|
15
|
+
"url": "https://api.apifreaks.com/v1.0",
|
|
16
|
+
"description": "Currency Converter API Server"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"/currency/converter/latest/prices": {
|
|
21
|
+
"get": {
|
|
22
|
+
"tags": ["Currency APIs"],
|
|
23
|
+
"summary": "Convert currency with latest rates",
|
|
24
|
+
"description": "Converts an amount from one currency to another using the latest exchange rates.",
|
|
25
|
+
"operationId": "convertLatest",
|
|
26
|
+
"parameters": [
|
|
27
|
+
{
|
|
28
|
+
"name": "format",
|
|
29
|
+
"in": "query",
|
|
30
|
+
"required": false,
|
|
31
|
+
"description": "Response format: `json` (default) or `xml`.",
|
|
32
|
+
"schema": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"enum": ["json", "xml"],
|
|
35
|
+
"default": "json"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "from",
|
|
40
|
+
"in": "query",
|
|
41
|
+
"required": true,
|
|
42
|
+
"description": "Source currency code.",
|
|
43
|
+
"schema": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "to",
|
|
49
|
+
"in": "query",
|
|
50
|
+
"required": true,
|
|
51
|
+
"description": "Target currency code.",
|
|
52
|
+
"schema": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "amount",
|
|
58
|
+
"in": "query",
|
|
59
|
+
"required": false,
|
|
60
|
+
"description": "Amount to convert, as a decimal. Defaults to `1`. Must be numeric — non-numeric values return a 400 (negative values are accepted despite the error message's wording).",
|
|
61
|
+
"schema": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"default": "1"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "updates",
|
|
68
|
+
"in": "query",
|
|
69
|
+
"required": false,
|
|
70
|
+
"description": "Update frequency: `1m` (default), `10m`, `1h`, or `1d`.",
|
|
71
|
+
"schema": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"enum": ["1m", "10m", "1h", "1d"],
|
|
74
|
+
"default": "1m"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"responses": {
|
|
79
|
+
"200": {
|
|
80
|
+
"description": "Successful operation",
|
|
81
|
+
"content": {
|
|
82
|
+
"application/json": {
|
|
83
|
+
"schema": {
|
|
84
|
+
"$ref": "#/components/schemas/LatestCurrencyConverterResponse"
|
|
85
|
+
},
|
|
86
|
+
"examples": {
|
|
87
|
+
"success": {
|
|
88
|
+
"summary": "Successful response",
|
|
89
|
+
"value": {
|
|
90
|
+
"date": "2026-07-27 12:05:00+00",
|
|
91
|
+
"from": "USD",
|
|
92
|
+
"to": "EUR",
|
|
93
|
+
"rate": "0.87800",
|
|
94
|
+
"givenAmount": "100.0",
|
|
95
|
+
"convertedAmount": "87.800"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"400": {
|
|
103
|
+
"description": "Bad request - Invalid amount or updates parameter",
|
|
104
|
+
"content": {
|
|
105
|
+
"application/json": {
|
|
106
|
+
"schema": {
|
|
107
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
108
|
+
},
|
|
109
|
+
"examples": {
|
|
110
|
+
"missingParams": {
|
|
111
|
+
"summary": "Missing required from/to parameter",
|
|
112
|
+
"value": {
|
|
113
|
+
"error": "Invalid Param Exception",
|
|
114
|
+
"message": "please pass correct parameters",
|
|
115
|
+
"path": "/v1.0/currency/converter/latest/prices",
|
|
116
|
+
"status": 400,
|
|
117
|
+
"timestamp": "2026-07-27T12:05:29.609Z"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"invalidAmount": {
|
|
121
|
+
"summary": "amount is not numeric",
|
|
122
|
+
"value": {
|
|
123
|
+
"timestamp": 1785153941995,
|
|
124
|
+
"status": 400,
|
|
125
|
+
"error": "Method Argument Type Mismatch",
|
|
126
|
+
"message": "Invalid Amount. Please provide amount in decimal format and greater than 0!",
|
|
127
|
+
"path": "/v2.0/convert/latest"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"invalidUpdates": {
|
|
131
|
+
"summary": "updates is not one of 1m/10m/1h/1d",
|
|
132
|
+
"value": {
|
|
133
|
+
"timestamp": 1785153942533,
|
|
134
|
+
"status": 400,
|
|
135
|
+
"error": "Invalid Param Exception",
|
|
136
|
+
"message": "Please provide valid updates parameter (1d,1h,10m,1m)",
|
|
137
|
+
"path": "/v2.0/convert/latest"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"404": {
|
|
145
|
+
"description": "Not found - Currency not available",
|
|
146
|
+
"content": {
|
|
147
|
+
"application/json": {
|
|
148
|
+
"schema": {
|
|
149
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
150
|
+
},
|
|
151
|
+
"examples": {
|
|
152
|
+
"invalidBase": {
|
|
153
|
+
"summary": "from currency not supported",
|
|
154
|
+
"value": {
|
|
155
|
+
"timestamp": 1785153930704,
|
|
156
|
+
"status": 404,
|
|
157
|
+
"error": "Not Found Exception",
|
|
158
|
+
"message": "Rates of provided currency ZZZ are not available in our database!",
|
|
159
|
+
"path": "/v2.0/convert/latest"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"components": {
|
|
171
|
+
"securitySchemes": {
|
|
172
|
+
"ApiKeyAuthHeader": {
|
|
173
|
+
"type": "apiKey",
|
|
174
|
+
"in": "header",
|
|
175
|
+
"name": "X-apiKey",
|
|
176
|
+
"description": "Pass your API key via the X-apiKey request header."
|
|
177
|
+
},
|
|
178
|
+
"ApiKeyAuthQuery": {
|
|
179
|
+
"type": "apiKey",
|
|
180
|
+
"in": "query",
|
|
181
|
+
"name": "apiKey",
|
|
182
|
+
"description": "Pass your API key via the apiKey query parameter."
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"schemas": {
|
|
186
|
+
"LatestCurrencyConverterResponse": {
|
|
187
|
+
"type": "object",
|
|
188
|
+
"required": [
|
|
189
|
+
"date",
|
|
190
|
+
"from",
|
|
191
|
+
"to",
|
|
192
|
+
"rate",
|
|
193
|
+
"givenAmount",
|
|
194
|
+
"convertedAmount"
|
|
195
|
+
],
|
|
196
|
+
"properties": {
|
|
197
|
+
"date": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"description": "Date and time with timezone (UTC) when the rate was recorded."
|
|
200
|
+
},
|
|
201
|
+
"from": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"description": "Source currency code."
|
|
204
|
+
},
|
|
205
|
+
"to": {
|
|
206
|
+
"type": "string",
|
|
207
|
+
"description": "Target currency code."
|
|
208
|
+
},
|
|
209
|
+
"rate": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"description": "Conversion rate from source to target currency."
|
|
212
|
+
},
|
|
213
|
+
"givenAmount": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"description": "The amount provided for conversion."
|
|
216
|
+
},
|
|
217
|
+
"convertedAmount": {
|
|
218
|
+
"type": "string",
|
|
219
|
+
"description": "The converted amount in the target currency."
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"description": "Currency conversion response containing the exchange rate and converted amount."
|
|
223
|
+
},
|
|
224
|
+
"ErrorResponse": {
|
|
225
|
+
"type": "object",
|
|
226
|
+
"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.",
|
|
227
|
+
"required": ["message"],
|
|
228
|
+
"properties": {
|
|
229
|
+
"timestamp": {
|
|
230
|
+
"type": ["string", "integer"],
|
|
231
|
+
"description": "Timestamp when the error occurred — ISO 8601 string for gateway errors, Unix milliseconds integer for currency-service errors."
|
|
232
|
+
},
|
|
233
|
+
"status": {
|
|
234
|
+
"type": "integer",
|
|
235
|
+
"description": "HTTP status code returned with the error."
|
|
236
|
+
},
|
|
237
|
+
"error": {
|
|
238
|
+
"type": "string",
|
|
239
|
+
"description": "Specific error type (e.g., Invalid Param Exception, Method Argument Type Mismatch, Not Found Exception)."
|
|
240
|
+
},
|
|
241
|
+
"message": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"description": "Human-readable error message describing the failure."
|
|
244
|
+
},
|
|
245
|
+
"path": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"description": "API endpoint path (gateway errors) or internal service path (currency-service errors) that produced the error."
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"security": [
|
|
254
|
+
{
|
|
255
|
+
"ApiKeyAuthHeader": []
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"ApiKeyAuthQuery": []
|
|
259
|
+
}
|
|
260
|
+
]
|
|
261
|
+
}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Currency Fluctuation API - Get Currency Fluctuations Over a Time Period",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"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.",
|
|
7
|
+
"contact": {
|
|
8
|
+
"name": "APIFreaks Support",
|
|
9
|
+
"url": "https://apifreaks.com/contact",
|
|
10
|
+
"email": "support@apifreaks.com"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"servers": [
|
|
14
|
+
{
|
|
15
|
+
"url": "https://api.apifreaks.com/v1.0",
|
|
16
|
+
"description": "Currency Fluctuation API Server"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"/currency/fluctuation": {
|
|
21
|
+
"get": {
|
|
22
|
+
"tags": ["Currency APIs"],
|
|
23
|
+
"summary": "Get exchange rate fluctuations",
|
|
24
|
+
"description": "Returns exchange rate fluctuations between two dates for the requested symbols.",
|
|
25
|
+
"operationId": "getFluctuation",
|
|
26
|
+
"parameters": [
|
|
27
|
+
{
|
|
28
|
+
"name": "format",
|
|
29
|
+
"in": "query",
|
|
30
|
+
"required": false,
|
|
31
|
+
"description": "Response format: `json` (default) or `xml`.",
|
|
32
|
+
"schema": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"enum": ["json", "xml"],
|
|
35
|
+
"default": "json"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "startDate",
|
|
40
|
+
"in": "query",
|
|
41
|
+
"required": true,
|
|
42
|
+
"description": "Start date in `YYYY-MM-DD` format.",
|
|
43
|
+
"schema": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "endDate",
|
|
49
|
+
"in": "query",
|
|
50
|
+
"required": false,
|
|
51
|
+
"description": "End date in `YYYY-MM-DD` format. Defaults to yesterday.",
|
|
52
|
+
"schema": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "base",
|
|
58
|
+
"in": "query",
|
|
59
|
+
"required": false,
|
|
60
|
+
"description": "Base currency code. Defaults to `USD`.",
|
|
61
|
+
"schema": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"default": "USD"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "symbols",
|
|
68
|
+
"in": "query",
|
|
69
|
+
"required": false,
|
|
70
|
+
"description": "Comma-separated currency codes. Omit to get all available rates.",
|
|
71
|
+
"schema": {
|
|
72
|
+
"type": "string"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"responses": {
|
|
77
|
+
"200": {
|
|
78
|
+
"description": "Successful operation",
|
|
79
|
+
"content": {
|
|
80
|
+
"application/json": {
|
|
81
|
+
"schema": {
|
|
82
|
+
"$ref": "#/components/schemas/CurrencyFluctuationResponse"
|
|
83
|
+
},
|
|
84
|
+
"examples": {
|
|
85
|
+
"success": {
|
|
86
|
+
"summary": "Successful response",
|
|
87
|
+
"value": {
|
|
88
|
+
"startDate": "2025-01-01",
|
|
89
|
+
"endDate": "2025-01-10",
|
|
90
|
+
"base": "USD",
|
|
91
|
+
"rateFluctuations": {
|
|
92
|
+
"EUR": {
|
|
93
|
+
"startRate": "0.96605",
|
|
94
|
+
"endRate": "0.97620",
|
|
95
|
+
"change": "-0.010150",
|
|
96
|
+
"percentChange": "-1.05"
|
|
97
|
+
},
|
|
98
|
+
"PKR": {
|
|
99
|
+
"startRate": "278.400",
|
|
100
|
+
"endRate": "278.650",
|
|
101
|
+
"change": "-0.25",
|
|
102
|
+
"percentChange": "-0.09"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"400": {
|
|
112
|
+
"description": "Bad request - Invalid dates",
|
|
113
|
+
"content": {
|
|
114
|
+
"application/json": {
|
|
115
|
+
"schema": {
|
|
116
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
117
|
+
},
|
|
118
|
+
"examples": {
|
|
119
|
+
"missingStartDate": {
|
|
120
|
+
"summary": "Missing required startDate parameter",
|
|
121
|
+
"value": {
|
|
122
|
+
"error": "Invalid Param Exception",
|
|
123
|
+
"message": "please pass correct parameters",
|
|
124
|
+
"path": "/v1.0/currency/fluctuation",
|
|
125
|
+
"status": 400,
|
|
126
|
+
"timestamp": "2026-07-27T12:09:21.348Z"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"startAfterEnd": {
|
|
130
|
+
"summary": "startDate is after endDate or the current date",
|
|
131
|
+
"value": {
|
|
132
|
+
"timestamp": 1785154172736,
|
|
133
|
+
"status": 400,
|
|
134
|
+
"error": "Invalid Param Exception",
|
|
135
|
+
"message": "Starting date cannot be after current date or ending date",
|
|
136
|
+
"path": "/v2.0/fluctuation"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"invalidDateFormat": {
|
|
140
|
+
"summary": "startDate/endDate not in YYYY-MM-DD format",
|
|
141
|
+
"value": {
|
|
142
|
+
"timestamp": 1785154172225,
|
|
143
|
+
"status": 400,
|
|
144
|
+
"error": "Invalid Param Exception",
|
|
145
|
+
"message": "Provided Dates are in Invalid Format. Dates must be in a valid format YYYY-MM-DD!",
|
|
146
|
+
"path": "/v2.0/fluctuation"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"404": {
|
|
154
|
+
"description": "Not found - No data for interval",
|
|
155
|
+
"content": {
|
|
156
|
+
"application/json": {
|
|
157
|
+
"schema": {
|
|
158
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
159
|
+
},
|
|
160
|
+
"examples": {
|
|
161
|
+
"noData": {
|
|
162
|
+
"summary": "base or symbols not supported for the given interval",
|
|
163
|
+
"value": {
|
|
164
|
+
"timestamp": 1785154173332,
|
|
165
|
+
"status": 404,
|
|
166
|
+
"error": "Not Found Exception",
|
|
167
|
+
"message": "Rates of provided base and symbols are not found for given intervals.",
|
|
168
|
+
"path": "/v2.0/fluctuation"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"components": {
|
|
180
|
+
"securitySchemes": {
|
|
181
|
+
"ApiKeyAuthHeader": {
|
|
182
|
+
"type": "apiKey",
|
|
183
|
+
"in": "header",
|
|
184
|
+
"name": "X-apiKey",
|
|
185
|
+
"description": "Pass your API key via the X-apiKey request header."
|
|
186
|
+
},
|
|
187
|
+
"ApiKeyAuthQuery": {
|
|
188
|
+
"type": "apiKey",
|
|
189
|
+
"in": "query",
|
|
190
|
+
"name": "apiKey",
|
|
191
|
+
"description": "Pass your API key via the apiKey query parameter."
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"schemas": {
|
|
195
|
+
"CurrencyFluctuationResponse": {
|
|
196
|
+
"type": "object",
|
|
197
|
+
"required": ["startDate", "endDate", "base", "rateFluctuations"],
|
|
198
|
+
"properties": {
|
|
199
|
+
"startDate": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"description": "Start date of the interval (YYYY-MM-DD)."
|
|
202
|
+
},
|
|
203
|
+
"endDate": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"description": "End date of the interval (YYYY-MM-DD)."
|
|
206
|
+
},
|
|
207
|
+
"base": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"description": "Base currency used for all fluctuations."
|
|
210
|
+
},
|
|
211
|
+
"rateFluctuations": {
|
|
212
|
+
"type": "object",
|
|
213
|
+
"description": "Map of currency codes to their fluctuation details. Each key is a currency code and the value contains startRate, endRate, change, and percentChange.",
|
|
214
|
+
"additionalProperties": {
|
|
215
|
+
"title": "CurrencyFluctuationItem",
|
|
216
|
+
"$ref": "#/components/schemas/CurrencyFluctuationItem"
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"description": "Currency fluctuation response containing rate changes per symbol over a date interval."
|
|
221
|
+
},
|
|
222
|
+
"CurrencyFluctuationItem": {
|
|
223
|
+
"type": "object",
|
|
224
|
+
"description": "Fluctuation metrics for a single currency over a date interval.",
|
|
225
|
+
"required": ["startRate", "endRate", "change", "percentChange"],
|
|
226
|
+
"properties": {
|
|
227
|
+
"startRate": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"description": "Rate of the currency at the start of the interval."
|
|
230
|
+
},
|
|
231
|
+
"endRate": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"description": "Rate of the currency at the end of the interval."
|
|
234
|
+
},
|
|
235
|
+
"change": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"description": "Absolute change between start and end rate. Can be positive or negative."
|
|
238
|
+
},
|
|
239
|
+
"percentChange": {
|
|
240
|
+
"type": "string",
|
|
241
|
+
"description": "Percentage change between start and end rate. Can be positive or negative."
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"ErrorResponse": {
|
|
246
|
+
"type": "object",
|
|
247
|
+
"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.",
|
|
248
|
+
"required": ["message"],
|
|
249
|
+
"properties": {
|
|
250
|
+
"timestamp": {
|
|
251
|
+
"type": ["string", "integer"],
|
|
252
|
+
"description": "Timestamp when the error occurred — ISO 8601 string for gateway errors, Unix milliseconds integer for currency-service errors."
|
|
253
|
+
},
|
|
254
|
+
"status": {
|
|
255
|
+
"type": "integer",
|
|
256
|
+
"description": "HTTP status code returned with the error."
|
|
257
|
+
},
|
|
258
|
+
"error": {
|
|
259
|
+
"type": "string",
|
|
260
|
+
"description": "Specific error type (e.g., Invalid Param Exception, Not Found Exception)."
|
|
261
|
+
},
|
|
262
|
+
"message": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"description": "Human-readable error message describing the failure."
|
|
265
|
+
},
|
|
266
|
+
"path": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"description": "API endpoint path (gateway errors) or internal service path (currency-service errors) that produced the error."
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"security": [
|
|
275
|
+
{
|
|
276
|
+
"ApiKeyAuthHeader": []
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"ApiKeyAuthQuery": []
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
}
|