python code about bitcoin