Skip to content

RichardSouzza/CurrencyExchange

Repository files navigation

CurrencyExchange

A Flask-based website that shows data for the world's major currencies.

Link: CurrencyExchange

Visitors

Features

API

The CurrencyExchange makes currency data available through its API.

Endpoints

Currencies Endpoint

Returns data for selected currencies.

Request Method: GET

Request URL: https://currencyexchangs.vercel.app/currencies

Request Parameters

Parameter Type Mandatory Description
currencies string A list of comma separated currency codes which you want to get (EUR,USD,CAD) By default all available currencies will be shown

Sample Request

from requests import get
from json import dumps

url = "https://currencyexchangs.vercel.app/currencies"

params = {
    "currencies": "EUR, USD, CAD"
}

resp = get(url, params=params)

data = resp.json()

print(dumps(data, indent=4))

Sample Response

{
    "EUR": {
        "code": "EUR",
        "decimal_digits": 2,
        "history": {
            "2023-05-24": {
                "AUD": 1.6434,
                "BGN": 1.9536,
                "BRL": 5.3349,
                "..."
                "TRY": 21.4166,
                "USD": 1.0756,
                "ZAR": 20.696
            },
            "2023-05-25": {
                "AUD": 1.6503,
                "BGN": 1.9556,
                "BRL": 5.4014,
                "..."
                "TRY": 21.4261,
                "USD": 1.0724,
                "ZAR": 21.2226
            },
            "..."
            "2023-05-29": {
                "AUD": 1.6402,
                "BGN": 1.9557,
                "BRL": 5.3746,
                "..."
                "TRY": 21.5727,
                "USD": 1.0707,
                "ZAR": 21.0558
            },
            "2023-05-30": {
                "AUD": 1.6465,
                "BGN": 1.9556,
                "BRL": 5.4046,
                "..."
                "TRY": 22.1244,
                "USD": 1.0731,
                "ZAR": 21.1276
            }
        },
        "name": "Euro",
        "name_plural": "Euros",
        "rounding": 0,
        "symbol": "",
        "symbol_native": ""
    }
}