I have got the api working and i can run commands like

access = AuthServiceProxy("http://root:123@")

However not sure how to use more complicated commands such as: move "fromaccount" "toaccount" amount ( minconf "comment" )

Tried something like this, but i get a syntax error in python.

name = "bob"
name2 = "sam"
balance = 0.0001
access.move(name name2 balance)

Doing it like this i get JSONRPCException:

name = "bob"
name2 = "sam"
balance = 0.0001
access.move('%s' '%s' '%s'), (name, name2, balance)

Any help appreciated.

  • Do bob and sam represent accounts in your bitcoin-core wallet? Apr 20 '15 at 12:36
  • yes, those accounts exist. Apr 20 '15 at 12:46
  • try this one: acess.move(name, name2, balance), Sam and Bob should be bitcoin address.
    – moshaholo
    Apr 20 '15 at 14:25

Try this:

access.move(name, name2, balance)

Steps to transfer bitcoin from Sam to Bob:

  • Create a python script to connect to Sam's RPC server. Suppose Sam's IP is

    from jsonrpc import ServiceProxy
    access = ServiceProxy("http://user:password@")
    print(access.sendtoaddress(Bob's_Bitcoin_Address, Transfer_Balance))

  • 1
    • I have an environmental variable called BTCRPCURL which allows ServiceProxy(os.environ.get("BTCRCURL")) Apr 21 '15 at 2:42

    Your Answer

    By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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