Finance::Quote::CurrencyRates::UniRate(3pm)

NAME
Finance::Quote::CurrencyRates::UniRate - Obtain currency rates from https://unirateapi.com

SYNOPSIS
    use Finance::Quote;

    $q = Finance::Quote->new(currency_rates => {order    => ['UniRate'],
                                                unirate  => {API_KEY => ...}});

    $value = $q->currency('18.99 EUR', 'USD');

DESCRIPTION
This module fetches currency rates from https://unirateapi.com and provides data to Finance::Quote to convert the first argument to the equivalent value in the currency indicated by the second argument.

UniRate covers 1000+ currencies (fiat and crypto) with daily updates and a generous free tier. This module only uses the free /api/rates endpoint.

This module is not the default currency conversion module for a Finance::Quote object.

API_KEY
https://unirateapi.com requires users to register and obtain an API key. The free tier covers the current-rate lookups used by this module.

The API key can be set by setting the environment variable "UNIRATEAPI_API_KEY" or by providing a 'unirate' hash inside the 'currency_rates' hash to Finance::Quote->new as in the synopsis above. An explicit value in the hash overrides the environment variable.

Terms & Conditions
Use of https://unirateapi.com is governed by any terms & conditions of that site.

Finance::Quote is released under the GNU General Public License, version 2, which explicitly carries a "No Warranty" clause.