Apr-19-2023, 03:26 PM
(Apr-19-2023, 02:22 PM)SuchUmami Wrote: I tried your third option. I ran the code one line at a time and then the whole lot. Each time, nothing happened. The terminal just reset to how it was before. Could it be that where chat gpt is getting it's data from has been revised and no longer relevant?You ran it the wrong way.
Output:> python
Python 3.11.1 (tags/v3.11.1:a7a450f, Dec 6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import krakenex
>>> api = krakenex.API()
>>> data = api.query_public('OHLC', {'pair': 'XBT/USD', 'interval': 1440})
>>> data
{'error': ['EQuery:Unknown asset pair']}
Now you can see that the returned dictionary has 1 key, "error", and the value for that key is the error message