Skip to main content

Xecd Rates Python: Free currency rates converter

Project description

image


Xecd Rates Python: Free currency rates converter

made-with-python PyPI Latest Release PyPI license PyPI format PyPI pyversions GitHub license

What is it?

This project is free version of XE Currency Data (XECD) product.

Xecd-Rates-Python librariy gives you access to daily or live rates and historic mid-market conversion rates between all of our supported currencies.

You can access the paid version of this project via this link.

Where to get it

The preferred way to install this package is pip.

pip install xecd-rates

Or get the latest version from git:

pip install git+https://github.com/doguskidik/xecd-rates-python.git

Dependencies

Usage

from xecd_rates import Xecd

xecd = Xecd()

xecd.convert_from(cfrom='TRY', cto=['EUR','USD'])
{'timestamp': '2020-06-27 07:52 UTC', 'from': 'TRY', 'to': [{'quotecurrency': 'USD', 'mid': '0.1458842035'}, {'quotecurrency': 'EUR', 'mid': '0.1300239433'}]}

xecd.historic_rate(cdate='2020-01-01', cfrom='TRY', cto=['EUR','USD'])
{'timestamp': '2020-01-01 17:00 UTC', 'from': 'TRY', 'to': [{'quotecurrency': 'USD', 'mid': '0.1681044260'}, {'quotecurrency': 'EUR', 'mid': '0.1501472598'}]}

xecd.historic_rate_period(sdate='2020-01-01', edate='2020-01-05', cfrom='TRY', cto=['EUR','USD'])
{'from': 'TRY', 'to': {'USD': [{'mid': '0.1678214515', 'timestamp': '2020-01-02 17:00 UTC'}, {'mid': '0.1673405691', 'timestamp': '2020-01-03 17:00 UTC'}, {'mid': '0.1673821113', 'timestamp': '2020-01-04 17:00 UTC'}, {'mid': '0.1673821113', 'timestamp': '2020-01-04 17:00 UTC'}, {'mid': '0.1674115622', 'timestamp': '2020-01-05 17:00 UTC'}], 'EUR': [{'mid': '0.1502682495', 'timestamp': '2020-01-02 17:00 UTC'}, {'mid': '0.1497847442', 'timestamp': '2020-01-03 17:00 UTC'}, {'mid': '0.1499997714', 'timestamp': '2020-01-04 17:00 UTC'}, {'mid': '0.1499997714', 'timestamp': '2020-01-04 17:00 UTC'}, {'mid': '0.1499838691', 'timestamp': '2020-01-05 17:00 UTC'}]}}

Contributing

xecd_rates_python is an open-source project. Submit a pull request to contribute!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xecd_rates-1.0.1.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

xecd_rates-1.0.1-py2.py3-none-any.whl (6.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page