6

I was trying to create a python program to convert ETH to BTC. I was using the command :

client.transfer_money("ETH Account ID ", to="BTC Account ID", amount="0.1", currency=:"ETH")

I had obtained the account IDs using the command :

client.get_accounts()

And copy pasted the IDs onto my transfer command. However i get this error :

~/opt/anaconda3/envs/Coinbase/lib/python3.8/site-packages/coinbase/wallet/client.py in transfer_money(self, account_id, **params)
    338     params['type'] = 'transfer'
    339     response = self._post('v2', 'accounts', account_id, 'transactions', data=params)
--> 340     return self._make_api_object(response, Transaction)
    341 
    342   def request_money(self, account_id, **params):

~/opt/anaconda3/envs/Coinbase/lib/python3.8/site-packages/coinbase/wallet/client.py in _make_api_object(self, response, model_type)
    143     # All valid responses have a "data" key.
    144     if data is None:
--> 145       raise build_api_error(response, blob)
    146     # Warn the user about each warning that was returned.
    147     warnings_data = blob.get('warnings', None)

APIError: APIError(id=): 

Would someone be able to isolate what this error is ?

Vignesh Gopakumar
  • 143
  • 1
  • 3
  • 7

1 Answers1

0

The official library is deprecated.

There were three errors introduced recently (which werenot handled since it's deprecated), I have handled those error in this fork library and published in pypi. You can try using that, if issues still persists, submit an issue on GitHub repo

  • Tried the same with your forked library and got the same error. client.transfer_money( btc_id, to=eth_id, amount=btc_amount.amount, currency="BTC") – Vignesh Gopakumar Dec 04 '20 at 17:50
  • Submit an issue at repo, with all info., like what's your exact input and also the full traceback – Gauthamram Ravichandran Dec 07 '20 at 03:24
  • @GauthamramRavichandran I'm having the same error as the OP, but there is no Issues tab in your forked repo for us to submit an issue. I've attempted to run the same code as the OP but using my own account IDs (still sourced from `client.get_accounts()`) – Bilbottom Apr 05 '21 at 14:31
  • Sorry for that. Have enabled the Issues, please submit an issue with all the relevant artifacts I asked – Gauthamram Ravichandran Apr 07 '21 at 14:22