Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: knightmb on August 02, 2010, 04:12:49 PM



Title: bitcoind command help (extended descriptions)
Post by: knightmb on August 02, 2010, 04:12:49 PM
Since I didn't find a forum post or wiki on this (I probably should add to the wiki), I've compiled a static help file, figured it would be useful for everyone here doing a lot of work with bitcoind. Some are obvious, but other's didn't have a full description.

  • getaddressesbylabel <label>
    Returns the list of addresses with the given label.

  • getbalance
    Returns the server's available balance.

  • getblockcount
    Returns the number of blocks in the longest block chain

  • getblocknumber
    Returns the block number of the latest block in the longest block chain.

  • getconnectioncount
    Returns the number of connections to other nodes

  • getdifficulty
    Returns the proof-of-work difficulty as a multiple of the minimum difficulty.

  • getgenerate
    Returns if the server is generating coins. Returns true or false.

  • getinfo
    Returns the server balance, blocks, connections, proxy, generate, genproclimit, & difficulty

  • getlabel <bitcoinaddress>
    Returns the label associated with the given address.

  • getnewaddress [label]
    Returns a new bitcoin address for receiving payments.
    If [label] is specified (recommended), it is added to the address book so payments received with the address will be labeled.

  • getreceivedbyaddress <bitcoinaddress> [minconf=1]
    Returns the total amount received by <bitcoinaddress> in transactions with at least [minconf] confirmations.

  • getreceivedbylabel <label> [minconf=1]
    Returns the total amount received by addresses with <label> in transactions with at least [minconf] confirmations.

  • help
    Returns list of available commands.

  • listreceivedbyaddress [minconf=1] [includeempty=false]
    [minconf] is the minimum number of confirmations before payments are included.
    [includeempty] whether to include addresses that haven't received any payments.
    Returns an array of objects containing:
    "address" : receiving address
    "label" : the label of the receiving address
    "amount" : total amount received by the address
    "confirmations" : number of confirmations of the most recent transaction included

  • listreceivedbylabel [minconf=1] [includeempty=false]
    [minconf] is the minimum number of confirmations before payments are included.
    [includeempty] whether to include labels that haven't received any payments.
    Returns an array of objects containing:
    "label" : the label of the receiving addresses
    "amount" : total amount received by addresses with this label
    "confirmations" : number of confirmations of the most recent transaction included

  • sendtoaddress <bitcoinaddress> <amount> [comment] [comment-to]
    <amount> is a real and is rounded to the nearest 0.01

  • setgenerate <generate> [genproclimit]
    <generate> is true or false to turn generation on or off.
    Generation is limited to [genproclimit] processors, -1 is unlimited.

  • setlabel <bitcoinaddress> <label>
    Sets the label associated with the given address.

  • stop
    Kills the bitcoind process


Title: Re: bitcoind command help (extended descriptions)
Post by: aceat64 on August 02, 2010, 04:53:49 PM
Jgarzik has a patch that displays the existing extended-help descriptions: http://bitcointalk.org/index.php?topic=637.0 (http://bitcointalk.org/index.php?topic=637.0)

Pastebin.ca is down so the actual patch is on his website: http://gtf.org/garzik/bitcoin/patch.bitcoin-help-extended (http://gtf.org/garzik/bitcoin/patch.bitcoin-help-extended)


Title: Re: bitcoind command help (extended descriptions)
Post by: grondilu on December 02, 2010, 12:29:11 AM
What exactly are [comment] and |comment-to]  ??  I thought it was not possible to attach a comment to a transaction.

And what are the size limits ?


Title: Re: bitcoind command help (extended descriptions)
Post by: Gavin Andresen on December 02, 2010, 02:44:31 AM
The JSON-API wiki page describes all the methods:  http://www.bitcoin.org/wiki/doku.php?id=api

The wiki needs a good re-organization; anybody want to volunteer to revamp the Start page?

RE: comment and comment-to :  they're stored in your wallet along with the transaction, but not sent over the network.  The new gettransaction and listtransactions methods will return them (as "message" and "to").


Title: Re: bitcoind command help (extended descriptions)
Post by: Cryptoman on December 07, 2010, 07:01:57 PM
How does one list the accounts and addresses known to bitcoind?  How does the GUI generate the account list?  I can only see how to return information about a specific account or address.


Title: Re: bitcoind command help (extended descriptions)
Post by: FairUser on January 18, 2011, 09:52:55 AM
How does one list the accounts and addresses known to bitcoind?  How does the GUI generate the account list?  I can only see how to return information about a specific account or address.

BUMP

Anyone got an answer?


Title: Re: bitcoind command help (extended descriptions)
Post by: theymos on January 18, 2011, 12:03:33 PM
Anyone got an answer?

listreceivedbyaddress 0 true


Title: Re: bitcoind command help (extended descriptions)
Post by: SeW900 on June 24, 2011, 02:22:05 AM
I get "false" for the getgenerate command. I have both the server and GPU miner working, does this mean that something is wrong? The server has the complete block chain and 8 total connections.


Title: Re: bitcoind command help (extended descriptions)
Post by: kjj on June 24, 2011, 02:29:40 AM
I get "false" for the getgenerate command. I have both the server and GPU miner working, does this mean that something is wrong? The server has the complete block chain and 8 total connections.

Use the setgenerate true command to enable mining, if for some reason you really want to (but you probably don't).  You can also add an optional third parameter for the number of CPUs to use.

By the way, impressive thread necromancy.  Don't see a lot of that on these forums, most people just post new threads, but you actually used the search function.  Almost warms my heart.