Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bitmex is not defined #3

Open
KregH opened this issue Aug 15, 2018 · 2 comments
Open

bitmex is not defined #3

KregH opened this issue Aug 15, 2018 · 2 comments

Comments

@KregH
Copy link

KregH commented Aug 15, 2018

Hello, thank you for developing this. I am trying to run the notebook file but when ever I run it I get:


NameError Traceback (most recent call last)
in ()
----> 1 client = bitmex.bitmex(
2 test=True,
3 api_key="",
4 api_secret=""
5 )

NameError: name 'bitmex' is not defined

I am new to python and I got no idea of how to fix this any help?

@IlyaKrotov
Copy link
Owner

You have to install the following libs:

  1. talib (https://github.com/mrjbq7/ta-lib)
  2. bitmex (https://github.com/BitMEX/api-connectors/tree/master/official-http/python-swaggerpy)
    And finally, your python must be at least 3.6 version for using f-strings (ex: f"Last prediction: {prediction}")

Then you can successfully run the code.

@tanzeelrana
Copy link

tanzeel@tanzeel-System-Product-Name:~/BitMEX-simple-trading-robot$ python main_loop.py 
Traceback (most recent call last):
  File "main_loop.py", line 1, in <module>
    import bitmex
  File "/home/tanzeel/.local/lib/python2.7/site-packages/bitmex.py", line 5, in <module>
    from BitMEXAPIKeyAuthenticator import APIKeyAuthenticator
  File "/home/tanzeel/.local/lib/python2.7/site-packages/BitMEXAPIKeyAuthenticator.py", line 1, in <module>
    import urllib.parse
ImportError: No module named parse
tanzeel@tanzeel-System-Product-Name:~/BitMEX-simple-trading-robot$ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants