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.

cryptopia privatePostGetDepositAddress Python 2.7 ccxt 1.9.189

See original GitHub issue

Hey, Igor. I’m going to keep you busy today, okay? In all seriousness, I can’t thank you enough for your work. I’m not sure how to fix this one… I’ve been fiddling around with the exchanges.py to see if I can trace the issue, but I’m getting lost.

This is my code:

cryptopia = ccxt.cryptopia({[you know how it goes]})
address_pair = cryptopia.privatePostGetDepositAddress(params={'Currency' : 'XMR'}).get('Data')
print address_pair
try:
    address_pair = (address_pair['BaseAddress'], address_pair['Address']) 
except:
    address_pair = (address_pair['Address']) 
print address_pair

This is the result:

Traceback (most recent call last):
  File "C:\Users\Kenneth\eclipse-workspace\Chank\CCXTtests.py", line 309, in <module>
    address_pair = cryptopia.privatePostGetDepositAddress(params={'Currency' : 'XMR'}).get('Data')
  File "C:\Python27\lib\site-packages\ccxt\exchanges.py", line 11070, in request
    response = self.fetch2(path, api, method, params, headers, body)
  File "C:\Python27\lib\site-packages\ccxt\exchange.py", line 238, in fetch2
    return self.fetch(request['url'], request['method'], request['headers'], request['body'])
  File "C:\Python27\lib\site-packages\ccxt\exchange.py", line 292, in fetch
    return self.handle_rest_response(decoded_text, url, method, headers, body)
  File "C:\Python27\lib\site-packages\ccxt\exchange.py", line 348, in handle_rest_response
    raise ExchangeError(' '.join([self.id, method, url, response, str(e)]))
ccxt.errors.ExchangeError: <exception str() failed>

I’m at a loss as to the cause. Let me know if you need verbose output.

Thanks so much!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
PhinixPhirecommented, Oct 19, 2017

Okay, I got it… the method did not like the way I was stacking the dictionary keys, I guess. Once I formatted it like this, all is well:

Data = cryptopia.privatePostGetDepositAddress({'Currency' : 'BTC'}).get('Data')
if Data['BaseAddress']:
    print(Data['BaseAddress'], Data['Address'])
else:
    print(Data['Address'], '')

It facilitates both non-paymentid/memo addresses as well as those including the field.

Thanks for your quidance, again.

0reactions
PhinixPhirecommented, Oct 19, 2017

Nice! Cryptopia looks like an awesome exchange. I just discovered it yesterday.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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