Latest Exchange Rates

On this page, we’ll dive into the latest exchange rates endpoint you can use to retrieve the latest currency exchange rate data for any given base currency, programmatically.


GET/v3/latest

Latest Currency Exchange Data

This endpoint returns currency exchange data for any given base currency (default USD).

Optional attributes

  • 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) Alternatively you can provide a GET parameter array like so: currencies[]=EUR&currencies[]=USD By default all available currencies will be shown

  • Name
    type
    Type
    string
    Description

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

Reponse Structure

The API response comes as a JSON and consists of a meta and a data key. The meta holds useful information like the last_updated_at datetime to let you know then this dataset was last updated. The data key holds the actual currency information.

Request

GET
/v3/latest
curl -G https://api.currencyapi.com/v3/latest \
    -H "apikey: YOUR-API-KEY"

Full Response

{
    "meta": {
        "last_updated_at": "2023-06-23T10:15: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"
    }
}

meta   Response Properties

Available in all plans
  • Name
    last_updated_at
    Type
    string
    Description

    The latest update time as a datetime string

{
    "meta": {
        "last_updated_at": "2022-01-01T23:59:59Z"
    }
}

data   Response Properties

Available in all plans
  • Name
    three letter currency code
    Type
    string
    Description

    a list of supported currencies can be found here: /currencies

  • Name
    three letter currency code.code
    Type
    string
    Description

    the currency code

  • Name
    three letter currency code.value
    Type
    float
    Description

    the current convertion rate

{
    "data": {
        "AED": {
            "code": "AED",
            "value": 3.67306
        }
    }
}