Coinbase python APIError: Failed to send money

0 votes

I am trying to integrate the new Coinbase python library. I want to make send_money work but I keep getting this error

transaction = account.send_money(address, bitcoins)
File "C:\Python27\lib\site-packages\coinbase\model.py", line 360, in send_money
'Failed to send money')
File "C:\Python27\lib\site-packages\coinbase\error.py", line 58, in build_api_error
raise error
APIError: Failed to send money

My python code:

bitcoins = 0.0001
# address = a bitcoin wallet address
client = Client(API_KEY, API_SECRET)
account = client.get_account()
transaction = account.send_money(address, str(bitcoins))

I can check my balance, so account is working. Also, all the permissions are granted in the API settings in Coinbase website. Can someone suggest what to do?

Sep 5, 2018 in Blockchain by digger
• 26,670 points
104 views

1 answer to this question.

0 votes

You might want to look at the response of the error to see why the call failed. This can happen for various reasons but the error message should tell you more.

https://github.com/coinbase/coinbase-python#error-handling

from coinbase.error import CoinbaseError

try:
    transaction = account.send_money(address, bitcoins)
except CoinbaseError as e:
    print e.response.text
answered Sep 5, 2018 by slayer
• 29,280 points

Related Questions In Blockchain

0 votes
1 answer

Connection failed to Ethereum Ropsten Testnet network.

 It looks like your node isn't syncing ...READ MORE

answered Mar 27, 2018 in Blockchain by Christine
• 15,810 points
473 views
+1 vote
1 answer

Unable to send payment using API. Please help.

Firstly, check your passwords, your API code and your wallet ...READ MORE

answered Apr 3, 2018 in Blockchain by Christine
• 15,810 points
306 views
+1 vote
1 answer
0 votes
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,370 points
220 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,810 points
349 views
0 votes
1 answer
0 votes
1 answer

How to solve "Failed to deserialize creator identity error"?

It seems like the problem is caused ...READ MORE

answered Jul 13, 2018 in Blockchain by slayer
• 29,280 points
548 views
0 votes
1 answer

How to solve "Failed to get identity 'admin'" error?

It seems like this error is caused ...READ MORE

answered Jul 13, 2018 in Blockchain by slayer
• 29,280 points
88 views