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,740 points
928 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,370 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,790 points
1,718 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,790 points
1,149 views
+1 vote
1 answer
+1 vote
1 answer

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

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,460 points
1,428 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,790 points
1,923 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,451 views
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,370 points
1,700 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,370 points
645 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP