ericsomdahl/python-bittrex

{'success': False, 'message': 'CURRENCY_NOT_PROVIDED', 'result': None}

nktzdr opened this issue · 2 comments

when im trying to withdraw BTC I see this message in logs
what does it mean?

I'm running into the same issue myself. I'll post back if I can figure this out.

Figured out what the problem is. In the withdraw method in bittrex.py your code probably looks like this:

return self._api_query(path_dict={
API_V1_1: '/account/withdraw',
API_V2_0: '/key/balance/withdrawcurrency'
}, options={'currency': currency, 'quantity': quantity, 'address': address, 'paymentid': paymentid}
if paymentid else None, protection=PROTECTION_PRV)

Whats killing it is 'options' becomes 'None' when paymentid doesn't exist. To make it work, I replaced None with {'currency': currency, 'quantity': quantity, 'address': address} to get this:

return self._api_query(path_dict={
API_V1_1: '/account/withdraw',
API_V2_0: '/key/balance/withdrawcurrency'
}, options={'currency': currency, 'quantity': quantity, 'address': address, 'paymentid': paymentid}
if paymentid else {'currency': currency, 'quantity': quantity, 'address': address}, protection=PROTECTION_PRV)

Hope this helps