# Convert Exchange Rates

Returns calculated values for today or any given date for all currencies.

Plan required

The convert endpoint is not part of every plan. If your plan does not include it, requests fail with a 403 status code:

{
    "message": "You are not allowed to use the convert endpoint, please upgrade your plan",
    "info": "For more information, see documentation: https://fxapi.com/docs/status-codes#_403"
}

To use this endpoint please upgrade your plan (opens new window).

Request Method: GET
Request URL: https://api.fxapi.com/v1/convert

# Request Parameters

Parameter Type Mandatory Description
apikey string Your API Key
value number The value you want to convert
Must be greater than 0
date string Date to retrieve historical rates from (format: 2021-12-31)
Must be at least one day in the past and not before 1999-01-01
Omit for the latest rates
base_currency string The base currency to which all results are behaving relative to
By default all values are based on USD
currencies string A list of comma-separated currency codes which you want to get (EUR,USD,CAD)
The array form currencies[]=EUR&currencies[]=USD is also accepted
By default all available currencies will be shown
type string Filter the returned currencies by type
Possible Values: fiat, metal, crypto
By default currencies of all types are returned

# Sample Response

The API response comes in easy-to-read JSON format and contains the converted values for all requested currencies.

{
    "meta": {
        "last_updated_at": "2022-01-01T23:59:59Z"
    },
    "data": {
        "AED": {
            "code": "AED",
            "value": 3.67306
        },
        "AFN": {
            "code": "AFN",
            "value": 91.80254
        },
        "ALL": {
            "code": "ALL",
            "value": 108.22904
        },
        "AMD": {
            "code": "AMD",
            "value": 480.41659
        },
        "...": "150+ more currencies"
    }
}