Transaction broadcast failed, or Unspents were already used
See original GitHub issueHi. I can’t send my funds to another address because constantly getting an follow errors
>>> tx = m.send([('...', 0.131, 'btc')])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/.pyenv/btc_wallet/lib/python3.6/site-packages/bit/wallet.py", line 566, in send
NetworkAPI.broadcast_tx_testnet(tx_hex)
File "/home/.pyenv/btc_wallet/lib/python3.6/site-packages/bit/network/services.py", line 442, in broadcast_tx_testnet
raise ConnectionError('Transaction broadcast failed, or '
ConnectionError: Transaction broadcast failed, or Unspents were already used.
>>> m.get_balance('usd')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/.pyenv/btc_wallet/lib/python3.6/site-packages/bit/wallet.py", line 460, in get_balance
self.get_unspents()
File "/home/.pyenv/btc_wallet/lib/python3.6/site-packages/bit/wallet.py", line 468, in get_unspents
self.unspents[:] = NetworkAPI.get_unspent_testnet(self.address)
File "/home/.pyenv/btc_wallet/lib/python3.6/site-packages/bit/network/services.py", line 395, in get_unspent_testnet
raise ConnectionError('All APIs are unreachable.')
ConnectionError: All APIs are unreachable.
What I can do for solve these errors?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Python Bit: ConnectionError: Transaction broadcast failed, or ...
ConnectionError : Transaction broadcast failed, or Unspents were already used. I tried to wait (until some additional confirmations, ...
Read more >Python broadcast tx - ProgramCreek.com
IGNORED_ERRORS: pass if success is False: raise ConnectionError('Transaction broadcast failed, or ' 'Unspents were already used.
Read more >I get a Broadcast Error when trying to send or exchange.
This is the Broadcast Error message that is displayed on Android. ... resulting to a transaction that uses an output that's already spent....
Read more >My "send" transaction is stuck in Ledger Live
This error happens because the Ledger account you're trying to spend from contains too many coin fragments (also called Unspent Transaction ...
Read more >Error message still returned after transaction was indeed ...
I use bitcoinj to create the following method to broadcast a raw transacion in testnet, and I did see on bitcoin explorer that...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Just to be really sure, you are on mainnet? Because the error message shows it as if you try to send the transaction using testnet.
I think that currently all testnet APIs are offline. I have an open PR (#86) that should fix it.
In the meantime if you have the possibility to run your own node you can connect to it with bit (https://github.com/ofek/bit/blob/7d933640f43c697cd0ccfa413262e278401eaa87/bit/network/services.py#L439).