All Projects → MicroPyramid → Forex Python

MicroPyramid / Forex Python

Licence: mit
Foreign exchange rates, Bitcoin price index and currency conversion using ratesapi.io

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Forex Python

javascript-forex-quotes
JavaScript Library for fetching realtime forex quotes.
Stars: ✭ 38 (-89.95%)
Mutual labels:  currency, currency-converter
currency-converter
💰 Easily convert between 32 currencies
Stars: ✭ 16 (-95.77%)
Mutual labels:  currency, currency-converter
php-currency-api
Standardized wrapper for popular currency rate APIs. Currently supports FixerIO, CurrencyLayer, Open Exchange Rates and Exchange Rates API.
Stars: ✭ 17 (-95.5%)
Mutual labels:  currency, currency-converter
salaryconverter
Equivalent salary converter using PPP
Stars: ✭ 42 (-88.89%)
Mutual labels:  currency, currency-converter
Laravel Money
Currency formatting and conversion package for Laravel
Stars: ✭ 261 (-30.95%)
Mutual labels:  currency, currency-converter
Coinc
💰💱Alfred Workflow for currencies conversion
Stars: ✭ 38 (-89.95%)
Mutual labels:  currency, currency-converter
python-forex-quotes
Library to fetch and parse realtime Forex quotes and convert currencies
Stars: ✭ 25 (-93.39%)
Mutual labels:  currency, currency-converter
Swap
💱 Currency exchange rates library
Stars: ✭ 1,195 (+216.14%)
Mutual labels:  currency, currency-converter
Quantbot
数字货币量化交易学习框架
Stars: ✭ 257 (-32.01%)
Mutual labels:  bitcoin, currency
react-local-currency
💵 💴Shows the price of your services in the customer's currency 💶 💷
Stars: ✭ 21 (-94.44%)
Mutual labels:  currency, currency-converter
Bitcore
BitCore (BTX) - Cryptocurrency 220 Byte Datacarriersize
Stars: ✭ 94 (-75.13%)
Mutual labels:  bitcoin, currency
Cashify
💸 Lightweight currency conversion library, successor of money.js
Stars: ✭ 329 (-12.96%)
Mutual labels:  currency, package
Straks
A new decentralised, open source, community driven digital currency, focusing on e-commerce utility
Stars: ✭ 53 (-85.98%)
Mutual labels:  bitcoin, currency
GoCurrency
Simple currency converter. Insert an amount, what currency to convert from and what currency to convert to.
Stars: ✭ 29 (-92.33%)
Mutual labels:  currency, currency-converter
Currencyviewer
Short python framework that dynamically displays and converts the cryptocurrencies in your Kraken wallet into equivalents fiat money.
Stars: ✭ 13 (-96.56%)
Mutual labels:  bitcoin, currency
historical-bank-ruby
A Ruby Bank that serves historical exchange rates
Stars: ✭ 14 (-96.3%)
Mutual labels:  currency, currency-converter
Php Forex Quotes
PHP Library for fetching realtime forex quotes.
Stars: ✭ 61 (-83.86%)
Mutual labels:  currency, currency-converter
Android Money
Simple money and currency converter library for android.
Stars: ✭ 66 (-82.54%)
Mutual labels:  currency, currency-converter
currency-api
Free Currency Exchange Rates API with 150+ Currencies & No Rate Limits
Stars: ✭ 507 (+34.13%)
Mutual labels:  currency, currency-converter
Laravel Swap
💵 Currency exchange rates for Laravel and Lumen
Stars: ✭ 296 (-21.69%)
Mutual labels:  currency, currency-converter

forex-python

.. image:: https://travis-ci.org/MicroPyramid/forex-python.svg?branch=master :target: https://travis-ci.org/MicroPyramid/forex-python :alt: travis-ci

.. image:: https://coveralls.io/repos/github/MicroPyramid/forex-python/badge.svg?branch=master :target: https://coveralls.io/github/MicroPyramid/forex-python?branch=master :alt: coveralls

.. image:: https://landscape.io/github/MicroPyramid/forex-python/master/landscape.svg?style=flat :target: https://landscape.io/github/MicroPyramid/forex-python/master :alt: Code Health

.. image:: https://img.shields.io/badge/python-2.7%2C%203.3%2C%203.4%2C%203.5-blue.svg :target: https://pypi.python.org/pypi/forex-python :alt: pypi

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

Note: Install latest forex-python==1.1 to avoid RatesNotAvailableError

Features:

  • List all currency rates.
  • BitCoin price for all currencies.
  • 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:

https://ratesapi.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 information visit CoinDesk API.

Installation

  • Install using python package

    .. code-block:: python

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

Usage Examples:

  • Initialize class

    .. code-block:: python

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

    .. code-block:: python

      	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

    .. code-block:: python

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

    .. code-block:: python

      	python
      	>>> c.convert('USD', 'INR', 10)
      	674.73
    
  • Force use of Decimal

    .. code-block:: python

      	python
      	>>> from forex_python.converter import CurrencyRates
      	>>> c = CurrencyRates(force_decimal=True)
      	>>> c.convert('USD', 'INR', Decimal('10.45'))
      	705.09
      	>>> c.convert('USD', 'INR', 10)
      	DecimalFloatMismatchError: convert requires amount parameter is of type Decimal when use_decimal=True
    
  • Detect use of Decimal

    .. code-block:: python

      	python
      	>>> from forex_python.converter import CurrencyRates
      	>>> c = CurrencyRates()
      	>>> c.convert('USD', 'INR', Decimal('10.45'))
      	705.09
      	>>> c.convert('USD', 'INR', 10)
      	674.73
    
  • Get latest Bitcoin price.

    .. code-block:: python

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

    .. code-block:: python

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

    .. code-block:: python

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

You can view the complete Documentation Here_

Visit our Python Development page Here_

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

.. _contact us here: https://micropyramid.com/contact-us/ .. _github ticket: https://github.com/MicroPyramid/forex-python/issues .. _Documentation Here: http://forex-python.readthedocs.org/en/latest/?badge=latest .. _Here: https://micropyramid.com/python-development-services/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].