SHARE
TWEET

Bitcoin Core 0.9.2.1 RPC Calls Extended List

simcity42 Sep 28th, 2014 (edited) 2,962 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. help addmultisigaddress
  2. help addnode
  3. help backupwallet
  4. help createmultisig
  5. help createrawtransaction
  6. help decoderawtransaction
  7. help decodescript
  8. help dumpprivkey
  9. help dumpwallet
  10. help getaccount
  11. help getaccountaddress
  12. help getaddednodeinfo
  13. help getaddressesbyaccount
  14. help getbalance
  15. help getbestblockhash
  16. help getblock
  17. help getblockchaininfo
  18. help getblockcount
  19. help getblockhash
  20. help getblocktemplate
  21. help getconnectioncount
  22. help getdifficulty
  23. help getgenerate
  24. help gethashespersec
  25. help getinfo
  26. help getmininginfo
  27. help getnettotals
  28. help getnetworkhashps
  29. help getnetworkinfo
  30. help getnewaddress
  31. help getpeerinfo
  32. help getrawchangeaddress
  33. help getrawmempool
  34. help getrawtransaction
  35. help getreceivedbyaccount
  36. help getreceivedbyaddress
  37. help gettransaction
  38. help gettxout
  39. help gettxoutsetinfo
  40. help getunconfirmedbalance
  41. help getwalletinfo
  42. help getwork
  43. help help
  44. help importprivkey
  45. help importwallet
  46. help keypoolrefill
  47. help listaccounts
  48. help listaddressgroupings
  49. help listlockunspent
  50. help listreceivedbyaccount
  51. help listreceivedbyaddress
  52. help listsinceblock
  53. help listtransactions
  54. help listunspent
  55. help lockunspent
  56. help move
  57. help ping
  58. help sendfrom
  59. help sendmany
  60. help sendrawtransaction
  61. help sendtoaddress
  62. help setaccount
  63. help setgenerate
  64. help settxfee
  65. help signmessage
  66. help signrawtransaction
  67. help stop
  68. help submitblock
  69. help validateaddress
  70. help verifychain
  71. help verifymessage
  72. help walletlock
  73. help walletpassphrase
  74. help walletpassphrasechange
  75.  
  76.  
  77.  
  78.  
  79. addmultisigaddress nrequired ["key",...] ( "account" )
  80.  
  81. Add a nrequired-to-sign multisignature address to the wallet.
  82. Each key is a Bitcoin address or hex-encoded public key.
  83. If 'account' is specified, assign address to that account.
  84.  
  85. Arguments:
  86. 1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.
  87. 2. "keysobject" (string, required) A json array of bitcoin addresses or hex-encoded public keys
  88. [
  89. "address" (string) bitcoin address or hex-encoded public key
  90. ...,
  91. ]
  92. 3. "account" (string, optional) An account to assign the addresses to.
  93.  
  94. Result:
  95. "bitcoinaddress" (string) A bitcoin address associated with the keys.
  96.  
  97. Examples:
  98.  
  99. Add a multisig address from 2 addresses
  100. > bitcoin-cli addmultisigaddress 2 "[\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\",\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\"]"
  101.  
  102. As json rpc call
  103. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "addmultisigaddress", "params": [2, "[\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\",\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  104.  
  105.  
  106.  
  107. addnode "node" "add|remove|onetry"
  108.  
  109. Attempts add or remove a node from the addnode list.
  110. Or try a connection to a node once.
  111.  
  112. Arguments:
  113. 1. "node" (string, required) The node (see getpeerinfo for nodes)
  114. 2. "command" (string, required) 'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once
  115.  
  116. Examples:
  117. > bitcoin-cli addnode "192.168.0.6:8333" "onetry"
  118. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "addnode", "params": ["192.168.0.6:8333", "onetry"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  119.  
  120.  
  121. backupwallet "destination"
  122.  
  123. Safely copies wallet.dat to destination, which can be a directory or a path with filename.
  124.  
  125. Arguments:
  126. 1. "destination" (string) The destination directory or file
  127.  
  128. Examples:
  129. > bitcoin-cli backupwallet "backup.dat"
  130. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "backupwallet", "params": ["backup.dat"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  131.  
  132.  
  133.  
  134.  
  135. createmultisig nrequired ["key",...]
  136.  
  137. Creates a multi-signature address with n signature of m keys required.
  138. It returns a json object with the address and redeemScript.
  139.  
  140. Arguments:
  141. 1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.
  142. 2. "keys" (string, required) A json array of keys which are bitcoin addresses or hex-encoded public keys
  143. [
  144. "key" (string) bitcoin address or hex-encoded public key
  145. ,...
  146. ]
  147.  
  148. Result:
  149. {
  150. "address":"multisigaddress", (string) The value of the new multisig address.
  151. "redeemScript":"script" (string) The string value of the hex-encoded redemption script.
  152. }
  153.  
  154. Examples:
  155.  
  156. Create a multisig address from 2 addresses
  157. > bitcoin-cli createmultisig 2 "[\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\",\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\"]"
  158.  
  159. As a json rpc call
  160. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createmultisig", "params": [2, "[\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\",\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  161.  
  162.  
  163.  
  164.  
  165. createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,...}
  166.  
  167. Create a transaction spending the given inputs and sending to the given addresses.
  168. Returns hex-encoded raw transaction.
  169. Note that the transaction's inputs are not signed, and
  170. it is not stored in the wallet or transmitted to the network.
  171.  
  172. Arguments:
  173. 1. "transactions" (string, required) A json array of json objects
  174. [
  175. {
  176. "txid":"id", (string, required) The transaction id
  177. "vout":n (numeric, required) The output number
  178. }
  179. ,...
  180. ]
  181. 2. "addresses" (string, required) a json object with addresses as keys and amounts as values
  182. {
  183. "address": x.xxx (numeric, required) The key is the bitcoin address, the value is the btc amount
  184. ,...
  185. }
  186.  
  187. Result:
  188. "transaction" (string) hex string of the transaction
  189.  
  190. Examples
  191. > bitcoin-cli createrawtransaction "[{\"txid\":\"myid\",\"vout\":0}]" "{\"address\":0.01}"
  192. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createrawtransaction", "params": ["[{\"txid\":\"myid\",\"vout\":0}]", "{\"address\":0.01}"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  193.  
  194.  
  195.  
  196.  
  197. decoderawtransaction "hexstring"
  198.  
  199. Return a JSON object representing the serialized, hex-encoded transaction.
  200.  
  201. Arguments:
  202. 1. "hex" (string, required) The transaction hex string
  203.  
  204. Result:
  205. {
  206. "txid" : "id", (string) The transaction id
  207. "version" : n, (numeric) The version
  208. "locktime" : ttt, (numeric) The lock time
  209. "vin" : [ (array of json objects)
  210. {
  211. "txid": "id", (string) The transaction id
  212. "vout": n, (numeric) The output number
  213. "scriptSig": { (json object) The script
  214. "asm": "asm", (string) asm
  215. "hex": "hex" (string) hex
  216. },
  217. "sequence": n (numeric) The script sequence number
  218. }
  219. ,...
  220. ],
  221. "vout" : [ (array of json objects)
  222. {
  223. "value" : x.xxx, (numeric) The value in btc
  224. "n" : n, (numeric) index
  225. "scriptPubKey" : { (json object)
  226. "asm" : "asm", (string) the asm
  227. "hex" : "hex", (string) the hex
  228. "reqSigs" : n, (numeric) The required sigs
  229. "type" : "pubkeyhash", (string) The type, eg 'pubkeyhash'
  230. "addresses" : [ (json array of string)
  231. "12tvKAXCxZjSmdNbao16dKXC8tRWfcF5oc" (string) bitcoin address
  232. ,...
  233. ]
  234. }
  235. }
  236. ,...
  237. ],
  238. }
  239.  
  240. Examples:
  241. > bitcoin-cli decoderawtransaction "hexstring"
  242. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "decoderawtransaction", "params": ["hexstring"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  243.  
  244.  
  245. decodescript "hex"
  246.  
  247. Decode a hex-encoded script.
  248.  
  249. Arguments:
  250. 1. "hex" (string) the hex encoded script
  251.  
  252. Result:
  253. {
  254. "asm":"asm", (string) Script public key
  255. "hex":"hex", (string) hex encoded public key
  256. "type":"type", (string) The output type
  257. "reqSigs": n, (numeric) The required signatures
  258. "addresses": [ (json array of string)
  259. "address" (string) bitcoin address
  260. ,...
  261. ],
  262. "p2sh","address" (string) script address
  263. }
  264.  
  265. Examples:
  266. > bitcoin-cli decodescript "hexstring"
  267. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "decodescript", "params": ["hexstring"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  268.  
  269.  
  270.  
  271.  
  272. dumpprivkey "bitcoinaddress"
  273.  
  274. Reveals the private key corresponding to 'bitcoinaddress'.
  275. Then the importprivkey can be used with this output
  276.  
  277. Arguments:
  278. 1. "bitcoinaddress" (string, required) The bitcoin address for the private key
  279.  
  280. Result:
  281. "key" (string) The private key
  282.  
  283. Examples:
  284. > bitcoin-cli dumpprivkey "myaddress"
  285. > bitcoin-cli importprivkey "mykey"
  286. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "dumpprivkey", "params": ["myaddress"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  287.  
  288.  
  289.  
  290. dumpwallet "filename"
  291.  
  292. Dumps all wallet keys in a human-readable format.
  293.  
  294. Arguments:
  295. 1. "filename" (string, required) The filename
  296.  
  297. Examples:
  298. > bitcoin-cli dumpwallet "test"
  299. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "dumpwallet", "params": ["test"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  300.  
  301.  
  302.  
  303. getaccount "bitcoinaddress"
  304.  
  305. Returns the account associated with the given address.
  306.  
  307. Arguments:
  308. 1. "bitcoinaddress" (string, required) The bitcoin address for account lookup.
  309.  
  310. Result:
  311. "accountname" (string) the account address
  312.  
  313. Examples:
  314. > bitcoin-cli getaccount "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ"
  315. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaccount", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  316.  
  317.  
  318. getaccountaddress "account"
  319.  
  320. Returns the current Bitcoin address for receiving payments to this account.
  321.  
  322. Arguments:
  323. 1. "account" (string, required) The account name for the address. It can also be set to the empty string "" to represent the default account. The account does not need to exist, it will be created and a new address created if there is no account by the given name.
  324.  
  325. Result:
  326. "bitcoinaddress" (string) The account bitcoin address
  327.  
  328. Examples:
  329. > bitcoin-cli getaccountaddress
  330. > bitcoin-cli getaccountaddress ""
  331. > bitcoin-cli getaccountaddress "myaccount"
  332. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaccountaddress", "params": ["myaccount"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  333.  
  334.  
  335. getaddednodeinfo dns ( "node" )
  336.  
  337. Returns information about the given added node, or all added nodes
  338. (note that onetry addnodes are not listed here)
  339. If dns is false, only a list of added nodes will be provided,
  340. otherwise connected information will also be available.
  341.  
  342. Arguments:
  343. 1. dns (boolean, required) If false, only a list of added nodes will be provided, otherwise connected information will also be available.
  344. 2. "node" (string, optional) If provided, return information about this specific node, otherwise all nodes are returned.
  345.  
  346. Result:
  347. [
  348. {
  349. "addednode" : "192.168.0.201", (string) The node ip address
  350. "connected" : true|false, (boolean) If connected
  351. "addresses" : [
  352. {
  353. "address" : "192.168.0.201:8333", (string) The bitcoin server host and port
  354. "connected" : "outbound" (string) connection, inbound or outbound
  355. }
  356. ,...
  357. ]
  358. }
  359. ,...
  360. ]
  361.  
  362. Examples:
  363. > bitcoin-cli getaddednodeinfo true
  364. > bitcoin-cli getaddednodeinfo true "192.168.0.201"
  365. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddednodeinfo", "params": [true, "192.168.0.201"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  366.  
  367.  
  368.  
  369. 20:27:36
  370. help getaddressesbyaccount
  371.  
  372.  
  373. 20:27:36
  374. getaddressesbyaccount "account"
  375.  
  376. Returns the list of addresses for the given account.
  377.  
  378. Arguments:
  379. 1. "account" (string, required) The account name.
  380.  
  381. Result:
  382. [ (json array of string)
  383. "bitcoinaddress" (string) a bitcoin address associated with the given account
  384. ,...
  385. ]
  386.  
  387. Examples:
  388. > bitcoin-cli getaddressesbyaccount "tabby"
  389. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressesbyaccount", "params": ["tabby"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  390.  
  391.  
  392.  
  393. 20:27:40
  394. help getbalance
  395.  
  396.  
  397. 20:27:40
  398. getbalance ( "account" minconf )
  399.  
  400. If account is not specified, returns the server's total available balance.
  401. If account is specified, returns the balance in the account.
  402. Note that the account "" is not the same as leaving the parameter out.
  403. The server total may be different to the balance in the default "" account.
  404.  
  405. Arguments:
  406. 1. "account" (string, optional) The selected account, or "*" for entire wallet. It may be the default account using "".
  407. 2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.
  408.  
  409. Result:
  410. amount (numeric) The total amount in btc received for this account.
  411.  
  412. Examples:
  413.  
  414. The total amount in the server across all accounts
  415. > bitcoin-cli getbalance
  416.  
  417. The total amount in the server across all accounts, with at least 5 confirmations
  418. > bitcoin-cli getbalance "*" 6
  419.  
  420. The total amount in the default account with at least 1 confirmation
  421. > bitcoin-cli getbalance ""
  422.  
  423. The total amount in the account named tabby with at least 6 confirmations
  424. > bitcoin-cli getbalance "tabby" 6
  425.  
  426. As a json rpc call
  427. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbalance", "params": ["tabby", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  428.  
  429.  
  430.  
  431. 20:27:44
  432. help getbestblockhash
  433.  
  434.  
  435. 20:27:44
  436. getbestblockhash
  437.  
  438. Returns the hash of the best (tip) block in the longest block chain.
  439.  
  440. Result
  441. "hex" (string) the block hash hex encoded
  442.  
  443. Examples
  444. > bitcoin-cli getbestblockhash
  445. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbestblockhash", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  446.  
  447.  
  448.  
  449. 20:27:49
  450. help getblock
  451.  
  452.  
  453. 20:27:49
  454. getblock "hash" ( verbose )
  455.  
  456. If verbose is false, returns a string that is serialized, hex-encoded data for block 'hash'.
  457. If verbose is true, returns an Object with information about block <hash>.
  458.  
  459. Arguments:
  460. 1. "hash" (string, required) The block hash
  461. 2. verbose (boolean, optional, default=true) true for a json object, false for the hex encoded data
  462.  
  463. Result (for verbose = true):
  464. {
  465. "hash" : "hash", (string) the block hash (same as provided)
  466. "confirmations" : n, (numeric) The number of confirmations
  467. "size" : n, (numeric) The block size
  468. "height" : n, (numeric) The block height or index
  469. "version" : n, (numeric) The block version
  470. "merkleroot" : "xxxx", (string) The merkle root
  471. "tx" : [ (array of string) The transaction ids
  472. "transactionid" (string) The transaction id
  473. ,...
  474. ],
  475. "time" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)
  476. "nonce" : n, (numeric) The nonce
  477. "bits" : "1d00ffff", (string) The bits
  478. "difficulty" : x.xxx, (numeric) The difficulty
  479. "previousblockhash" : "hash", (string) The hash of the previous block
  480. "nextblockhash" : "hash" (string) The hash of the next block
  481. }
  482.  
  483. Result (for verbose=false):
  484. "data" (string) A string that is serialized, hex-encoded data for block 'hash'.
  485.  
  486. Examples:
  487. > bitcoin-cli getblock "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"
  488. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblock", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  489.  
  490.  
  491.  
  492. 20:27:54
  493. help getblockchaininfo
  494.  
  495.  
  496. 20:27:54
  497. getblockchaininfo
  498. Returns an object containing various state info regarding block chain processing.
  499.  
  500. Result:
  501. {
  502. "chain": "xxxx", (string) current chain (main, testnet3, regtest)
  503. "blocks": xxxxxx, (numeric) the current number of blocks processed in the server
  504. "bestblockhash": "...", (string) the hash of the currently best block
  505. "difficulty": xxxxxx, (numeric) the current difficulty
  506. "verificationprogress": xxxx, (numeric) estimate of verification progress [0..1]
  507. "chainwork": "xxxx" (string) total amount of work in active chain, in hexadecimal
  508. }
  509.  
  510. Examples:
  511. > bitcoin-cli getblockchaininfo
  512. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockchaininfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  513.  
  514.  
  515.  
  516. 20:28:00
  517. help getblockcount
  518.  
  519.  
  520. 20:28:00
  521. getblockcount
  522.  
  523. Returns the number of blocks in the longest block chain.
  524.  
  525. Result:
  526. n (numeric) The current block count
  527.  
  528. Examples:
  529. > bitcoin-cli getblockcount
  530. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockcount", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  531.  
  532.  
  533.  
  534. 20:28:05
  535. help getblockhash
  536.  
  537.  
  538. 20:28:05
  539. getblockhash index
  540.  
  541. Returns hash of block in best-block-chain at index provided.
  542.  
  543. Arguments:
  544. 1. index (numeric, required) The block index
  545.  
  546. Result:
  547. "hash" (string) The block hash
  548.  
  549. Examples:
  550. > bitcoin-cli getblockhash 1000
  551. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockhash", "params": [1000] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  552.  
  553.  
  554.  
  555. 20:28:10
  556. help getblocktemplate
  557.  
  558.  
  559. 20:28:10
  560. getblocktemplate ( "jsonrequestobject" )
  561.  
  562. If the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'.
  563. It returns data needed to construct a block to work on.
  564. See https://en.bitcoin.it/wiki/BIP_0022 for full specification.
  565.  
  566. Arguments:
  567. 1. "jsonrequestobject" (string, optional) A json object in the following spec
  568. {
  569. "mode":"template" (string, optional) This must be set to "template" or omitted
  570. "capabilities":[ (array, optional) A list of strings
  571. "support" (string) client side supported feature, 'longpoll', 'coinbasetxn', 'coinbasevalue', 'proposal', 'serverlist', 'workid'
  572. ,...
  573. ]
  574. }
  575.  
  576.  
  577. Result:
  578. {
  579. "version" : n, (numeric) The block version
  580. "previousblockhash" : "xxxx", (string) The hash of current highest block
  581. "transactions" : [ (array) contents of non-coinbase transactions that should be included in the next block
  582. {
  583. "data" : "xxxx", (string) transaction data encoded in hexadecimal (byte-for-byte)
  584. "hash" : "xxxx", (string) hash/id encoded in little-endian hexadecimal
  585. "depends" : [ (array) array of numbers
  586. n (numeric) transactions before this one (by 1-based index in 'transactions' list) that must be present in the final block if this one is
  587. ,...
  588. ],
  589. "fee": n, (numeric) difference in value between transaction inputs and outputs (in Satoshis); for coinbase transactions, this is a negative Number of the total collected block fees (ie, not including the block subsidy); if key is not present, fee is unknown and clients MUST NOT assume there isn't one
  590. "sigops" : n, (numeric) total number of SigOps, as counted for purposes of block limits; if key is not present, sigop count is unknown and clients MUST NOT assume there aren't any
  591. "required" : true|false (boolean) if provided and true, this transaction must be in the final block
  592. }
  593. ,...
  594. ],
  595. "coinbaseaux" : { (json object) data that should be included in the coinbase's scriptSig content
  596. "flags" : "flags" (string)
  597. },
  598. "coinbasevalue" : n, (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in Satoshis)
  599. "coinbasetxn" : { ... }, (json object) information for coinbase transaction
  600. "target" : "xxxx", (string) The hash target
  601. "mintime" : xxx, (numeric) The minimum timestamp appropriate for next block time in seconds since epoch (Jan 1 1970 GMT)
  602. "mutable" : [ (array of string) list of ways the block template may be changed
  603. "value" (string) A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock'
  604. ,...
  605. ],
  606. "noncerange" : "00000000ffffffff", (string) A range of valid nonces
  607. "sigoplimit" : n, (numeric) limit of sigops in blocks
  608. "sizelimit" : n, (numeric) limit of block size
  609. "curtime" : ttt, (numeric) current timestamp in seconds since epoch (Jan 1 1970 GMT)
  610. "bits" : "xxx", (string) compressed target of next block
  611. "height" : n (numeric) The height of the next block
  612. }
  613.  
  614. Examples:
  615. > bitcoin-cli getblocktemplate
  616. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblocktemplate", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  617.  
  618.  
  619.  
  620. 20:28:13
  621. help getconnectioncount
  622.  
  623.  
  624. 20:28:13
  625. getconnectioncount
  626.  
  627. Returns the number of connections to other nodes.
  628.  
  629. bResult:
  630. n (numeric) The connection count
  631.  
  632. Examples:
  633. > bitcoin-cli getconnectioncount
  634. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getconnectioncount", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  635.  
  636.  
  637.  
  638. 20:28:26
  639. help getdifficulty
  640.  
  641.  
  642. 20:28:26
  643. getdifficulty
  644.  
  645. Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
  646.  
  647. Result:
  648. n.nnn (numeric) the proof-of-work difficulty as a multiple of the minimum difficulty.
  649.  
  650. Examples:
  651. > bitcoin-cli getdifficulty
  652. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getdifficulty", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  653.  
  654.  
  655.  
  656. 20:28:31
  657. help getgenerate
  658.  
  659.  
  660. 20:28:31
  661. getgenerate
  662.  
  663. Return if the server is set to generate coins or not. The default is false.
  664. It is set with the command line argument -gen (or bitcoin.conf setting gen)
  665. It can also be set with the setgenerate call.
  666.  
  667. Result
  668. true|false (boolean) If the server is set to generate coins or not
  669.  
  670. Examples:
  671. > bitcoin-cli getgenerate
  672. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getgenerate", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  673.  
  674.  
  675.  
  676. 20:28:59
  677. help gethashespersec
  678.  
  679.  
  680. 20:28:59
  681. gethashespersec
  682.  
  683. Returns a recent hashes per second performance measurement while generating.
  684. See the getgenerate and setgenerate calls to turn generation on and off.
  685.  
  686. Result:
  687. n (numeric) The recent hashes per second when generation is on (will return 0 if generation is off)
  688.  
  689. Examples:
  690. > bitcoin-cli gethashespersec
  691. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gethashespersec", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  692.  
  693.  
  694.  
  695. 20:29:02
  696. help getinfo
  697.  
  698.  
  699. 20:29:03
  700. getinfo
  701. Returns an object containing various state info.
  702.  
  703. Result:
  704. {
  705. "version": xxxxx, (numeric) the server version
  706. "protocolversion": xxxxx, (numeric) the protocol version
  707. "walletversion": xxxxx, (numeric) the wallet version
  708. "balance": xxxxxxx, (numeric) the total bitcoin balance of the wallet
  709. "blocks": xxxxxx, (numeric) the current number of blocks processed in the server
  710. "timeoffset": xxxxx, (numeric) the time offset
  711. "connections": xxxxx, (numeric) the number of connections
  712. "proxy": "host:port", (string, optional) the proxy used by the server
  713. "difficulty": xxxxxx, (numeric) the current difficulty
  714. "testnet": true|false, (boolean) if the server is using testnet or not
  715. "keypoololdest": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool
  716. "keypoolsize": xxxx, (numeric) how many new keys are pre-generated
  717. "unlocked_until": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked
  718. "paytxfee": x.xxxx, (numeric) the transaction fee set in btc/kb
  719. "relayfee": x.xxxx, (numeric) minimum relay fee for non-free transactions in btc/kb
  720. "errors": "..." (string) any error messages
  721. }
  722.  
  723. Examples:
  724. > bitcoin-cli getinfo
  725. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  726.  
  727.  
  728.  
  729. 20:29:06
  730. help getmininginfo
  731.  
  732.  
  733. 20:29:06
  734. getmininginfo
  735.  
  736. Returns a json object containing mining-related information.
  737. Result:
  738. {
  739. "blocks": nnn, (numeric) The current block
  740. "currentblocksize": nnn, (numeric) The last block size
  741. "currentblocktx": nnn, (numeric) The last block transaction
  742. "difficulty": xxx.xxxxx (numeric) The current difficulty
  743. "errors": "..." (string) Current errors
  744. "generate": true|false (boolean) If the generation is on or off (see getgenerate or setgenerate calls)
  745. "genproclimit": n (numeric) The processor limit for generation. -1 if no generation. (see getgenerate or setgenerate calls)
  746. "hashespersec": n (numeric) The hashes per second of the generation, or 0 if no generation.
  747. "pooledtx": n (numeric) The size of the mem pool
  748. "testnet": true|false (boolean) If using testnet or not
  749. }
  750.  
  751. Examples:
  752. > bitcoin-cli getmininginfo
  753. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmininginfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  754.  
  755.  
  756.  
  757. 20:29:09
  758. help getnettotals
  759.  
  760.  
  761. 20:29:09
  762. getnettotals
  763.  
  764. Returns information about network traffic, including bytes in, bytes out,
  765. and current time.
  766.  
  767. Result:
  768. {
  769. "totalbytesrecv": n, (numeric) Total bytes received
  770. "totalbytessent": n, (numeric) Total bytes sent
  771. "timemillis": t (numeric) Total cpu time
  772. }
  773.  
  774. Examples:
  775. > bitcoin-cli getnettotals
  776. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnettotals", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  777.  
  778.  
  779.  
  780. 20:29:12
  781. help getnetworkhashps
  782.  
  783.  
  784. 20:29:12
  785. getnetworkhashps ( blocks height )
  786.  
  787. Returns the estimated network hashes per second based on the last n blocks.
  788. Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change.
  789. Pass in [height] to estimate the network speed at the time when a certain block was found.
  790.  
  791. Arguments:
  792. 1. blocks (numeric, optional, default=120) The number of blocks, or -1 for blocks since last difficulty change.
  793. 2. height (numeric, optional, default=-1) To estimate at the time of the given height.
  794.  
  795. Result:
  796. x (numeric) Hashes per second estimated
  797.  
  798. Examples:
  799. > bitcoin-cli getnetworkhashps
  800. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkhashps", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  801.  
  802.  
  803.  
  804. 20:29:16
  805. help getnetworkinfo
  806.  
  807.  
  808. 20:29:16
  809. getnetworkinfo
  810. Returns an object containing various state info regarding P2P networking.
  811.  
  812. Result:
  813. {
  814. "version": xxxxx, (numeric) the server version
  815. "protocolversion": xxxxx, (numeric) the protocol version
  816. "timeoffset": xxxxx, (numeric) the time offset
  817. "connections": xxxxx, (numeric) the number of connections
  818. "proxy": "host:port", (string, optional) the proxy used by the server
  819. "relayfee": x.xxxx, (numeric) minimum relay fee for non-free transactions in btc/kb
  820. "localaddresses": [, (array) list of local addresses
  821. "address": "xxxx", (string) network address
  822. "port": xxx, (numeric) network port
  823. "score": xxx (numeric) relative score
  824. ]
  825. }
  826.  
  827. Examples:
  828. > bitcoin-cli getnetworkinfo
  829. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  830.  
  831.  
  832.  
  833. 20:29:19
  834. help getnewaddress
  835.  
  836.  
  837. 20:29:19
  838. getnewaddress ( "account" )
  839.  
  840. Returns a new Bitcoin address for receiving payments.
  841. If 'account' is specified (recommended), it is added to the address book
  842. so payments received with the address will be credited to 'account'.
  843.  
  844. Arguments:
  845. 1. "account" (string, optional) The account name for the address to be linked to. if not provided, the default account "" is used. It can also be set to the empty string "" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name.
  846.  
  847. Result:
  848. "bitcoinaddress" (string) The new bitcoin address
  849.  
  850. Examples:
  851. > bitcoin-cli getnewaddress
  852. > bitcoin-cli getnewaddress ""
  853. > bitcoin-cli getnewaddress "myaccount"
  854. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": ["myaccount"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  855.  
  856.  
  857.  
  858. 20:29:23
  859. help getpeerinfo
  860.  
  861.  
  862. 20:29:23
  863. getpeerinfo
  864.  
  865. Returns data about each connected network node as a json array of objects.
  866.  
  867. bResult:
  868. [
  869. {
  870. "addr":"host:port", (string) The ip address and port of the peer
  871. "addrlocal":"ip:port", (string) local address
  872. "services":"00000001", (string) The services
  873. "lastsend": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last send
  874. "lastrecv": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last receive
  875. "bytessent": n, (numeric) The total bytes sent
  876. "bytesrecv": n, (numeric) The total bytes received
  877. "conntime": ttt, (numeric) The connection time in seconds since epoch (Jan 1 1970 GMT)
  878. "pingtime": n, (numeric) ping time
  879. "pingwait": n, (numeric) ping wait
  880. "version": v, (numeric) The peer version, such as 7001
  881. "subver": "/Satoshi:0.8.5/", (string) The string version
  882. "inbound": true|false, (boolean) Inbound (true) or Outbound (false)
  883. "startingheight": n, (numeric) The starting height (block) of the peer
  884. "banscore": n, (numeric) The ban score (stats.nMisbehavior)
  885. "syncnode" : true|false (booleamn) if sync node
  886. }
  887. ,...
  888. }
  889.  
  890. Examples:
  891. > bitcoin-cli getpeerinfo
  892. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getpeerinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  893.  
  894.  
  895.  
  896. 20:29:28
  897. help getrawchangeaddress
  898.  
  899.  
  900. 20:29:28
  901. getrawchangeaddress
  902.  
  903. Returns a new Bitcoin address, for receiving change.
  904. This is for use with raw transactions, NOT normal use.
  905.  
  906. Result:
  907. "address" (string) The address
  908.  
  909. Examples:
  910. > bitcoin-cli getrawchangeaddress
  911. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawchangeaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  912.  
  913.  
  914.  
  915. 20:29:40
  916. help getrawmempool
  917.  
  918.  
  919. 20:29:40
  920. getrawmempool ( verbose )
  921.  
  922. Returns all transaction ids in memory pool as a json array of string transaction ids.
  923.  
  924. Arguments:
  925. 1. verbose (boolean, optional, default=false) true for a json object, false for array of transaction ids
  926.  
  927. Result: (for verbose = false):
  928. [ (json array of string)
  929. "transactionid" (string) The transaction id
  930. ,...
  931. ]
  932.  
  933. Result: (for verbose = true):
  934. { (json object)
  935. "transactionid" : { (json object)
  936. "size" : n, (numeric) transaction size in bytes
  937. "fee" : n, (numeric) transaction fee in bitcoins
  938. "time" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT
  939. "height" : n, (numeric) block height when transaction entered pool
  940. "startingpriority" : n, (numeric) priority when transaction entered pool
  941. "currentpriority" : n, (numeric) transaction priority now
  942. "depends" : [ (array) unconfirmed transactions used as inputs for this transaction
  943. "transactionid", (string) parent transaction id
  944. ... ]
  945. }, ...
  946. ]
  947.  
  948. Examples
  949. > bitcoin-cli getrawmempool true
  950. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawmempool", "params": [true] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  951.  
  952.  
  953.  
  954. 20:29:44
  955. help getrawtransaction
  956.  
  957.  
  958. 20:29:44
  959. getrawtransaction "txid" ( verbose )
  960.  
  961. Return the raw transaction data.
  962.  
  963. If verbose=0, returns a string that is serialized, hex-encoded data for 'txid'.
  964. If verbose is non-zero, returns an Object with information about 'txid'.
  965.  
  966. Arguments:
  967. 1. "txid" (string, required) The transaction id
  968. 2. verbose (numeric, optional, default=0) If 0, return a string, other return a json object
  969.  
  970. Result (if verbose is not set or set to 0):
  971. "data" (string) The serialized, hex-encoded data for 'txid'
  972.  
  973. Result (if verbose > 0):
  974. {
  975. "hex" : "data", (string) The serialized, hex-encoded data for 'txid'
  976. "txid" : "id", (string) The transaction id (same as provided)
  977. "version" : n, (numeric) The version
  978. "locktime" : ttt, (numeric) The lock time
  979. "vin" : [ (array of json objects)
  980. {
  981. "txid": "id", (string) The transaction id
  982. "vout": n, (numeric)
  983. "scriptSig": { (json object) The script
  984. "asm": "asm", (string) asm
  985. "hex": "hex" (string) hex
  986. },
  987. "sequence": n (numeric) The script sequence number
  988. }
  989. ,...
  990. ],
  991. "vout" : [ (array of json objects)
  992. {
  993. "value" : x.xxx, (numeric) The value in btc
  994. "n" : n, (numeric) index
  995. "scriptPubKey" : { (json object)
  996. "asm" : "asm", (string) the asm
  997. "hex" : "hex", (string) the hex
  998. "reqSigs" : n, (numeric) The required sigs
  999. "type" : "pubkeyhash", (string) The type, eg 'pubkeyhash'
  1000. "addresses" : [ (json array of string)
  1001. "bitcoinaddress" (string) bitcoin address
  1002. ,...
  1003. ]
  1004. }
  1005. }
  1006. ,...
  1007. ],
  1008. "blockhash" : "hash", (string) the block hash
  1009. "confirmations" : n, (numeric) The confirmations
  1010. "time" : ttt, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT)
  1011. "blocktime" : ttt (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)
  1012. }
  1013.  
  1014. Examples:
  1015. > bitcoin-cli getrawtransaction "mytxid"
  1016. > bitcoin-cli getrawtransaction "mytxid" 1
  1017. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawtransaction", "params": ["mytxid", 1] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1018.  
  1019.  
  1020.  
  1021. 20:29:47
  1022. help getreceivedbyaccount
  1023.  
  1024.  
  1025. 20:29:47
  1026. getreceivedbyaccount "account" ( minconf )
  1027.  
  1028. Returns the total amount received by addresses with <account> in transactions with at least [minconf] confirmations.
  1029.  
  1030. Arguments:
  1031. 1. "account" (string, required) The selected account, may be the default account using "".
  1032. 2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.
  1033.  
  1034. Result:
  1035. amount (numeric) The total amount in btc received for this account.
  1036.  
  1037. Examples:
  1038.  
  1039. Amount received by the default account with at least 1 confirmation
  1040. > bitcoin-cli getreceivedbyaccount ""
  1041.  
  1042. Amount received at the tabby account including unconfirmed amounts with zero confirmations
  1043. > bitcoin-cli getreceivedbyaccount "tabby" 0
  1044.  
  1045. The amount with at least 6 confirmation, very safe
  1046. > bitcoin-cli getreceivedbyaccount "tabby" 6
  1047.  
  1048. As a json rpc call
  1049. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getreceivedbyaccount", "params": ["tabby", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1050.  
  1051.  
  1052.  
  1053. 20:29:50
  1054. help getreceivedbyaddress
  1055.  
  1056.  
  1057. 20:29:50
  1058. getreceivedbyaddress "bitcoinaddress" ( minconf )
  1059.  
  1060. Returns the total amount received by the given bitcoinaddress in transactions with at least minconf confirmations.
  1061.  
  1062. Arguments:
  1063. 1. "bitcoinaddress" (string, required) The bitcoin address for transactions.
  1064. 2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.
  1065.  
  1066. Result:
  1067. amount (numeric) The total amount in btc received at this address.
  1068.  
  1069. Examples:
  1070.  
  1071. The amount from transactions with at least 1 confirmation
  1072. > bitcoin-cli getreceivedbyaddress "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ"
  1073.  
  1074. The amount including unconfirmed transactions, zero confirmations
  1075. > bitcoin-cli getreceivedbyaddress "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ" 0
  1076.  
  1077. The amount with at least 6 confirmation, very safe
  1078. > bitcoin-cli getreceivedbyaddress "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ" 6
  1079.  
  1080. As a json rpc call
  1081. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getreceivedbyaddress", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1082.  
  1083.  
  1084.  
  1085. 20:29:53
  1086. help gettransaction
  1087.  
  1088.  
  1089. 20:29:53
  1090. gettransaction "txid"
  1091.  
  1092. Get detailed information about in-wallet transaction <txid>
  1093.  
  1094. Arguments:
  1095. 1. "txid" (string, required) The transaction id
  1096.  
  1097. Result:
  1098. {
  1099. "amount" : x.xxx, (numeric) The transaction amount in btc
  1100. "confirmations" : n, (numeric) The number of confirmations
  1101. "blockhash" : "hash", (string) The block hash
  1102. "blockindex" : xx, (numeric) The block index
  1103. "blocktime" : ttt, (numeric) The time in seconds since epoch (1 Jan 1970 GMT)
  1104. "txid" : "transactionid", (string) The transaction id.
  1105. "time" : ttt, (numeric) The transaction time in seconds since epoch (1 Jan 1970 GMT)
  1106. "timereceived" : ttt, (numeric) The time received in seconds since epoch (1 Jan 1970 GMT)
  1107. "details" : [
  1108. {
  1109. "account" : "accountname", (string) The account name involved in the transaction, can be "" for the default account.
  1110. "address" : "bitcoinaddress", (string) The bitcoin address involved in the transaction
  1111. "category" : "send|receive", (string) The category, either 'send' or 'receive'
  1112. "amount" : x.xxx (numeric) The amount in btc
  1113. }
  1114. ,...
  1115. ],
  1116. "hex" : "data" (string) Raw data for transaction
  1117. }
  1118.  
  1119. bExamples
  1120. > bitcoin-cli gettransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"
  1121. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettransaction", "params": ["1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1122.  
  1123.  
  1124.  
  1125. 20:29:55
  1126. help gettxout
  1127.  
  1128.  
  1129. 20:29:55
  1130. gettxout "txid" n ( includemempool )
  1131.  
  1132. Returns details about an unspent transaction output.
  1133.  
  1134. Arguments:
  1135. 1. "txid" (string, required) The transaction id
  1136. 2. n (numeric, required) vout value
  1137. 3. includemempool (boolean, optional) Whether to included the mem pool
  1138.  
  1139. Result:
  1140. {
  1141. "bestblock" : "hash", (string) the block hash
  1142. "confirmations" : n, (numeric) The number of confirmations
  1143. "value" : x.xxx, (numeric) The transaction value in btc
  1144. "scriptPubKey" : { (json object)
  1145. "asm" : "code", (string)
  1146. "hex" : "hex", (string)
  1147. "reqSigs" : n, (numeric) Number of required signatures
  1148. "type" : "pubkeyhash", (string) The type, eg pubkeyhash
  1149. "addresses" : [ (array of string) array of bitcoin addresses
  1150. "bitcoinaddress" (string) bitcoin address
  1151. ,...
  1152. ]
  1153. },
  1154. "version" : n, (numeric) The version
  1155. "coinbase" : true|false (boolean) Coinbase or not
  1156. }
  1157.  
  1158. Examples:
  1159.  
  1160. Get unspent transactions
  1161. > bitcoin-cli listunspent
  1162.  
  1163. View the details
  1164. > bitcoin-cli gettxout "txid" 1
  1165.  
  1166. As a json rpc call
  1167. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettxout", "params": ["txid", 1] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1168.  
  1169.  
  1170.  
  1171. 20:29:58
  1172. help gettxoutsetinfo
  1173.  
  1174.  
  1175. 20:29:58
  1176. gettxoutsetinfo
  1177.  
  1178. Returns statistics about the unspent transaction output set.
  1179. Note this call may take some time.
  1180.  
  1181. Result:
  1182. {
  1183. "height":n, (numeric) The current block height (index)
  1184. "bestblock": "hex", (string) the best block hash hex
  1185. "transactions": n, (numeric) The number of transactions
  1186. "txouts": n, (numeric) The number of output transactions
  1187. "bytes_serialized": n, (numeric) The serialized size
  1188. "hash_serialized": "hash", (string) The serialized hash
  1189. "total_amount": x.xxx (numeric) The total amount
  1190. }
  1191.  
  1192. Examples:
  1193. > bitcoin-cli gettxoutsetinfo
  1194. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettxoutsetinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1195.  
  1196.  
  1197.  
  1198. 20:30:04
  1199. help getunconfirmedbalance
  1200.  
  1201.  
  1202. 20:30:04
  1203. getunconfirmedbalance
  1204. Returns the server's total unconfirmed balance
  1205.  
  1206.  
  1207.  
  1208. 20:32:18
  1209. help getwalletinfo
  1210.  
  1211.  
  1212. 20:32:18
  1213. getwalletinfo
  1214. Returns an object containing various wallet state info.
  1215.  
  1216. Result:
  1217. {
  1218. "walletversion": xxxxx, (numeric) the wallet version
  1219. "balance": xxxxxxx, (numeric) the total bitcoin balance of the wallet
  1220. "txcount": xxxxxxx, (numeric) the total number of transactions in the wallet
  1221. "keypoololdest": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool
  1222. "keypoolsize": xxxx, (numeric) how many new keys are pre-generated
  1223. "unlocked_until": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked
  1224. }
  1225.  
  1226. Examples:
  1227. > bitcoin-cli getwalletinfo
  1228. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwalletinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1229.  
  1230.  
  1231.  
  1232. 20:32:21
  1233. help getwork
  1234.  
  1235.  
  1236. 20:32:21
  1237. getwork ( "data" )
  1238.  
  1239. If 'data' is not specified, it returns the formatted hash data to work on.
  1240. If 'data' is specified, tries to solve the block and returns true if it was successful.
  1241.  
  1242. Arguments:
  1243. 1. "data" (string, optional) The hex encoded data to solve
  1244.  
  1245. Result (when 'data' is not specified):
  1246. {
  1247. "midstate" : "xxxx", (string) The precomputed hash state after hashing the first half of the data (DEPRECATED)
  1248. "data" : "xxxxx", (string) The block data
  1249. "hash1" : "xxxxx", (string) The formatted hash buffer for second hash (DEPRECATED)
  1250. "target" : "xxxx" (string) The little endian hash target
  1251. }
  1252.  
  1253. Result (when 'data' is specified):
  1254. true|false (boolean) If solving the block specified in the 'data' was successfull
  1255.  
  1256. Examples:
  1257. > bitcoin-cli getwork
  1258. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwork", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1259.  
  1260.  
  1261.  
  1262. 20:32:24
  1263. help help
  1264.  
  1265.  
  1266. 20:32:24
  1267. help ( "command" )
  1268.  
  1269. List all commands, or get help for a specified command.
  1270.  
  1271. Arguments:
  1272. 1. "command" (string, optional) The command to get help on
  1273.  
  1274. Result:
  1275. "text" (string) The help text
  1276.  
  1277.  
  1278.  
  1279. 20:32:27
  1280. help importprivkey
  1281.  
  1282.  
  1283. 20:32:27
  1284. importprivkey "bitcoinprivkey" ( "label" rescan )
  1285.  
  1286. Adds a private key (as returned by dumpprivkey) to your wallet.
  1287.  
  1288. Arguments:
  1289. 1. "bitcoinprivkey" (string, required) The private key (see dumpprivkey)
  1290. 2. "label" (string, optional) an optional label
  1291. 3. rescan (boolean, optional, default=true) Rescan the wallet for transactions
  1292.  
  1293. Examples:
  1294.  
  1295. Dump a private key
  1296. > bitcoin-cli dumpprivkey "myaddress"
  1297.  
  1298. Import the private key
  1299. > bitcoin-cli importprivkey "mykey"
  1300.  
  1301. Import using a label
  1302. > bitcoin-cli importprivkey "mykey" "testing" false
  1303.  
  1304. As a json rpc call
  1305. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importprivkey", "params": ["mykey", "testing", false] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1306.  
  1307.  
  1308.  
  1309. 20:32:31
  1310. help importwallet
  1311.  
  1312.  
  1313. 20:32:31
  1314. importwallet "filename"
  1315.  
  1316. Imports keys from a wallet dump file (see dumpwallet).
  1317.  
  1318. Arguments:
  1319. 1. "filename" (string, required) The wallet file
  1320.  
  1321. Examples:
  1322.  
  1323. Dump the wallet
  1324. > bitcoin-cli dumpwallet "test"
  1325.  
  1326. Import the wallet
  1327. > bitcoin-cli importwallet "test"
  1328.  
  1329. Import using the json rpc call
  1330. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importwallet", "params": ["test"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1331.  
  1332.  
  1333.  
  1334. 20:32:34
  1335. help keypoolrefill
  1336.  
  1337.  
  1338. 20:32:34
  1339. keypoolrefill ( newsize )
  1340.  
  1341. Fills the keypool.
  1342. Requires wallet passphrase to be set with walletpassphrase call.
  1343.  
  1344. Arguments
  1345. 1. newsize (numeric, optional, default=100) The new keypool size
  1346.  
  1347. Examples:
  1348. > bitcoin-cli keypoolrefill
  1349. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "keypoolrefill", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1350.  
  1351.  
  1352.  
  1353. 20:32:43
  1354. help listaccounts
  1355.  
  1356.  
  1357. 20:32:43
  1358. listaccounts ( minconf )
  1359.  
  1360. Returns Object that has account names as keys, account balances as values.
  1361.  
  1362. Arguments:
  1363. 1. minconf (numeric, optional, default=1) Only onclude transactions with at least this many confirmations
  1364.  
  1365. Result:
  1366. { (json object where keys are account names, and values are numeric balances
  1367. "account": x.xxx, (numeric) The property name is the account name, and the value is the total balance for the account.
  1368. ...
  1369. }
  1370.  
  1371. Examples:
  1372.  
  1373. List account balances where there at least 1 confirmation
  1374. > bitcoin-cli listaccounts
  1375.  
  1376. List account balances including zero confirmation transactions
  1377. > bitcoin-cli listaccounts 0
  1378.  
  1379. List account balances for 6 or more confirmations
  1380. > bitcoin-cli listaccounts 6
  1381.  
  1382. As json rpc call
  1383. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listaccounts", "params": [6] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1384.  
  1385.  
  1386.  
  1387. 20:32:46
  1388. help listaddressgroupings
  1389.  
  1390.  
  1391. 20:32:46
  1392. listaddressgroupings
  1393.  
  1394. Lists groups of addresses which have had their common ownership
  1395. made public by common use as inputs or as the resulting change
  1396. in past transactions
  1397.  
  1398. Result:
  1399. [
  1400. [
  1401. [
  1402. "bitcoinaddress", (string) The bitcoin address
  1403. amount, (numeric) The amount in btc
  1404. "account" (string, optional) The account
  1405. ]
  1406. ,...
  1407. ]
  1408. ,...
  1409. ]
  1410.  
  1411. Examples:
  1412. > bitcoin-cli listaddressgroupings
  1413. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listaddressgroupings", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1414.  
  1415.  
  1416.  
  1417. 20:32:48
  1418. help listlockunspent
  1419.  
  1420.  
  1421. 20:32:48
  1422. listlockunspent
  1423.  
  1424. Returns list of temporarily unspendable outputs.
  1425. See the lockunspent call to lock and unlock transactions for spending.
  1426.  
  1427. Result:
  1428. [
  1429. {
  1430. "txid" : "transactionid", (string) The transaction id locked
  1431. "vout" : n (numeric) The vout value
  1432. }
  1433. ,...
  1434. ]
  1435.  
  1436. Examples:
  1437.  
  1438. List the unspent transactions
  1439. > bitcoin-cli listunspent
  1440.  
  1441. Lock an unspent transaction
  1442. > bitcoin-cli lockunspent false "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
  1443.  
  1444. List the locked transactions
  1445. > bitcoin-cli listlockunspent
  1446.  
  1447. Unlock the transaction again
  1448. > bitcoin-cli lockunspent true "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
  1449.  
  1450. As a json rpc call
  1451. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listlockunspent", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1452.  
  1453.  
  1454.  
  1455. 20:32:51
  1456. help listreceivedbyaccount
  1457.  
  1458.  
  1459. 20:32:51
  1460. listreceivedbyaccount ( minconf includeempty )
  1461.  
  1462. List balances by account.
  1463.  
  1464. Arguments:
  1465. 1. minconf (numeric, optional, default=1) The minimum number of confirmations before payments are included.
  1466. 2. includeempty (boolean, optional, default=false) Whether to include accounts that haven't received any payments.
  1467.  
  1468. Result:
  1469. [
  1470. {
  1471. "account" : "accountname", (string) The account name of the receiving account
  1472. "amount" : x.xxx, (numeric) The total amount received by addresses with this account
  1473. "confirmations" : n (numeric) The number of confirmations of the most recent transaction included
  1474. }
  1475. ,...
  1476. ]
  1477.  
  1478. Examples:
  1479. > bitcoin-cli listreceivedbyaccount
  1480. > bitcoin-cli listreceivedbyaccount 6 true
  1481. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listreceivedbyaccount", "params": [6, true] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1482.  
  1483.  
  1484.  
  1485. 20:32:53
  1486. help listreceivedbyaddress
  1487.  
  1488.  
  1489. 20:32:53
  1490. listreceivedbyaddress ( minconf includeempty )
  1491.  
  1492. List balances by receiving address.
  1493.  
  1494. Arguments:
  1495. 1. minconf (numeric, optional, default=1) The minimum number of confirmations before payments are included.
  1496. 2. includeempty (numeric, optional, dafault=false) Whether to include addresses that haven't received any payments.
  1497.  
  1498. Result:
  1499. [
  1500. {
  1501. "address" : "receivingaddress", (string) The receiving address
  1502. "account" : "accountname", (string) The account of the receiving address. The default account is "".
  1503. "amount" : x.xxx, (numeric) The total amount in btc received by the address
  1504. "confirmations" : n (numeric) The number of confirmations of the most recent transaction included
  1505. }
  1506. ,...
  1507. ]
  1508.  
  1509. Examples:
  1510. > bitcoin-cli listreceivedbyaddress
  1511. > bitcoin-cli listreceivedbyaddress 6 true
  1512. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listreceivedbyaddress", "params": [6, true] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1513.  
  1514.  
  1515.  
  1516. 20:32:55
  1517. help listsinceblock
  1518.  
  1519.  
  1520. 20:32:55
  1521. listsinceblock ( "blockhash" target-confirmations )
  1522.  
  1523. Get all transactions in blocks since block [blockhash], or all transactions if omitted
  1524.  
  1525. Arguments:
  1526. 1. "blockhash" (string, optional) The block hash to list transactions since
  1527. 2. target-confirmations: (numeric, optional) The confirmations required, must be 1 or more
  1528.  
  1529. Result:
  1530. {
  1531. "transactions": [
  1532. "account":"accountname", (string) The account name associated with the transaction. Will be "" for the default account.
  1533. "address":"bitcoinaddress", (string) The bitcoin address of the transaction. Not present for move transactions (category = move).
  1534. "category":"send|receive", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.
  1535. "amount": x.xxx, (numeric) The amount in btc. This is negative for the 'send' category, and for the 'move' category for moves
  1536. outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.
  1537. "fee": x.xxx, (numeric) The amount of the fee in btc. This is negative and only available for the 'send' category of transactions.
  1538. "confirmations": n, (numeric) The number of confirmations for the transaction. Available for 'send' and 'receive' category of transactions.
  1539. "blockhash": "hashvalue", (string) The block hash containing the transaction. Available for 'send' and 'receive' category of transactions.
  1540. "blockindex": n, (numeric) The block index containing the transaction. Available for 'send' and 'receive' category of transactions.
  1541. "blocktime": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).
  1542. "txid": "transactionid", (string) The transaction id. Available for 'send' and 'receive' category of transactions.
  1543. "time": xxx, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT).
  1544. "timereceived": xxx, (numeric) The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions.
  1545. "comment": "...", (string) If a comment is associated with the transaction.
  1546. "to": "...", (string) If a comment to is associated with the transaction.
  1547. ],
  1548. "lastblock": "lastblockhash" (string) The hash of the last block
  1549. }
  1550.  
  1551. Examples:
  1552. > bitcoin-cli listsinceblock
  1553. > bitcoin-cli listsinceblock "000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad" 6
  1554. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listsinceblock", "params": ["000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1555.  
  1556.  
  1557.  
  1558. 20:32:58
  1559. help listtransactions
  1560.  
  1561.  
  1562. 20:32:58
  1563. listtransactions ( "account" count from )
  1564.  
  1565. Returns up to 'count' most recent transactions skipping the first 'from' transactions for account 'account'.
  1566.  
  1567. Arguments:
  1568. 1. "account" (string, optional) The account name. If not included, it will list all transactions for all accounts.
  1569. If "" is set, it will list transactions for the default account.
  1570. 2. count (numeric, optional, default=10) The number of transactions to return
  1571. 3. from (numeric, optional, default=0) The number of transactions to skip
  1572.  
  1573. Result:
  1574. [
  1575. {
  1576. "account":"accountname", (string) The account name associated with the transaction.
  1577. It will be "" for the default account.
  1578. "address":"bitcoinaddress", (string) The bitcoin address of the transaction. Not present for
  1579. move transactions (category = move).
  1580. "category":"send|receive|move", (string) The transaction category. 'move' is a local (off blockchain)
  1581. transaction between accounts, and not associated with an address,
  1582. transaction id or block. 'send' and 'receive' transactions are
  1583. associated with an address, transaction id and block details
  1584. "amount": x.xxx, (numeric) The amount in btc. This is negative for the 'send' category, and for the
  1585. 'move' category for moves outbound. It is positive for the 'receive' category,
  1586. and for the 'move' category for inbound funds.
  1587. "fee": x.xxx, (numeric) The amount of the fee in btc. This is negative and only available for the
  1588. 'send' category of transactions.
  1589. "confirmations": n, (numeric) The number of confirmations for the transaction. Available for 'send' and
  1590. 'receive' category of transactions.
  1591. "blockhash": "hashvalue", (string) The block hash containing the transaction. Available for 'send' and 'receive'
  1592. category of transactions.
  1593. "blockindex": n, (numeric) The block index containing the transaction. Available for 'send' and 'receive'
  1594. category of transactions.
  1595. "txid": "transactionid", (string) The transaction id. Available for 'send' and 'receive' category of transactions.
  1596. "time": xxx, (numeric) The transaction time in seconds since epoch (midnight Jan 1 1970 GMT).
  1597. "timereceived": xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available
  1598. for 'send' and 'receive' category of transactions.
  1599. "comment": "...", (string) If a comment is associated with the transaction.
  1600. "otheraccount": "accountname", (string) For the 'move' category of transactions, the account the funds came
  1601. from (for receiving funds, positive amounts), or went to (for sending funds,
  1602. negative amounts).
  1603. }
  1604. ]
  1605.  
  1606. Examples:
  1607.  
  1608. List the most recent 10 transactions in the systems
  1609. > bitcoin-cli listtransactions
  1610.  
  1611. List the most recent 10 transactions for the tabby account
  1612. > bitcoin-cli listtransactions "tabby"
  1613.  
  1614. List transactions 100 to 120 from the tabby account
  1615. > bitcoin-cli listtransactions "tabby" 20 100
  1616.  
  1617. As a json rpc call
  1618. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listtransactions", "params": ["tabby", 20, 100] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1619.  
  1620.  
  1621.  
  1622. 20:33:01
  1623. help listunspent
  1624.  
  1625.  
  1626. 20:33:01
  1627. listunspent ( minconf maxconf ["address",...] )
  1628.  
  1629. Returns array of unspent transaction outputs
  1630. with between minconf and maxconf (inclusive) confirmations.
  1631. Optionally filter to only include txouts paid to specified addresses.
  1632. Results are an array of Objects, each of which has:
  1633. {txid, vout, scriptPubKey, amount, confirmations}
  1634.  
  1635. Arguments:
  1636. 1. minconf (numeric, optional, default=1) The minimum confirmationsi to filter
  1637. 2. maxconf (numeric, optional, default=9999999) The maximum confirmations to filter
  1638. 3. "addresses" (string) A json array of bitcoin addresses to filter
  1639. [
  1640. "address" (string) bitcoin address
  1641. ,...
  1642. ]
  1643.  
  1644. Result
  1645. [ (array of json object)
  1646. {
  1647. "txid" : "txid", (string) the transaction id
  1648. "vout" : n, (numeric) the vout value
  1649. "address" : "address", (string) the bitcoin address
  1650. "account" : "account", (string) The associated account, or "" for the default account
  1651. "scriptPubKey" : "key", (string) the script key
  1652. "amount" : x.xxx, (numeric) the transaction amount in btc
  1653. "confirmations" : n (numeric) The number of confirmations
  1654. }
  1655. ,...
  1656. ]
  1657.  
  1658. Examples
  1659. > bitcoin-cli listunspent
  1660. > bitcoin-cli listunspent 6 9999999 "[\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\",\"1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\"]"
  1661. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listunspent", "params": [6, 9999999 "[\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\",\"1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1662.  
  1663.  
  1664.  
  1665. 20:33:04
  1666. help lockunspent
  1667.  
  1668.  
  1669. 20:33:04
  1670. lockunspent unlock [{"txid":"txid","vout":n},...]
  1671.  
  1672. Updates list of temporarily unspendable outputs.
  1673. Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.
  1674. A locked transaction output will not be chosen by automatic coin selection, when spending bitcoins.
  1675. Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list
  1676. is always cleared (by virtue of process exit) when a node stops or fails.
  1677. Also see the listunspent call
  1678.  
  1679. Arguments:
  1680. 1. unlock (boolean, required) Whether to unlock (true) or lock (false) the specified transactions
  1681. 2. "transactions" (string, required) A json array of objects. Each object the txid (string) vout (numeric)
  1682. [ (json array of json objects)
  1683. {
  1684. "txid":"id", (string) The transaction id
  1685. "vout": n (numeric) The output number
  1686. }
  1687. ,...
  1688. ]
  1689.  
  1690. Result:
  1691. true|false (boolean) Whether the command was successful or not
  1692.  
  1693. Examples:
  1694.  
  1695. List the unspent transactions
  1696. > bitcoin-cli listunspent
  1697.  
  1698. Lock an unspent transaction
  1699. > bitcoin-cli lockunspent false "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
  1700.  
  1701. List the locked transactions
  1702. > bitcoin-cli listlockunspent
  1703.  
  1704. Unlock the transaction again
  1705. > bitcoin-cli lockunspent true "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
  1706.  
  1707. As a json rpc call
  1708. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "lockunspent", "params": [false, "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1709.  
  1710.  
  1711.  
  1712. 20:33:07
  1713. help move
  1714.  
  1715.  
  1716. 20:33:07
  1717. move "fromaccount" "toaccount" amount ( minconf "comment" )
  1718.  
  1719. Move a specified amount from one account in your wallet to another.
  1720.  
  1721. Arguments:
  1722. 1. "fromaccount" (string, required) The name of the account to move funds from. May be the default account using "".
  1723. 2. "toaccount" (string, required) The name of the account to move funds to. May be the default account using "".
  1724. 3. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.
  1725. 4. "comment" (string, optional) An optional comment, stored in the wallet only.
  1726.  
  1727. Result:
  1728. true|false (boolean) true if successfull.
  1729.  
  1730. Examples:
  1731.  
  1732. Move 0.01 btc from the default account to the account named tabby
  1733. > bitcoin-cli move "" "tabby" 0.01
  1734.  
  1735. Move 0.01 btc timotei to akiko with a comment and funds have 6 confirmations
  1736. > bitcoin-cli move "timotei" "akiko" 0.01 6 "happy birthday!"
  1737.  
  1738. As a json rpc call
  1739. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "move", "params": ["timotei", "akiko", 0.01, 6, "happy birthday!"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1740.  
  1741.  
  1742.  
  1743. 20:33:10
  1744. help ping
  1745.  
  1746.  
  1747. 20:33:10
  1748. ping
  1749.  
  1750. Requests that a ping be sent to all other nodes, to measure ping time.
  1751. Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds.
  1752. Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.
  1753.  
  1754. Examples:
  1755. > bitcoin-cli ping
  1756. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "ping", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1757.  
  1758.  
  1759.  
  1760. 20:33:12
  1761. help sendfrom
  1762.  
  1763.  
  1764. 20:33:12
  1765. sendfrom "fromaccount" "tobitcoinaddress" amount ( minconf "comment" "comment-to" )
  1766.  
  1767. Sent an amount from an account to a bitcoin address.
  1768. The amount is a real and is rounded to the nearest 0.00000001.
  1769. Requires wallet passphrase to be set with walletpassphrase call.
  1770.  
  1771. Arguments:
  1772. 1. "fromaccount" (string, required) The name of the account to send funds from. May be the default account using "".
  1773. 2. "tobitcoinaddress" (string, required) The bitcoin address to send funds to.
  1774. 3. amount (numeric, required) The amount in btc. (transaction fee is added on top).
  1775. 4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.
  1776. 5. "comment" (string, optional) A comment used to store what the transaction is for.
  1777. This is not part of the transaction, just kept in your wallet.
  1778. 6. "comment-to" (string, optional) An optional comment to store the name of the person or organization
  1779. to which you're sending the transaction. This is not part of the transaction,
  1780. it is just kept in your wallet.
  1781.  
  1782. Result:
  1783. "transactionid" (string) The transaction id.
  1784.  
  1785. Examples:
  1786.  
  1787. Send 0.01 btc from the default account to the address, must have at least 1 confirmation
  1788. > bitcoin-cli sendfrom "" "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 0.01
  1789.  
  1790. Send 0.01 from the tabby account to the given address, funds must have at least 6 confirmations
  1791. > bitcoin-cli sendfrom "tabby" "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 0.01 6 "donation" "seans outpost"
  1792.  
  1793. As a json rpc call
  1794. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendfrom", "params": ["tabby", "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd", 0.01, 6, "donation", "seans outpost"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1795.  
  1796.  
  1797.  
  1798. 20:33:15
  1799. help sendmany
  1800.  
  1801.  
  1802. 20:33:15
  1803. sendmany "fromaccount" {"address":amount,...} ( minconf "comment" )
  1804.  
  1805. Send multiple times. Amounts are double-precision floating point numbers.
  1806. Requires wallet passphrase to be set with walletpassphrase call.
  1807.  
  1808. Arguments:
  1809. 1. "fromaccount" (string, required) The account to send the funds from, can be "" for the default account
  1810. 2. "amounts" (string, required) A json object with addresses and amounts
  1811. {
  1812. "address":amount (numeric) The bitcoin address is the key, the numeric amount in btc is the value
  1813. ,...
  1814. }
  1815. 3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.
  1816. 4. "comment" (string, optional) A comment
  1817.  
  1818. Result:
  1819. "transactionid" (string) The transaction id for the send. Only 1 transaction is created regardless of
  1820. the number of addresses.
  1821.  
  1822. Examples:
  1823.  
  1824. Send two amounts to two different addresses:
  1825. > bitcoin-cli sendmany "tabby" "{\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\":0.01,\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\":0.02}"
  1826.  
  1827. Send two amounts to two different addresses setting the confirmation and comment:
  1828. > bitcoin-cli sendmany "tabby" "{\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\":0.01,\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\":0.02}" 6 "testing"
  1829.  
  1830. As a json rpc call
  1831. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendmany", "params": ["tabby", "{\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\":0.01,\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\":0.02}", 6, "testing"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1832.  
  1833.  
  1834.  
  1835. 20:33:17
  1836. help sendrawtransaction
  1837.  
  1838.  
  1839. 20:33:17
  1840. sendrawtransaction "hexstring" ( allowhighfees )
  1841.  
  1842. Submits raw transaction (serialized, hex-encoded) to local node and network.
  1843.  
  1844. Also see createrawtransaction and signrawtransaction calls.
  1845.  
  1846. Arguments:
  1847. 1. "hexstring" (string, required) The hex string of the raw transaction)
  1848. 2. allowhighfees (boolean, optional, default=false) Allow high fees
  1849.  
  1850. Result:
  1851. "hex" (string) The transaction hash in hex
  1852.  
  1853. Examples:
  1854.  
  1855. Create a transaction
  1856. > bitcoin-cli createrawtransaction "[{\"txid\" : \"mytxid\",\"vout\":0}]" "{\"myaddress\":0.01}"
  1857. Sign the transaction, and get back the hex
  1858. > bitcoin-cli signrawtransaction "myhex"
  1859.  
  1860. Send the transaction (signed hex)
  1861. > bitcoin-cli sendrawtransaction "signedhex"
  1862.  
  1863. As a json rpc call
  1864. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendrawtransaction", "params": ["signedhex"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1865.  
  1866.  
  1867.  
  1868. 20:33:19
  1869. help sendtoaddress
  1870.  
  1871.  
  1872. 20:33:19
  1873. sendtoaddress "bitcoinaddress" amount ( "comment" "comment-to" )
  1874.  
  1875. Sent an amount to a given address. The amount is a real and is rounded to the nearest 0.00000001
  1876.  
  1877. Requires wallet passphrase to be set with walletpassphrase call.
  1878. Arguments:
  1879. 1. "bitcoinaddress" (string, required) The bitcoin address to send to.
  1880. 2. "amount" (numeric, required) The amount in btc to send. eg 0.1
  1881. 3. "comment" (string, optional) A comment used to store what the transaction is for.
  1882. This is not part of the transaction, just kept in your wallet.
  1883. 4. "comment-to" (string, optional) A comment to store the name of the person or organization
  1884. to which you're sending the transaction. This is not part of the
  1885. transaction, just kept in your wallet.
  1886.  
  1887. Result:
  1888. "transactionid" (string) The transaction id.
  1889.  
  1890. Examples:
  1891. > bitcoin-cli sendtoaddress "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 0.1
  1892. > bitcoin-cli sendtoaddress "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 0.1 "donation" "seans outpost"
  1893. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendtoaddress", "params": ["1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd", 0.1, "donation", "seans outpost"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1894.  
  1895.  
  1896.  
  1897. 20:33:22
  1898. help setaccount
  1899.  
  1900.  
  1901. 20:33:22
  1902. setaccount "bitcoinaddress" "account"
  1903.  
  1904. Sets the account associated with the given address.
  1905.  
  1906. Arguments:
  1907. 1. "bitcoinaddress" (string, required) The bitcoin address to be associated with an account.
  1908. 2. "account" (string, required) The account to assign the address to.
  1909.  
  1910. Examples:
  1911. > bitcoin-cli setaccount "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ" "tabby"
  1912. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "setaccount", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ", "tabby"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1913.  
  1914.  
  1915.  
  1916. 20:33:24
  1917. help setgenerate
  1918.  
  1919.  
  1920. 20:33:24
  1921. setgenerate generate ( genproclimit )
  1922.  
  1923. Set 'generate' true or false to turn generation on or off.
  1924. Generation is limited to 'genproclimit' processors, -1 is unlimited.
  1925. See the getgenerate call for the current setting.
  1926.  
  1927. Arguments:
  1928. 1. generate (boolean, required) Set to true to turn on generation, off to turn off.
  1929. 2. genproclimit (numeric, optional) Set the processor limit for when generation is on. Can be -1 for unlimited.
  1930. Note: in -regtest mode, genproclimit controls how many blocks are generated immediately.
  1931.  
  1932. Examples:
  1933.  
  1934. Set the generation on with a limit of one processor
  1935. > bitcoin-cli setgenerate true 1
  1936.  
  1937. Check the setting
  1938. > bitcoin-cli getgenerate
  1939.  
  1940. Turn off generation
  1941. > bitcoin-cli setgenerate false
  1942.  
  1943. Using json rpc
  1944. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "setgenerate", "params": [true, 1] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1945.  
  1946.  
  1947.  
  1948. 20:33:26
  1949. help settxfee
  1950.  
  1951.  
  1952. 20:33:26
  1953. settxfee amount
  1954.  
  1955. Set the transaction fee per kB.
  1956.  
  1957. Arguments:
  1958. 1. amount (numeric, required) The transaction fee in BTC/kB rounded to the nearest 0.00000001
  1959.  
  1960. Result
  1961. true|false (boolean) Returns true if successful
  1962.  
  1963. Examples:
  1964. > bitcoin-cli settxfee 0.00001
  1965. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "settxfee", "params": [0.00001] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1966.  
  1967.  
  1968.  
  1969. 20:33:29
  1970. help signmessage
  1971.  
  1972.  
  1973. 20:33:29
  1974. signmessage "bitcoinaddress" "message"
  1975.  
  1976. Sign a message with the private key of an address
  1977. Requires wallet passphrase to be set with walletpassphrase call.
  1978.  
  1979. Arguments:
  1980. 1. "bitcoinaddress" (string, required) The bitcoin address to use for the private key.
  1981. 2. "message" (string, required) The message to create a signature of.
  1982.  
  1983. Result:
  1984. "signature" (string) The signature of the message encoded in base 64
  1985.  
  1986. Examples:
  1987.  
  1988. Unlock the wallet for 30 seconds
  1989. > bitcoin-cli walletpassphrase "mypassphrase" 30
  1990.  
  1991. Create the signature
  1992. > bitcoin-cli signmessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ" "my message"
  1993.  
  1994. Verify the signature
  1995. > bitcoin-cli verifymessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ" "signature" "my message"
  1996.  
  1997. As json rpc
  1998. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "signmessage", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ", "my message"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  1999.  
  2000.  
  2001.  
  2002. 20:33:32
  2003. help signrawtransaction
  2004.  
  2005.  
  2006. 20:33:32
  2007. signrawtransaction "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype )
  2008.  
  2009. Sign inputs for raw transaction (serialized, hex-encoded).
  2010. The second optional argument (may be null) is an array of previous transaction outputs that
  2011. this transaction depends on but may not yet be in the block chain.
  2012. The third optional argument (may be null) is an array of base58-encoded private
  2013. keys that, if given, will be the only keys used to sign the transaction.
  2014.  
  2015. Requires wallet passphrase to be set with walletpassphrase call.
  2016.  
  2017. Arguments:
  2018. 1. "hexstring" (string, required) The transaction hex string
  2019. 2. "prevtxs" (string, optional) An json array of previous dependent transaction outputs
  2020. [ (json array of json objects, or 'null' if none provided)
  2021. {
  2022. "txid":"id", (string, required) The transaction id
  2023. "vout":n, (numeric, required) The output number
  2024. "scriptPubKey": "hex", (string, required) script key
  2025. "redeemScript": "hex" (string, required) redeem script
  2026. }
  2027. ,...
  2028. ]
  2029. 3. "privatekeys" (string, optional) A json array of base58-encoded private keys for signing
  2030. [ (json array of strings, or 'null' if none provided)
  2031. "privatekey" (string) private key in base58-encoding
  2032. ,...
  2033. ]
  2034. 4. "sighashtype" (string, optional, default=ALL) The signature hash type. Must be one of
  2035. "ALL"
  2036. "NONE"
  2037. "SINGLE"
  2038. "ALL|ANYONECANPAY"
  2039. "NONE|ANYONECANPAY"
  2040. "SINGLE|ANYONECANPAY"
  2041.  
  2042. Result:
  2043. {
  2044. "hex": "value", (string) The raw transaction with signature(s) (hex-encoded string)
  2045. "complete": n (numeric) if transaction has a complete set of signature (0 if not)
  2046. }
  2047.  
  2048. Examples:
  2049. > bitcoin-cli signrawtransaction "myhex"
  2050. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "signrawtransaction", "params": ["myhex"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  2051.  
  2052.  
  2053.  
  2054. 20:33:35
  2055. help stop
  2056.  
  2057.  
  2058. 20:33:35
  2059. stop
  2060.  
  2061. Stop Bitcoin server.
  2062.  
  2063.  
  2064. 20:33:37
  2065. help submitblock
  2066.  
  2067.  
  2068. 20:33:37
  2069. submitblock "hexdata" ( "jsonparametersobject" )
  2070.  
  2071. Attempts to submit new block to network.
  2072. The 'jsonparametersobject' parameter is currently ignored.
  2073. See https://en.bitcoin.it/wiki/BIP_0022 for full specification.
  2074.  
  2075. Arguments
  2076. 1. "hexdata" (string, required) the hex-encoded block data to submit
  2077. 2. "jsonparametersobject" (string, optional) object of optional parameters
  2078. {
  2079. "workid" : "id" (string, optional) if the server provided a workid, it MUST be included with submissions
  2080. }
  2081.  
  2082. Result:
  2083.  
  2084. Examples:
  2085. > bitcoin-cli submitblock "mydata"
  2086. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "submitblock", "params": ["mydata"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  2087.  
  2088.  
  2089.  
  2090. 20:33:39
  2091. help validateaddress
  2092.  
  2093.  
  2094. 20:33:39
  2095. validateaddress "bitcoinaddress"
  2096.  
  2097. Return information about the given bitcoin address.
  2098.  
  2099. Arguments:
  2100. 1. "bitcoinaddress" (string, required) The bitcoin address to validate
  2101.  
  2102. Result:
  2103. {
  2104. "isvalid" : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.
  2105. "address" : "bitcoinaddress", (string) The bitcoin address validated
  2106. "ismine" : true|false, (boolean) If the address is yours or not
  2107. "isscript" : true|false, (boolean) If the key is a script
  2108. "pubkey" : "publickeyhex", (string) The hex value of the raw public key
  2109. "iscompressed" : true|false, (boolean) If the address is compressed
  2110. "account" : "account" (string) The account associated with the address, "" is the default account
  2111. }
  2112.  
  2113. Examples:
  2114. > bitcoin-cli validateaddress "1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"
  2115. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "validateaddress", "params": ["1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  2116.  
  2117.  
  2118.  
  2119. 20:33:42
  2120. help verifychain
  2121.  
  2122.  
  2123. 20:33:42
  2124. verifychain ( checklevel numblocks )
  2125.  
  2126. Verifies blockchain database.
  2127.  
  2128. Arguments:
  2129. 1. checklevel (numeric, optional, 0-4, default=3) How thorough the block verification is.
  2130. 2. numblocks (numeric, optional, default=288, 0=all) The number of blocks to check.
  2131.  
  2132. Result:
  2133. true|false (boolean) Verified or not
  2134.  
  2135. Examples:
  2136. > bitcoin-cli verifychain
  2137. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "verifychain", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  2138.  
  2139.  
  2140.  
  2141. 20:33:44
  2142. help verifymessage
  2143.  
  2144.  
  2145. 20:33:44
  2146. verifymessage "bitcoinaddress" "signature" "message"
  2147.  
  2148. Verify a signed message
  2149.  
  2150. Arguments:
  2151. 1. "bitcoinaddress" (string, required) The bitcoin address to use for the signature.
  2152. 2. "signature" (string, required) The signature provided by the signer in base 64 encoding (see signmessage).
  2153. 3. "message" (string, required) The message that was signed.
  2154.  
  2155. Result:
  2156. true|false (boolean) If the signature is verified or not.
  2157.  
  2158. Examples:
  2159.  
  2160. Unlock the wallet for 30 seconds
  2161. > bitcoin-cli walletpassphrase "mypassphrase" 30
  2162.  
  2163. Create the signature
  2164. > bitcoin-cli signmessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ" "my message"
  2165.  
  2166. Verify the signature
  2167. > bitcoin-cli verifymessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ" "signature" "my message"
  2168.  
  2169. As json rpc
  2170. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "verifymessage", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ", "signature", "my message"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  2171.  
  2172.  
  2173.  
  2174. 20:33:48
  2175. help walletlock
  2176.  
  2177.  
  2178. 20:33:48
  2179. walletlock
  2180.  
  2181. Removes the wallet encryption key from memory, locking the wallet.
  2182. After calling this method, you will need to call walletpassphrase again
  2183. before being able to call any methods which require the wallet to be unlocked.
  2184.  
  2185. Examples:
  2186.  
  2187. Set the passphrase for 2 minutes to perform a transaction
  2188. > bitcoin-cli walletpassphrase "my pass phrase" 120
  2189.  
  2190. Perform a send (requires passphrase set)
  2191. > bitcoin-cli sendtoaddress "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 1.0
  2192.  
  2193. Clear the passphrase since we are done before 2 minutes is up
  2194. > bitcoin-cli walletlock
  2195.  
  2196. As json rpc call
  2197. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "walletlock", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  2198.  
  2199.  
  2200.  
  2201. 20:33:50
  2202. help walletpassphrase
  2203.  
  2204.  
  2205. 20:33:50
  2206. walletpassphrase "passphrase" timeout
  2207.  
  2208. Stores the wallet decryption key in memory for 'timeout' seconds.
  2209. This is needed prior to performing transactions related to private keys such as sending bitcoins
  2210.  
  2211. Arguments:
  2212. 1. "passphrase" (string, required) The wallet passphrase
  2213. 2. timeout (numeric, required) The time to keep the decryption key in seconds.
  2214.  
  2215. Note:
  2216. Issuing the walletpassphrase command while the wallet is already unlocked will set a new unlock
  2217. time that overrides the old one.
  2218.  
  2219. Examples:
  2220.  
  2221. unlock the wallet for 60 seconds
  2222. > bitcoin-cli walletpassphrase "my pass phrase" 60
  2223.  
  2224. Lock the wallet again (before 60 seconds)
  2225. > bitcoin-cli walletlock
  2226.  
  2227. As json rpc call
  2228. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "walletpassphrase", "params": ["my pass phrase", 60] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  2229.  
  2230.  
  2231.  
  2232. 20:33:53
  2233. help walletpassphrasechange
  2234.  
  2235.  
  2236. 20:33:53
  2237. walletpassphrasechange "oldpassphrase" "newpassphrase"
  2238.  
  2239. Changes the wallet passphrase from 'oldpassphrase' to 'newpassphrase'.
  2240.  
  2241. Arguments:
  2242. 1. "oldpassphrase" (string) The current passphrase
  2243. 2. "newpassphrase" (string) The new passphrase
  2244.  
  2245. Examples:
  2246. > bitcoin-cli walletpassphrasechange "old one" "new one"
  2247. > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "walletpassphrasechange", "params": ["old one", "new one"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  2248.  
  2249. 20:33:55
  2250.  
  2251. stop
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top