GPB/USD price in the past 7 days: 2019-05-22

in #python5 years ago

The British Pound against the US Dollar is one of the oldest currency pairings in the world.

Due to the current Brexit turbulence, the trading opportunity around GBP can be great!

This daily post is trying to give updates of GPB/USD rate.

Currency data were collected using a currency python API with the follinde code:

from forex_python.converter import CurrencyRates
def collect_currency_data():
    c = CurrencyRates()
    # price_list = c.get_rates('USD')   # you can directly call get_rates('USD')
    GBP_USD = c.get_rate('GBP', 'USD')
    currency_history_hour= json.load(open('currency_history_hour.json'))
    currency_history_hour.update({str(datetime.utcnow())[:-7]:{
                                      'GBP_USD':GBP_USD
                                      }
                                      })
    with open('currency_history_hour.json', 'w') as fp:
        json.dump(currency_history_hour,fp, indent=4,default=str)

Coin Marketplace

STEEM 0.25
TRX 0.11
JST 0.034
BTC 63549.78
ETH 3107.39
USDT 1.00
SBD 3.88