ericsomdahl / python-bittrex

Python bindings for bittrex
MIT License
585 stars 283 forks source link

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

Open nktzdr opened 6 years ago

nktzdr commented 6 years ago

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

shazrat commented 6 years ago

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

4lfclvr commented 6 years ago

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