First of all a disclaimer: I am using python and anaconda and jupyter all for the first time, so it might be something basic. I pasted the following code into a new Jupyter note from this url: https://github.com/t0pep0/btc-e.api.python/blob/master/btceapi.py
After filling in my own API and secret API key, I tried to get this running:
getInfo()
But I ran into this error:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-14-c63c8cc1259c> in <module>()
96
97
---> 98 getInfo()
NameError: name 'getInfo' is not defined
I checked the following solutions:
- Defining the function first and then running it, this example works fine in Jupyter. function is not defined error in Python
- Defining the class first and then running the function, this example also works fine in Jupyter. Python NameError: name is not defined
But since the class and function are both defined in the correct order in the script I copied, there must be something else going on.