orb.misc.forex module

This module stores useful functions for foreign-exchange math.

orb.misc.forex.forex(sats: float)

Convert the given number of Satoshis to the prefered currency as specified in the user prefs.

>>> usd_price = forex(1_000_000)
>>> '$' in usd_price
True
>>> usd_price = float(usd_price[1:])
>>> usd_price > 100
True