F-Node-Karlsruhe / iota-exrate-manager

Python package that keeps track of iota exchange rates via various APIs and converts prices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Downloads

iota-exrate-manager

Python package that keeps track of iota exchange rates via various APIs and converts prices.

Install

pip install iota-exrate-manager

Usage

from iota_exrate_manager import ExRateManager
import time

# default currency is usd and the default refresh period is 300 seconds
em = ExRateManager()

# give time to fetch
time.sleep(5)

# convert iota to fiat (default first currency in currencies -> usd if not specified)
ipf = em.iota_to_fiat(1_000_000)

# convert fiat to iota
em.fiat_to_iota(ipf))

About

Python package that keeps track of iota exchange rates via various APIs and converts prices

License:MIT License


Languages

Language:Python 100.0%