question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bleutrade, anxpro and southxchange withdraw() with Python 2.7 ccxt 1.9.175

See original GitHub issue

It looks like the withdraw method for bleutrade is calling an unsupported dictionary key (uuid). Am I understanding correctly that it’s mostly mirroring bittrex with a few exceptions?

When I directly run this code:

result = bleutrade.accountGetWithdraw(bleutrade.extend({
            'currency': 'ETH',
            'quantity': 0.1,
            'address': '0x27b8F8D78742C47979dE46862696F39427f82995',
        },))
print result

I get this result: {u'message': u'Your withdraw has been successfully scheduled.', u'result': [], u'success': u'true'}

It looks like bleutrade doesn’t provide a transaction id? So I think we should change ‘uuid’ to, perhaps, ‘message’? Then we at least get something back when executing a withdrawal and no error.

    def withdraw(self, currency, amount, address, params={}):
        self.load_markets()
        response = self.accountGetWithdraw(self.extend({
            'currency': currency,
            'quantity': amount,
            'address': address,
        }, params))
        return {
            'info': response,
            'id': response['result']['message'],
        }

I would try the pull request stuff… except I’m not certain this is a desired change for everyone. Let me know your thoughts, Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
PhinixPhirecommented, Oct 19, 2017

Here’s what I did, in case it’s helpful to future readers… this way the script at least carries something through to describe what may have happened with the withdrawal when reviewing the ledger (I log trxid to a database for historical reference)

import sys
try:
  trxid = y.withdraw('ETH', amount, wallet).get('id')
except:
  trxid = str(sys.exc_info()[0]) + " occured. Funds may have withdrawn anyway."

The withdrawal does still complete. I’ve done several tests.

1reaction
PhinixPhirecommented, Oct 19, 2017

Cool. I will be happy to work within that paradigm then. I’m sure I can patch a workaround for my local scripts.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exchanges — ccxt 2.4.71 documentation
The ccxt library is a collection of available crypto exchanges or exchange classes. Each class implements the public and private API for a...
Read more >
ccxt - npm
A JavaScript / Python / PHP cryptocurrency trading library with support for 130+ exchanges. Latest version: 2.4.55, last published: 2 days ago.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found