When I run the code below, sending a BTC transaction to the blockchain (using blockcypher api) I get an Assertion Error. I am not sure what an Assertion error means.

enter image description here

The code: enter image description here

Btw the address had only around 5000 satoshi left.... Link to api documentation



  • I'm voting to close this question as off-topic because it is about general programming, not bitcoin Aug 13, 2018 at 21:55
  • 1
    This error means the checksum in your private key is incorrect. Aug 13, 2018 at 22:45

1 Answer 1


This comes from the code where the checksum of your private key is validated, and suggests that the key is not valid. However, the private key shown in your code seems to pass validation on bitaddress.org, so the Python library you're using might have a bug.

(By the way, please don't reveal the private keys to real addresses! It looks like all the coins were moved out of that address (1LLZQ...) a couple hours ago, hopefully by you, but any further coins sent to that address are likely to be stolen immediately.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.