--- title: "Gridcoin - RPC Reference" description: "" ---

Gridcoin RPC Reference

Wallet Commands

Command Parameters Description Requires unlocked wallet?
addmultisigaddress <nrequired> <'["key","key"]'> [account] Add a nrequired-to-sign multisignature address to the wallet. Each key is a Gridcoin address or hex-encoded public key. If [account] is specified, assign address to [account]. N
backupprivatekeys <destination> Backup wallet private keys to a file. Y
backupwallet <destination> Safely copies wallet.dat to destination, which can be a directory or a path with filename. Y
burn <amount> [hex string] Burns coins to the network. Y
checkwallet Checks wallet.dat file to ensure it is not missing any coins. N
createrawtransaction [{“txid” : “id”, “vout” : n},....] {“address” : amount, “data” : “hex”, ....} Creates a raw transaction spending given inputs. N
decoderawtransaction <hex string> Produces a human-readable JSON object for a raw transaction. N
decodescript <hex string> Decode a hex-encoded script. N
dumpprivkey <gridcoinaddress> Reveals the private key corresponding to <gridcoinaddress>. Y
dumpwallet <filename> Dumps wallet to a specified filename. Y
encryptwallet <passphrase> Encrypts the wallet with <passphrase>. N
getaccount <gridcoinaddress> Returns the account associated with the given address. N
getaccountaddress <account> Returns the current Gridcoin address for receiving payments to this account. If <account> does not exist, it will be created along with an associated new address that will be returned. N
getaddressbyaccount <account> Returns the list of addresses for the given account. N
getbalance [account] [minconf=1] If [account] is not specified, returns the server's total available balance.
If [account] is specified, returns the balance in the account.
N
getnewaddress [account] Returns a new Gridcoin address for receiving payments. If [account] is specified payments received with the address will be credited to [account]. N
getrawtransaction <txid> [verbose=0] Returns raw transaction representation for given transaction id. N
getreceivedbyaccount <account> [minconf=1] Returns the total amount received by addresses with [account] in transactions with at least [minconf] confirmations. If [account] not provided return will include all transactions to all accounts. N
getreceivedbyaddress <gridcoinaddress> [minconf=1] Returns the amount received by <gridcoinaddress> in transactions with at least [minconf] confirmations. It correctly handles the case where someone has sent to the address in multiple transactions. Keep in mind that addresses are only ever used for receiving transactions. Works only for addresses in the local wallet, external addresses will always show 0. N
gettransaction <txid> Adds signatures to a raw transaction and returns the resulting raw transaction. N
getwalletinfo Returns useful information about current wallet state. N
importprivkey <gridcoinprivkey> [label] [rescan=true] Adds a private key (as returned by dumpprivkey) to your wallet. This may take a while, if a rescan is done looking for existing transactions. Y
importwallet <filename> Imports an existing wallet.dat file. N
keypoolrefill Fills the keypool, requires wallet passphrase to be set. Y
listaccounts [minconf=1] Returns Object that has account names as keys, account balances as values. N
listaddressgroupings Returns all addresses in the wallet and info used for coincontrol. N
listreceivedbyaccount [minconf=1] [includeempty=false] Returns an array of objects containing: account, amount, confirmations N
listreceivedbyaddress [minconf=1] [includeempty=false] Returns an array of objects containing: address, account, amount, confirmations. To get a list of accounts on the system, gridcoind listreceivedbyaddress 0 true. N
listsinceblock [blockhash] [target-confirmations] Get all transactions in blocks since block [blockhash], or all transactions if omitted. N
listtransactions [account] [count=10] [from=0] Returns up to [count] most recent transactions skipping the first [from] transactions for account [account]. If [account] not provided will return recent transaction from all accounts. N
listunspent [minconf=1] [maxconf=9999999] ["address",...] Returns array of unspent transaction inputs in the wallet. N
makekeypair [prefix] Make a public/private key pair. N
move <fromaccount> <toaccount> <amount> [minconf=1] [comment] Move from one account in your wallet to another N
rain {"address":amount, "address":amount} Rain on specific addresses with specific amounts. Y
repairwallet Check wallet.dat for missing coins. If any are found, attempt recovery. N
resendtx Resend any failed or unsent transactions. Y
reservebalance <reserve=bool> <amount> Reserve an amount of coins that do not participate in staking. N
sendfrom <fromaccount> <togridcoinaddress> <amount> [minconf=1] [comment] [comment-to] <amount> is a real and is rounded to 8 decimal places. Will send the given amount to the given address, ensuring the account has a valid balance using [minconf] confirmations. Returns the transaction ID if successful (not in JSON object). Y
sendrawtransaction <hex string> Submits raw transaction (serialized, hex-encoded) to local node and network. N
sendtoaddress <gridcoinaddress> <amount> [comment] [comment-to] <amount> is a real and is rounded to 8 decimal places. Returns the transaction ID <txid> if successful. Y
setaccount <gridcoinaddress> <account> Sets the account associated with the given address. Assigning address that is already assigned to the same account will create a new address associated with that account. N
settxfee <amount> <amount> is a real and is rounded to the nearest 0.00000001 N
signmessage <gridcoinaddress> <message> Sign a message with the private key of an address. Y
signrawtransaction <hex string> [{"txid":txid,"vout":n,"scriptPubKey":hex,"redeemScript":hex},...] [<privatekey1>,...] [sighashtype="ALL"] Adds signatures to a raw transaction and returns the resulting raw transaction. Y
unspentreport Display a report on unspent coins in the wallet. N
validateaddress <gridcoinaddress> Return information about <gridcoinaddress>. N
validatepubkey <gridcoinpubkey> Return information about <gridcoinpubkey>. N
verifymessage <gridcoinaddress> <signature> <message> Verify a signed message. N
walletlock Lock an encrypted wallet. Y
walletpassphrase <passphrase> <timeout> [stakingonly=bool] Encrypt your wallet with a passphrase. N
walletpassphrasechange <oldpassphrase> <newpassphrase> Change an encrypted wallet's passphrase. Y

Mining Commands

Command Parameters Description Requires unlocked wallet?
advertisebeacon Send a beacon to the Neural Network for your CPID to claim POR rewards. Y
beaconreport Displays beacons and associated addresses. N
beaconstatus [cpid] Display beaconstatus on own or specified beacon. N
cpids Display project CPIDs for your BOINC account. N
currentneuralhash Displays current Neural Network contract hash. N
currentneuralreport Displays current Neural Network quorum hashes. N
explainmagnitude [force=bool] Request current information from the Neural Network about your magnitude by project. N
getmininginfo Displays mining-related information. N
lifetime Display lifetime payments for CPID as well as lifetime average magnitude. N
magnitude [cpid] Displays information for the magnitude of all cpids or the one specified. N
neuralhash Displays information about the popular neural hash. N
neuralreport Displays neural report for the network. N
resetcpids Reloads CPIDs from BOINC. N
rsa Displays RSA (Research Savings Account) report for your CPID N
staketime Display estimated time to stake. N
superblockage Display time since last superblock. N
superblocks [cpid] Display data on recent superblocks. Optional: Shows magnitude for a cpid for recent superblocks. N
syncdpor2 Synchronize with the neural network N
upgradedbeaconreport Display upgraded beacon report of the network. N
validcpids Displays information about valid CPIDs (on team Gridcoin, same CPID) collected from BOINC. N

Network Commands

Command Parameters Description Requires unlocked wallet?
addnode <node> <add|remove|onetry> Attempts add or remove <node> from the addnode list or try a connection to <node> once. N
addpoll <title> <days> <question> <answers> <sharetype> <url> Add a poll to the network. Requires 100K GRC balance Y
askforoutstandingblocks Force ask for outstandingblocks from network. N
currenttime Displays UTC Unix time as well as date and time in UTC. N
decryptphrase Decrypts phrase encrypted by encryptphrase. N
encryptphrase Encrypts phrase to be decryptable by decryptphrase. N
getaddednodeinfo <dns> [node] Returns information about the given added node, or all added nodes.
(Note that onetry addnodes are not listed here) If dns is false, only a list of added nodes will be provided, otherwise connected information will also be available.
N
getbestblockhash Returns the hash of the best (tip) block in the longest block chain. N
getblock <hash> [verbose=true] Returns information about the block with the given hash. N
getblockbynumber <hash> Returns information about the block with the given block number. N
getblockchaininfo Displays current state of the blockchain. N
getblockcount Returns the number of blocks in the longest block chain. N
getblockhash <index> Returns hash of block in best-block-chain at <index>; index 0 is the genesis block N
getcheckpoint Show info of synchronized checkpoint. N
getconnectioncount Returns the number of connections to other nodes. N
getdifficulty Returns the current network difficulty. N
getinfo Returns an object containing various state info. N
getnettotals Returns information about network traffic, including bytes in, bytes out, and current time. N
getnetworkinfo Displays network related information. N
getpeerinfo Returns data about each connected node. N
getrawmempool Display all transactions waiting in the mempool. N
listallpolldetails Lists all polls with details. N
listallpolls Lists all polls. N
listpolldetails Lists poll details. N
listpollresults <pollname> [showexpired=bool] Displays results for specified poll. N
listpolls Lists all polls. N
memorypool Displays included and excluded memory pool transactions. N
networktime Displays current network time. N
ping Requests that a ping be sent to all other nodes, to measure ping time. Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds. Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping. N
reindex Re-index the block chain. N
restart Restarts the wallet. N
showblock <blocknumber> Returns all information about the block at <index>. N
stop Stop Gridcoin server. N
vote <title> <answers> Vote on a specific poll with specified answers. Y
votedetails <pollname> Displays vote details of a specified poll. N