python-bittrex icon indicating copy to clipboard operation
python-bittrex copied to clipboard

Getting an error trying to initialize the library

Open faridelnasire opened this issue 7 years ago • 2 comments

I'm getting the following error: TypeError: 'module' object is not callable

Not doing anything special yet, just trying to connect to Bittrex like so:

#!/usr/bin/env python
from bittrex import bittrex

api = bittrex(api_key, api_secret)

faridelnasire avatar Oct 10 '17 14:10 faridelnasire

Are you sure you're doing from bittrex import bittrex, not just import bittrex?

ndri avatar Oct 10 '17 14:10 ndri

First of all download bittrex.py and paste it to the project directory. Then you should change signature = hmac.new(self.secret, url, hashlib.sha512).hexdigest() to signature = hmac.new(self.secret.encode('utf-8'), url.encode('utf-8'), hashlib.sha512).hexdigest()

alexsktl avatar Oct 25 '17 18:10 alexsktl