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

Errors to "fetch_balance" on bitflyer and quadrigacx #394

Closed
hogehogemon opened this issue Oct 25, 2017 · 4 comments
Closed

Errors to "fetch_balance" on bitflyer and quadrigacx #394

hogehogemon opened this issue Oct 25, 2017 · 4 comments
Assignees

Comments

@hogehogemon
Copy link

hogehogemon commented Oct 25, 2017

By ccxt-1.9.255, fetching balance from nine exchanges but bitflyer and quadrigacx returned error.
bitflyer

  File "C:\Users\xx\AppData\Local\Continuum\anaconda3\lib\site-packages\ccxt\exchanges.py", line 3480, in fetch_balance
    response = self.privateGetBalance()

  File "C:\Users\xx\AppData\Local\Continuum\anaconda3\lib\site-packages\ccxt\exchange.py", line 245, in request
    return self.fetch2(path, api, method, params, headers, body)

  File "C:\Users\xx\AppData\Local\Continuum\anaconda3\lib\site-packages\ccxt\exchange.py", line 241, in fetch2
    request = self.sign(path, api, method, params, headers, body)

  File "C:\Users\xx\AppData\Local\Continuum\anaconda3\lib\site-packages\ccxt\exchanges.py", line 3611, in sign
    'ACCESS-SIGN': self.hmac(self.encode(auth), self.secret),

  File "C:\Users\xx\AppData\Local\Continuum\anaconda3\lib\site-packages\ccxt\exchange.py", line 604, in hmac
    h = hmac.new(secret, request, algorithm)

  File "C:\Users\xx\AppData\Local\Continuum\anaconda3\lib\hmac.py", line 144, in new
    return HMAC(key, msg, digestmod)

  File "C:\Users\xx\AppData\Local\Continuum\anaconda3\lib\hmac.py", line 42, in __init__
    raise TypeError("key: expected bytes or bytearray, but got %r" % type(key).__name__)

TypeError: key: expected bytes or bytearray, but got 'str'

quadrigacx

  File "C:\Users\xx\AppData\Local\Continuum\anaconda3\lib\site-packages\ccxt\exchanges.py", line 17717, in fetch_balance
    balances = self.privatePostBalance()

  File "C:\Users\xx\AppData\Local\Continuum\anaconda3\lib\site-packages\ccxt\exchanges.py", line 17826, in request
    response = self.fetch2(path, api, method, params, headers, body)

  File "C:\Users\xx\AppData\Local\Continuum\anaconda3\lib\site-packages\ccxt\exchange.py", line 241, in fetch2
    request = self.sign(path, api, method, params, headers, body)

  File "C:\Users\xx\AppData\Local\Continuum\anaconda3\lib\site-packages\ccxt\exchanges.py", line 17810, in sign
    raise AuthenticationError(self.id + ' requires `' + self.id + '.uid` property for authentication')

AuthenticationError: quadrigacx requires `quadrigacx.uid` property for authentication

I would like to know any workaround or fix ;-)
Thank you,

@kroitor
Copy link
Member

kroitor commented Oct 25, 2017

Hi, @hogehogemon !

Can you post your code please? The second error says, that you didn't set the uid property for authenticating with QuadrigaCX.

@kroitor kroitor self-assigned this Oct 25, 2017
@kroitor
Copy link
Member

kroitor commented Oct 25, 2017

@hogehogemon , the bitflyer issue was fixed as of version 1.9.256+. Please update the library and try it again with your code. As for QuadrigaCX - it should work if you supply a uid authentication param along with apiKey and secretin constructor (that is your QuadrigaCX user id), as the error says it.

Let us know if you have any questions left or still have difficulties with it after upgrading and properly setting the auth for QuadrigaCX. Thx!

@hogehogemon
Copy link
Author

Super!!
I confirmed version: 1.9.257 fixed issue of bitflyer, and supplying uid solved my QuadrigaCX problem, too.
Thank you,

@kroitor
Copy link
Member

kroitor commented Oct 25, 2017

@hogehogemon awesome, thx for reporting back!

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

2 participants