UPD 25 November 2018
Fixes caused by Coinmarketcap API changes.
The completely new and reliable mechanism of getting the median price from six sources.
1. The "ticker" function firstly retrieve data from: binance, okex and cryptocompare.
2. If none of them returns data, the script tries to get data from: kucoin, bittrex and coinmarketcap (new api version)
3. If none of them returns data - the ticker function will return 0