USD/CNY price in the past 7 days: 2019-03-19

in #python5 years ago

China is now the second largest economy in the word.

Due to the recenty trade war with US. Chinese economy is expect to have hard landing, and CNY has greate devalue poential.

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

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

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

Coin Marketplace

STEEM 0.36
TRX 0.12
JST 0.039
BTC 70223.87
ETH 3561.28
USDT 1.00
SBD 4.73