woob.capabilities.bank.rate

class Rate(id='', url=NotLoaded, backend=None)[source]

Bases: BaseObject, Currency

Currency exchange rate.

Variables:
  • url – (str) url

  • currency_from – (str) The currency to which exchange rates are relative to

  • currency_to – (str) The currency is converted to

  • value – (Decimal) Exchange rate

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

convert(amount)[source]
class CapCurrencyRate[source]

Bases: Capability

Capability of bank websites to get currency exchange rates.

iter_currencies()[source]

Iter available currencies.

Return type:

iter[Currency]

get_rate(currency_from, currency_to)[source]

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