Open threepoint2 opened 3 years ago
Comment out the currentPerc command and it works so not sure why it does not like percentChange on ccxt.
There is an easy solution: Create: def get_percent_change(): url = "https://data.gateapi.io/api2/1/ticker/safemoon_usdt" return (float)(requests.get(url).json()["percentChange"])
Then change: currentPerc = (float)(ticker['info']['percentChange']) to currentPerc = get_percent_change()
100% working, thank you
Traceback (most recent call last): File "main.py", line 110, in
update_data()
File "main.py", line 108, in update_data
currentPerc = (float)(ticker['info']['percentChange'])
KeyError: 'percentChange'