RPC Commands Reference
Complete reference for all Cloud Service JSON-RPC commands.
Blockchain Commands
getblockchaininfo
Returns information about the blockchain state.
cs-cli getblockchaininfoResponse:
{
"chain": "main",
"blocks": 524288,
"headers": 524288,
"bestblockhash": "0000...",
"difficulty": 12345678.90,
"mediantime": 1234567890,
"verificationprogress": 0.999999,
"pruned": false,
"chainwork": "0000..."
}getblockhash
Returns hash of block at given index.
cs-cli getblockhash 1000getblock
Returns block information given block hash.
cs-cli getblock "blockhash"
cs-cli getblock "blockhash" 2 # Verbosity level 2getbestblockhash
Returns hash of the best block in the longest chain.
cs-cli getbestblockhashgetblockcount
Returns the number of blocks in the longest chain.
cs-cli getblockcountgetdifficulty
Returns the current proof-of-work difficulty.
cs-cli getdifficultygetrawmempool
Returns all transaction ids in memory pool.
cs-cli getrawmempool
cs-cli getrawmempool true # With detailsgetmempoolinfo
Returns information about the memory pool.
cs-cli getmempoolinfoTransaction Commands
getrawtransaction
Returns raw transaction data.
cs-cli getrawtransaction "txid"
cs-cli getrawtransaction "txid" true # Decodeddecoderawtransaction
Returns decoded transaction from raw hex.
cs-cli decoderawtransaction "hexstring"sendrawtransaction
Submits raw transaction to network.
cs-cli sendrawtransaction "hexstring"gettransaction
Returns transaction details.
cs-cli gettransaction "txid"listtransactions
Returns recent transactions.
cs-cli listtransactions
cs-cli listtransactions "*" 10 0 # Account, count, skipWallet Commands
getbalance
Returns wallet balance.
cs-cli getbalance
cs-cli getbalance "*" 6 # Min confirmationsgetnewaddress
Returns new address for receiving.
cs-cli getnewaddress
cs-cli getnewaddress "label" # With labelgetaddressinfo
Returns address information.
cs-cli getaddressinfo "address"sendtoaddress
Sends CS to an address.
cs-cli sendtoaddress "address" amount
cs-cli sendtoaddress "address" 10.5 "comment" "subtractfeefromamount"listreceivedbyaddress
Returns received transactions by address.
cs-cli listreceivedbyaddress
cs-cli listreceivedbyaddress 6 true # Min confirmations, include emptylistunspent
Returns unspent transaction outputs.
cs-cli listunspent
cs-cli listunspent 6 9999999 ["address"] # Min/max confirmations, addressesencryptwallet
Encrypts wallet with passphrase.
cs-cli encryptwallet "passphrase"walletpassphrase
Unlocks encrypted wallet.
cs-cli walletpassphrase "passphrase" timeoutwalletlock
Locks encrypted wallet.
cs-cli walletlockbackupwallet
Backs up wallet to specified path.
cs-cli backupwallet "/path/backup.dat"importprivkey
Imports private key.
cs-cli importprivkey "privkey"
cs-cli importprivkey "privkey" "label" false # Label, rescandumpprivkey
Returns private key for address.
cs-cli dumpprivkey "address"Mining Commands
getmininginfo
Returns mining information.
cs-cli getmininginfogetnetworkhashps
Returns estimated network hash rate.
cs-cli getnetworkhashps
cs-cli getnetworkhashps 120 100 # Blocks, heightgetblocktemplate
Returns block template for mining.
cs-cli getblocktemplate
cs-cli getblocktemplate '{"rules": ["segwit"]}'submitblock
Submits block to network.
cs-cli submitblock "hexdata"setgenerate
Sets mining generation.
cs-cli setgenerate true
cs-cli setgenerate true 4 # Threads
cs-cli setgenerate false # Stopgetgenerate
Returns generation status.
cs-cli getgenerateNetwork Commands
getnetworkinfo
Returns network information.
cs-cli getnetworkinfogetpeerinfo
Returns information about connected peers.
cs-cli getpeerinfoaddnode
Adds or removes a node.
cs-cli addnode "node:port" onetry
cs-cli addnode "node:port" add
cs-cli addnode "node:port" removedisconnectnode
Disconnects from a node.
cs-cli disconnectnode "node:port"
cs-cli disconnectnode "nodeid"getconnectioncount
Returns number of connections.
cs-cli getconnectioncountping
Sends ping to all peers.
cs-cli pingUtility Commands
validateaddress
Validates an address.
cs-cli validateaddress "address"verifymessage
Verifies a signed message.
cs-cli verifymessage "address" "signature" "message"signmessage
Signs a message with private key.
cs-cli signmessage "address" "message"help
Lists all commands or help for specific command.
cs-cli help
cs-cli help "getblockchaininfo"stop
Stops the daemon.
cs-cli stopgetinfo
Returns general information (deprecated, use specific commands).
cs-cli getinfoAdvanced Commands
createrawtransaction
Creates raw transaction.
cs-cli createrawtransaction '[{"txid":"id","vout":0}]' '{"address":amount}'signrawtransactionwithkey
Signs raw transaction with private key.
cs-cli signrawtransactionwithkey "hexstring" '["privkey"]'fundrawtransaction
Adds inputs to raw transaction.
cs-cli fundrawtransaction "hexstring"combinerawtransaction
Combines multiple raw transactions.
cs-cli combinerawtransaction '["hex1","hex2"]'Command Categories Summary
| Category | Commands |
|---|---|
| Blockchain | getblockchaininfo, getblock, getblockhash, getbestblockhash, getblockcount, getdifficulty, getrawmempool, getmempoolinfo |
| Transactions | getrawtransaction, decoderawtransaction, sendrawtransaction, gettransaction, listtransactions |
| Wallet | getbalance, getnewaddress, sendtoaddress, encryptwallet, walletpassphrase, backupwallet, importprivkey |
| Mining | getmininginfo, getnetworkhashps, getblocktemplate, submitblock, setgenerate |
| Network | getnetworkinfo, getpeerinfo, addnode, disconnectnode, getconnectioncount |
| Utility | validateaddress, verifymessage, signmessage, help, stop |
Next Steps
- REST API — REST endpoints
- WebSockets — Real-time notifications
- API Overview — Back to overview