Skip to content
Advertisement

Getting error TypeError: ‘>’ not supported between instances of ‘int’ and ‘str’,

I am trying to retrieve the historical hourly data from the cryptocompare API. First function retrieves the latest 2000 data points of hourly data on Bitcoin. However, after defining the times in the get_df function, I am getting an error after running it:

JavaScript
JavaScript
JavaScript

Advertisement

Answer

So if you look at the API response, it shows TimeFrom is epoch timestamp in int format so 1549638000(not '1549638000'). enter image description here

JavaScript

Should work, or you can just pass the vars as int

get_df(1549638000, 1556838000)

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement