Transparent, secure, fast and easy-to-use GraphQL and REST API for foreign exchange rates and currency conversion.
- Get a free API key
- Have a look at the docs
Questions and suggestions are very welcome, just open an issue.
Query:
query LatestEuro {
latest(baseCurrency: "EUR", quoteCurrencies: ["USD", "CHF", "HKD"]) {
date
baseCurrency
quoteCurrency
quote
}
}
Response:
{
"data": {
"latest": [
{
"date": "2020-04-08",
"baseCurrency": "EUR",
"quoteCurrency": "CHF",
"quote": 1.0557
},
{
"date": "2020-04-08",
"baseCurrency": "EUR",
"quoteCurrency": "HKD",
"quote": 8.4277
},
{
"date": "2020-04-08",
"baseCurrency": "EUR",
"quoteCurrency": "USD",
"quote": 1.0871
}
]
}
}
Query:
curl -i -H "Authorization: ApiKey <api-key>" "https://swop.cx/rest/rates"
Response:
[
{
"base_currency": "EUR",
"quote_currency": "CHF",
"quote": 1.054871,
"date": "2020-04-04"
},
{
"base_currency": "EUR",
"quote_currency": "GBP",
"quote": 0.878173,
"date": "2020-04-04"
},
{
"base_currency": "EUR",
"quote_currency": "USD",
"quote": 1.079301,
"date": "2020-04-04"
}
]