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

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)

Sort:  

Congratulations @python-dev! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 500 upvotes. Your next target is to reach 600 upvotes.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Do not miss the last post from @steemitboard:

Are you a DrugWars early adopter? Benvenuto in famiglia!
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.24
TRX 0.11
JST 0.031
BTC 61388.48
ETH 2984.48
USDT 1.00
SBD 3.65