woob.capabilities.bank.rate

class woob.capabilities.bank.rate.CapCurrencyRate

Bases: woob.capabilities.base.Capability

Capability of bank websites to get currency exchange rates.

get_rate(currency_from, currency_to)

Get exchange rate.

Parameters
  • currency_from (Currency) – currency to which exchange rate is relative to

  • currency_to (:class`Currency`) – currency is converted to

Return type

Rate

iter_currencies()

Iter available currencies.

Return type

iter[Currency]

class woob.capabilities.bank.rate.Rate(id='', url=NotLoaded, backend=None)

Bases: woob.capabilities.base.BaseObject, woob.capabilities.base.Currency

Currency exchange rate.

Variables
  • currency_from – (str) The currency to which exchange rates are relative to. When converting 1 EUR to X HUF, currency_fom is EUR.) (default: None)

  • currency_to – (str) The currency is converted to. When converting 1 EUR to X HUF, currency_to is HUF.) (default: None)

  • value – (Decimal) Exchange rate

  • datetime – (date, datetime) Collection date and time