Skip to main content
https://travis-ci.org/MicroPyramid/forex-python.svg?branch=master https://coveralls.io/repos/github/MicroPyramid/forex-python/badge.svg?branch=master Code Health https://img.shields.io/badge/python-2.7%2C%203.3%2C%203.4%2C%203.5-blue.svg

Forex Python is a Free Foreign exchange rates and currency conversion.

Features:

  • List all currency rates.

  • BitCoin price for all curuncies.

  • Converting amount to BitCoins.

  • Get historical rates for any day since 1999.

  • Conversion rate for one currency(ex; USD to INR).

  • Convert amount from one currency to other.(‘USD 10$’ to INR).

  • Currency symbols.

  • Currency names.

Currency Source:

Fixer.io is a free API for current and historical foreign exchange rates published by European Central Bank. The rates are updated daily 3PM CET.

BitCoin Price Source:

Bitcoin prices calculated every minute. For more infomation visit [CoinDesk API](http://www.coindesk.com/api/).

Installation

  • Install using python package

    pip install forex-python
    
            Or directly cloning the repo:
    
    python setup.py install

Usage Examples:

  • Initialize class

    python
    >>> from forex_python.converter import CurrencyRates
    >>> c = CurrencyRates()
  • list all latest currency rates for “USD”

    python
    >>> c.get_rates('USD')
    {u'IDR': 13625.0, u'BGN': 1.7433, u'ILS': 3.8794, u'GBP': 0.68641, u'DKK': 6.6289, u'CAD': 1.3106, u'JPY': 110.36, u'HUF': 282.36, u'RON': 4.0162, u'MYR': 4.081, u'SEK': 8.3419, u'SGD': 1.3815, u'HKD': 7.7673, u'AUD': 1.3833, u'CHF': 0.99144, u'KRW': 1187.3, u'CNY': 6.5475, u'TRY': 2.9839, u'HRK': 6.6731, u'NZD': 1.4777, u'THB': 35.73, u'EUR': 0.89135, u'NOK': 8.3212, u'RUB': 66.774, u'INR': 67.473, u'MXN': 18.41, u'CZK': 24.089, u'BRL': 3.5473, u'PLN': 3.94, u'PHP': 46.775, u'ZAR': 15.747}
  • Get conversion rate from USD to INR

    python
    >>> c.get_rate('USD', 'INR')
    67.473
  • Convert amount from USD to INR

    python
    >>> c.convert('USD', 'INR', 10)
    674.73
  • Get latest Bitcoin price.

    python
    >>> from forex_python.bitcoin import BtcConverter
    >>> b = BtcConverter()
    >>> b.get_latest_price('USD')
    533.913
  • Convert Amount to Bitcoins based on latest exchange price.

    python
    >>> b.convert_to_btc(400, 'USD')
    0.7492699301118473
  • Get currency symbol using currency code

    python
    >>> from forex_python.converter import CurrencyCodes
    >>> c = CurrencyCodes()
    >>> print c.get_symbol('GBP')
    £

You can view the complete Documentation Here

We welcome your feedback and support, raise github ticket if you want to report a bug. Need new features? Contact us here

Download files

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

Source Distribution

forex-python-0.3.1.tar.gz (7.2 kB view details)

Uploaded Source

File details

Details for the file forex-python-0.3.1.tar.gz.

File metadata

  • Download URL: forex-python-0.3.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for forex-python-0.3.1.tar.gz
Algorithm Hash digest
SHA256 a315d8ac6f7c5bf2d5f336cc2cc7980cfdd23dfb31020f36334545b420a2ae67
MD5 b8c4088f6c457ddb258648cdb7dae423
BLAKE2b-256 f021900af50622bf7ca111192fc5f08eff27df7078fa0c39295ed38475966b5d

See more details on using hashes here.

Release history Release notifications | RSS feed

1.9.2

2 files

1.9.1

2 files

1.9

2 files

1.8

2 files

1.7

2 files

1.6

3 files

1.5

1 file

1.4

1 file

1.3

2 files

1.2

2 files

1.1

2 files

1.0.0

2 files

0.3.3

2 files

0.3.2

1 file

This release

0.3.1 This release

1 file

0.3.0

1 file

0.2.3

1 file

0.2.2

1 file

0.2.1

1 file

0.2

1 file

0.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page