{"openapi":"3.1.0","info":{"title":"Frankfurter over Airnode","version":"2.0.0","description":"Frankfurter's foreign exchange rates, blended from what central banks and other official sources publish rather than taken from any one of them. Latest and historical daily rates, reaching back to 1999 for the currencies that go that far. getCurrencies says which currencies are covered and getProviders which sources are blended, so a caller that needs either asks rather than assuming.\n\nEvery response carries an EIP-191 signature from the Airnode that served it, so the data can be attributed back to its source rather than trusted on reputation."},"servers":[{"url":"http://airnode-frankfurter.fly.dev"}],"paths":{"/":{"get":{"operationId":"getDocumentation","summary":"This document.","description":"Describes the operations this Airnode serves and how to verify what it returns. Free.","responses":{"200":{"description":"An OpenAPI document describing this Airnode.","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"operationId":"performRequest","summary":"Perform an operation and attest to the response.","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"title":"getRates","type":"object","required":["operation","parameters"],"additionalProperties":false,"properties":{"operation":{"const":"getRates","description":"Exchange rates from one base currency to many, latest or historical.","x-airnode-returns":{"date":"string","base":"string","quote":"string","rate":"number","providers":"array"}},"parameters":{"type":"object","additionalProperties":false,"required":[],"properties":{"date":{"description":"A single day. Refused alongside from or to.","type":"string","format":"date"},"from":{"description":"First day of a range.","type":"string","format":"date"},"to":{"description":"Last day of a range. Omitted, the range runs to today.","type":"string","format":"date"},"base":{"description":"The currency every rate is quoted from, as an ISO 4217 code. Omitted, it is EUR.","type":"string","examples":["USD"]},"quotes":{"description":"Currencies to quote into, comma separated. Omitted, every covered currency is returned.","type":"string","examples":["USD","GBP","JPY"]},"providers":{"description":"Blend only these sources, comma separated by their key. getProviders lists the keys. Omitted, every source that publishes the pair is blended.","type":"string","examples":["ECB","FED"]},"group":{"description":"Downsample a range to one record per week or per month. Each record is dated the period it starts, which can fall before from. Ignored without a range.","type":"string","enum":["week","month"]},"expand":{"description":"Set to providers to add each source's own observation date and rate to every record, the ones excluded from the blend included and flagged. Costs a recompute per date, so a long range is refused with it.","type":"string"}}}}},{"title":"getRate","type":"object","required":["operation","parameters"],"additionalProperties":false,"properties":{"operation":{"const":"getRate","description":"One exchange rate for one currency pair.","x-airnode-returns":{"date":"string","base":"string","quote":"string","rate":"number","providers":"array"}},"parameters":{"type":"object","additionalProperties":false,"required":["base","quote"],"properties":{"base":{"description":"The currency the rate is quoted from, as an ISO 4217 code.","type":"string","examples":["EUR"]},"quote":{"description":"The currency the rate is quoted into, as an ISO 4217 code.","type":"string","examples":["USD"]},"date":{"description":"The day to price. Omitted, the latest rate.","type":"string","format":"date"},"providers":{"description":"Blend only these sources, comma separated by their key. getProviders lists the keys.","type":"string","examples":["ECB","FED"]}}}}},{"title":"getCurrencies","type":"object","required":["operation","parameters"],"additionalProperties":false,"properties":{"operation":{"const":"getCurrencies","description":"The currencies rates can be asked for.","x-airnode-returns":{"iso_code":"string","iso_numeric":"string","name":"string","symbol":"string","start_date":"string","end_date":"string"}},"parameters":{"type":"object","additionalProperties":false,"required":[],"properties":{"scope":{"description":"Include currencies that no longer trade, the pre-euro national ones among them. Omitted, only currently active currencies.","type":"string","const":"all"},"providers":{"description":"Limit to the currencies these sources publish, comma separated by their key.","type":"string","examples":["ECB","FED"]}}}}},{"title":"getCurrency","type":"object","required":["operation","parameters"],"additionalProperties":false,"properties":{"operation":{"const":"getCurrency","description":"One currency, with the sources publishing it and its peg.","x-airnode-returns":{"iso_code":"string","iso_numeric":"string","name":"string","symbol":"string","start_date":"string","end_date":"string","providers":"array","peg":"object"}},"parameters":{"type":"object","additionalProperties":false,"required":["code"],"properties":{"code":{"description":"The currency, as an ISO 4217 code.","type":"string","examples":["USD"]}}}}},{"title":"getProviders","type":"object","required":["operation","parameters"],"additionalProperties":false,"properties":{"operation":{"const":"getProviders","description":"The sources the rates are blended from.","x-airnode-returns":{"key":"string","name":"string","country_code":"string","rate_type":"string","pivot_currency":"string","data_url":"string","terms_url":"string","start_date":"string","end_date":"string","publish_cadence":"string","publishes_missed":"integer","currencies":"array"}},"parameters":{"type":"object","additionalProperties":false,"required":[],"properties":{}}}}]}}}},"responses":{"200":{"description":"The upstream response and the attestation over it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attestation"}}}},"400":{"description":"The operation exists but the parameters are missing, unknown or malformed."},"404":{"description":"No such operation."},"502":{"description":"The upstream API could not be reached or refused the request."}}}}},"components":{"schemas":{"Attestation":{"type":"object","required":["airnode","requestHash","timestamp","data","signature"],"properties":{"airnode":{"type":"string","description":"The address whose signature attests to this response."},"requestHash":{"type":"string","description":"Identifies the request this response answers."},"timestamp":{"type":"string","description":"Unix seconds at which the response was signed."},"data":{"description":"The upstream response body: the JSON value when it parses as JSON, the text as received otherwise."},"signature":{"type":"string","description":"The attestation itself."}}}}},"x-airnode":{"address":"0x230078619710911032BEF192918203359E7DB22f","version":"0.1.0","attestation":{"scheme":"eip191-secp256k1","digest":"keccak256(abi.encodePacked(bytes32 requestHash, uint256 timestamp, bytes dataBytes))","dataBytes":"UTF-8 of data, or of its compact JSON when data is not a string","requestHash":"keccak256(utf8(JSON.stringify([operation, parameterEntriesSortedByName]))), where an object value is itself entries sorted by name, at any depth, and an array keeps its order","verify":"Recover the signer of the signature over the digest and check it equals the address above."}}}