1

I am new to Bitcoin, can anyone tell me how I can access to my RPC console and type in commands. I am using Bitcoin Core on my PC. If there is a tutorial for beginners to access to RPC please notify me.

2

Here is a Step-by-Step tutorial

  • Set up bitcoin.conf.

    rpcuser=user <br>
    rpcpassword=password <br>
    rpcallowip=172.28.128.1 # The ip of your machine. Use 127.0.0.1 if you use local machine<br>
    

  • Start a bitcoin client by

    bitcoind -server=1 -daemon
    

  • Download this library and install it by running

    python setup.py install 
    

  • Create a python script to connect to RPC server.

    from jsonrpc import ServiceProxy
    access = ServiceProxy("http://user:password@172.28.128.4:8332")
    print(access.getbalance())
    

    • Re: rpcallowip=172.28.128.1 # The ip of your machine. Use 127.0.0.1 if you use local machine; is the local host allowed by default? Also, could you provide clarification on whether using both rpcallowip lines - ie 172.28.128.1 & 127.0.0.1, respectively, is problematic in the above conf file eg? I.e. Is there any harm adding local machine in addition to the machine IP? – Wizard Of Ozzie Apr 3 '15 at 10:32
    • Yes, local host is allowed by default.. – moshaholo Apr 6 '15 at 13:32
    1
    1. RPC @ Bitcoin Wiki
    2. *Mastering Bitcoin" (A. Antonopoulos)
    3. Open console >, type help

    You'll need a Bitcoin.conf file setup, which lives in your home directory (what OS?)

    Full instruction guide

    1

    If you are using Bitcoin-QT then simply go to Help->Debug Window->Console. This gives you full RPC capability inside of the wallet. If you want to work with the data you output, then you will need to use an RPC wrapper of your choice.

    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.