Available in plans >= small

Convert Exchange Rates

On this page, we’ll dive into the convert exchange rates endpoint you can use to directly convert a value to another currency's value.


GET/v3/convert

Convert Exchange Rates

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

Required attributes

  • Name
    value
    Type
    number
    Description

    The value you want to convert. Must be greater than 0

Optional attributes

  • Name
    date
    Type
    string
    Description

    Date to convert against historical rates (format: 2021-12-31) Must be at least one day in the past; omit for the latest rates

  • Name
    base_currency
    Type
    string
    Description

    The base currency to which all results are behaving relative to By default all values are based on USD

  • Name
    currencies
    Type
    string
    Description

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

  • Name
    type
    Type
    string
    Description

    The type of currency you want to get (fiat, metal or crypto) By default all types will be shown

Response Properties

The response structure is equal to the response from the /latest endpoint, but every value is already multiplied by the value you sent — no manual math needed.

Request

GET
/v3/convert
curl -G https://api.currencyapi.com/v3/convert?value=12 \
    -H "apikey: YOUR-API-KEY"

Full Response

{
    "meta": {
        "last_updated_at": "2022-01-01T23:59:59Z"
    },
    "data": {
        "AED": {
            "code": "AED",
            "value": 44.07672
        },
        "AFN": {
            "code": "AFN",
            "value": 1101.63048
        },
        "ALL": {
            "code": "ALL",
            "value": 1298.74848
        },
        "AMD": {
            "code": "AMD",
            "value": 5764.99908
        },
        "...": "180+ more currencies"
    }
}