All Projects → 1Forge → python-forex-quotes

1Forge / python-forex-quotes

Licence: MIT license
Library to fetch and parse realtime Forex quotes and convert currencies

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to python-forex-quotes

Php Forex Quotes
PHP Library for fetching realtime forex quotes.
Stars: ✭ 61 (+144%)
Mutual labels:  quotes, currency, forex, currency-converter
javascript-forex-quotes
JavaScript Library for fetching realtime forex quotes.
Stars: ✭ 38 (+52%)
Mutual labels:  quotes, currency, forex, currency-converter
currency-api
Free Currency Exchange Rates API with 150+ Currencies & No Rate Limits
Stars: ✭ 507 (+1928%)
Mutual labels:  currency, forex, currency-converter
historical-bank-ruby
A Ruby Bank that serves historical exchange rates
Stars: ✭ 14 (-44%)
Mutual labels:  currency, currency-converter
Forex Python
Foreign exchange rates, Bitcoin price index and currency conversion using ratesapi.io
Stars: ✭ 378 (+1412%)
Mutual labels:  currency, currency-converter
Gocurrency
Simple currency converter. Insert an amount, what currency to convert from and what currency to convert to.
Stars: ✭ 26 (+4%)
Mutual labels:  currency, currency-converter
react-local-currency
💵 💴Shows the price of your services in the customer's currency 💶 💷
Stars: ✭ 21 (-16%)
Mutual labels:  currency, currency-converter
Android Money
Simple money and currency converter library for android.
Stars: ✭ 66 (+164%)
Mutual labels:  currency, currency-converter
Laravel Cconverter
A simple currency converter plugin for Laravel 5. Currency providers: The European Central Bank, OpenExchange, CurrencyLayer and fixer.io
Stars: ✭ 39 (+56%)
Mutual labels:  currency, currency-converter
Dinero
📈 💰 A golang interface for the Open Exchange Rates API
Stars: ✭ 68 (+172%)
Mutual labels:  currency, forex
salaryconverter
Equivalent salary converter using PPP
Stars: ✭ 42 (+68%)
Mutual labels:  currency, currency-converter
Coinc
💰💱Alfred Workflow for currencies conversion
Stars: ✭ 38 (+52%)
Mutual labels:  currency, currency-converter
Money
PHP implementation of Fowler's Money pattern.
Stars: ✭ 3,868 (+15372%)
Mutual labels:  currency, currency-converter
Laravel Swap
💵 Currency exchange rates for Laravel and Lumen
Stars: ✭ 296 (+1084%)
Mutual labels:  currency, currency-converter
Money
A money and currency library for PHP
Stars: ✭ 855 (+3320%)
Mutual labels:  currency, currency-converter
Laravel Money
Currency formatting and conversion package for Laravel
Stars: ✭ 261 (+944%)
Mutual labels:  currency, currency-converter
Coinonline
A Cryptocurrency/Blockchain wallet app based on React Native
Stars: ✭ 59 (+136%)
Mutual labels:  currency, currency-converter
currency-converter
💰 Easily convert between 32 currencies
Stars: ✭ 16 (-36%)
Mutual labels:  currency, currency-converter
Swap
💱 Currency exchange rates library
Stars: ✭ 1,195 (+4680%)
Mutual labels:  currency, currency-converter
GoCurrency
Simple currency converter. Insert an amount, what currency to convert from and what currency to convert to.
Stars: ✭ 29 (+16%)
Mutual labels:  currency, currency-converter

python_forex_quotes

python_forex_quotes is a Python Library for fetching realtime forex quotes

Table of Contents

Requirements

Installation

pip install python_forex_quotes

Usage

Instantiate the client

import python_forex_quotes

#You can get an API key for free at 1forge.com
client = python_forex_quotes.ForexDataClient('YOUR_API_KEY')

Get the list of available symbols:

import python_forex_quotes
client = python_forex_quotes.ForexDataClient('YOUR_API_KEY')

print client.getSymbols()

Get quotes for specified symbols:

import python_forex_quotes
client = python_forex_quotes.ForexDataClient('YOUR_API_KEY')

print client.getQuotes(['EUR/USD', 'GBP/JPY'])

Convert from one currency to another:

import python_forex_quotes
client = python_forex_quotes.ForexDataClient('YOUR_API_KEY')

print client.convert('EUR', 'USD', 100)

Check if the market is open:

import python_forex_quotes
client = python_forex_quotes.ForexDataClient('YOUR_API_KEY')

if client.marketIsOpen() == True:
    print "Market is open!"

Check your usage / quota limit:

import python_forex_quotes
client = python_forex_quotes.ForexDataClient('YOUR_API_KEY')

print client.quota()

Websocket

Subscribe to all the pairs:

import python_forex_quotes

def onUpdate(value):
    print(value)

def onMessage(value):
    print(value)

def onConnect():
    client.subscribeToAll()

client = python_forex_quotes.ForexDataClient('YOUR_API_KEY')
client.onUpdate(onUpdate)
client.onConnect(onConnect)
client.onMessage(onMessage)
client.connect()

Subscribe to certain the pairs:

def onConnect():
    client.subscribeTo("USD/CHF")
    client.subscribeTo(["EUR/USD", "BTC/USD"])

Unsubscribe from all the pairs:

def onConnect():
    client.unsubscribeFromAll()

Unsubscribe from certain the pairs:

def onConnect():
    client.unsubscribeFrom("USD/CHF")
    client.unsubscribeFrom(["EUR/USD", "BTC/USD"])

Contributing

Thank you for considering contributing! Any issues, bug fixes, suggestions, improvements or help in any other way is always appreciated. Please feel free to open an issue or create a pull request.

Support and Contact

Please contact me at [email protected] if you have any questions or requests.

License and Terms

This library is provided without warranty under the MIT license.

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].