This is a list of the monerod daemon RPC calls, their inputs and outputs, and examples of each.
Many RPC calls use the daemon's JSON RPC interface while others use their own interfaces, as demonstrated below.
Note: "atomic units" refer to the smallest fraction of 1 XMR according to the monerod implementation. 1 XMR = 1e12 atomic units.
The majority of monerod RPC calls use the daemon's json_rpc
interface to request various bits of information. These methods all follow a similar structure, for example:
IP=127.0.0.1
PORT=18081
METHOD='get_block_header_by_height'
ALIAS='getblockheaderbyheight'
PARAMS='{"height":912345}'
curl \
http://$IP:$PORT/json_rpc \
-d '{"jsonrpc":"2.0","id":"0","method":"'$METHOD'","params":'$PARAMS'}' \
-H 'Content-Type: application/json'
Some methods include parameters, while others do not. Examples of each JSON RPC method follow.
Look up how many blocks are in the longest chain known to the node.
Alias: getblockcount.
Inputs: None.
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_count"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"count": 993163,
"status": "OK"
"untrusted": "false"
}
}
Look up a block's hash by its height.
Alias: on_getblockhash.
Inputs:
Outputs:
Example:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"on_get_block_hash","params":[912345]}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": "e22cf75f39ae720e8b71b3d120a5ac03f0db50bba6379e2850975b4859190bc6"
}
Get a block template on which mining a new block.
Alias: getblocktemplate.
Inputs:
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_template","params":{"wallet_address":"44GBHzv6ZyQdJkjqZje6KLZ3xSyN1hBSFAnLP6EAqJtCRVzMzZmeXTC2AHKDS9aEDTRKmo6a6o9r9j86pYfhCWDkKjbtcns","reserve_size":60}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"blockhashing_blob": "0e0ed286da8006ecdc1aab3033cf1716c52f13f9d8ae0051615a2453643de94643b550d543becd00000000d130d22cf308b308498bbc16e2e955e7dbd691e6a8fab805f98ad82e6faa8bcc06",
"blocktemplate_blob": "0e0ed286da8006ecdc1aab3033cf1716c52f13f9d8ae0051615a2453643de94643b550d543becd0000000002abc78b0101ffefc68b0101fcfcf0d4b422025014bb4a1eade6622fd781cb1063381cad396efa69719b41aa28b4fce8c7ad4b5f019ce1dc670456b24a5e03c2d9058a2df10fec779e2579753b1847b74ee644f16b023c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000051399a1bc46a846474f5b33db24eae173a26393b976054ee14f9feefe99925233802867097564c9db7a36af5bb5ed33ab46e63092bd8d32cef121608c3258edd55562812e21cc7e3ac73045745a72f7d74581d9a0849d6f30e8b2923171253e864f4e9ddea3acb5bc755f1c4a878130a70c26297540bc0b7a57affb6b35c1f03d8dbd54ece8457531f8cba15bb74516779c01193e212050423020e45aa2c15dcb",
"difficulty": 226807339040,
"difficulty_top64": 0,
"expected_reward": 1182367759996,
"height": 2286447,
"next_seed_hash": "",
"prev_hash": "ecdc1aab3033cf1716c52f13f9d8ae0051615a2453643de94643b550d543becd",
"reserved_offset": 130,
"seed_hash": "d432f499205150873b2572b5f033c9c6e4b7c6f3394bd2dd93822cd7085e7307",
"seed_height": 2285568,
"status": "OK",
"untrusted": false,
"wide_difficulty": "0x34cec55820"
}
Submit a mined block to the network.
Alias: submitblock.
Inputs:
Outputs:
In this example, a block blob which has not been mined is submitted:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"submit_block","params":["0707e6bdfedc053771512f1bc27c62731ae9e8f2443db64ce742f4e57f5cf8d393de28551e441a0000000002fb830a01ffbf830a018cfe88bee283060274c0aae2ef5730e680308d9c00b6da59187ad0352efe3c71d36eeeb28782f29f2501bd56b952c3ddc3e350c2631d3a5086cac172c56893831228b17de296ff4669de020200000000"]' -H 'Content-Type: application/json'
{
"error": {
"code": -7,
"message": "Block not accepted"
},
"id": "0",
"jsonrpc": "2.0"
}
Block header information for the most recent block is easily retrieved with this method. No inputs are needed.
Alias: getlastblockheader.
Inputs: None.
Outputs:
false
. If true
, this block is not part of the longest chain.true
), or when the daemon is fully synced and thus handles the RPC locally (false
)In this example, the most recent block (1562023 at the time) is returned:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_last_block_header"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"block_header": {
"block_size": 5500,
"block_weight": 5500,
"cumulative_difficulty": 86164894009456483,
"cumulative_difficulty_top64": 0,
"depth": 0,
"difficulty": 227026389695,
"difficulty_top64": 0,
"hash": "a6ad87cf357a1aac1ee1d7cb0afa4c2e653b0b1ab7d5bf6af310333e43c59dd0",
"height": 2286454,
"long_term_weight": 5500,
"major_version": 14,
"miner_tx_hash": "a474f87de1645ff14c5e90c477b07f9bc86a22fb42909caa0705239298da96d0",
"minor_version": 14,
"nonce": 249602367,
"num_txes": 3,
"orphan_status": false,
"pow_hash": "",
"prev_hash": "fa17fefe1d05da775a61a3dc33d9e199d12af167ef0ab37e52b51e8487b50f25",
"reward": 1181337498013,
"timestamp": 1612088597,
"wide_cumulative_difficulty": "0x1321e83bb8af763",
"wide_difficulty": "0x34dbd3cabf"
},
"credits": 0,
"status": "OK",
"top_hash": "",
"untrusted": false
}
}
Block header information can be retrieved using either a block's hash or height. This method includes a block's hash as an input parameter to retrieve basic information about the block.
Alias: getblockheaderbyhash.
Inputs:
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)In this example, block 912345 is looked up by its hash:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_header_by_hash","params":{"hash":"e22cf75f39ae720e8b71b3d120a5ac03f0db50bba6379e2850975b4859190bc6"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"block_header": {
"block_size": 210,
"block_weight": 210,
"cumulative_difficulty": 754734824984346,
"cumulative_difficulty_top64": 0,
"depth": 1374113,
"difficulty": 815625611,
"difficulty_top64": 0,
"hash": "e22cf75f39ae720e8b71b3d120a5ac03f0db50bba6379e2850975b4859190bc6",
"height": 912345,
"long_term_weight": 210,
"major_version": 1,
"miner_tx_hash": "c7da3965f25c19b8eb7dd8db48dcd4e7c885e2491db77e289f0609bf8e08ec30",
"minor_version": 2,
"nonce": 1646,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "",
"prev_hash": "b61c58b2e0be53fad5ef9d9731a55e8a81d972b8d90ed07c04fd37ca6403ff78",
"reward": 7388968946286,
"timestamp": 1452793716,
"wide_cumulative_difficulty": "0x2ae6d65248f1a",
"wide_difficulty": "0x309d758b"
},
"credits": 0,
"status": "OK",
"top_hash": "",
"untrusted": false
}
}
Similar to get_block_header_by_hash above, this method includes a block's height as an input parameter to retrieve basic information about the block.
Alias: getblockheaderbyheight.
Inputs:
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)In this example, block 912345 is looked up by its height (notice that the returned information is the same as in the previous example):
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_header_by_height","params":{"height":912345}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"block_header": {
"block_size": 210,
"block_weight": 210,
"cumulative_difficulty": 754734824984346,
"cumulative_difficulty_top64": 0,
"depth": 1374118,
"difficulty": 815625611,
"difficulty_top64": 0,
"hash": "e22cf75f39ae720e8b71b3d120a5ac03f0db50bba6379e2850975b4859190bc6",
"height": 912345,
"long_term_weight": 210,
"major_version": 1,
"miner_tx_hash": "c7da3965f25c19b8eb7dd8db48dcd4e7c885e2491db77e289f0609bf8e08ec30",
"minor_version": 2,
"nonce": 1646,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "",
"prev_hash": "b61c58b2e0be53fad5ef9d9731a55e8a81d972b8d90ed07c04fd37ca6403ff78",
"reward": 7388968946286,
"timestamp": 1452793716,
"wide_cumulative_difficulty": "0x2ae6d65248f1a",
"wide_difficulty": "0x309d758b"
},
"credits": 0,
"status": "OK",
"top_hash": "",
"untrusted": false
}
}
Similar to get_block_header_by_height above, but for a range of blocks. This method includes a starting block height and an ending block height as parameters to retrieve basic information about the range of blocks.
Alias: getblockheadersrange.
Inputs:
Outputs:
block_header
(a structure containing block header information. See get_last_block_header).true
), or when the daemon is fully synced and thus handles the RPC locally (false
)In this example, blocks range from height 1545999 to 1546000 is looked up (notice that the returned informations are ascending order and that it is at the April 2018 network upgrade time):
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_headers_range","params":{"start_height":1545999,"end_height":1546000}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"credits": 0,
"headers": [{
"block_size": 301413,
"block_weight": 301413,
"cumulative_difficulty": 13185267971483472,
"cumulative_difficulty_top64": 0,
"depth": 740464,
"difficulty": 134636057921,
"difficulty_top64": 0,
"hash": "86d1d20a40cefcf3dd410ff6967e0491613b77bf73ea8f1bf2e335cf9cf7d57a",
"height": 1545999,
"long_term_weight": 301413,
"major_version": 6,
"miner_tx_hash": "9909c6f8a5267f043c3b2b079fb4eacc49ef9c1dee1c028eeb1a259b95e6e1d9",
"minor_version": 6,
"nonce": 3246403956,
"num_txes": 20,
"orphan_status": false,
"pow_hash": "",
"prev_hash": "0ef6e948f77b8f8806621003f5de24b1bcbea150bc0e376835aea099674a5db5",
"reward": 5025593029981,
"timestamp": 1523002893,
"wide_cumulative_difficulty": "0x2ed7ee6db56750",
"wide_difficulty": "0x1f58ef3541"
},{
"block_size": 13322,
"block_weight": 13322,
"cumulative_difficulty": 13185402687569710,
"cumulative_difficulty_top64": 0,
"depth": 740463,
"difficulty": 134716086238,
"difficulty_top64": 0,
"hash": "b408bf4cfcd7de13e7e370c84b8314c85b24f0ba4093ca1d6eeb30b35e34e91a",
"height": 1546000,
"long_term_weight": 13322,
"major_version": 7,
"miner_tx_hash": "7f749c7c64acb35ef427c7454c45e6688781fbead9bbf222cb12ad1a96a4e8f6",
"minor_version": 7,
"nonce": 3737164176,
"num_txes": 1,
"orphan_status": false,
"pow_hash": "",
"prev_hash": "86d1d20a40cefcf3dd410ff6967e0491613b77bf73ea8f1bf2e335cf9cf7d57a",
"reward": 4851952181070,
"timestamp": 1523002931,
"wide_cumulative_difficulty": "0x2ed80dcb69bf2e",
"wide_difficulty": "0x1f5db457de"
}],
"status": "OK",
"top_hash": "",
"untrusted": false
}
}
Full block information can be retrieved by either block height or hash, like with the above block header calls. For full block information, both lookups use the same method, but with different input parameters.
Alias: getblock.
Inputs (pick one of the following):
Outputs:
prev_hash
in block header.true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Look up by height:
In the following example, block 912345 is looked up by its height. Note that block 912345 does not have any non-coinbase transactions. (See the next example for a block with extra transactions):
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block","params":{"height":912345}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"blob": "0102f4bedfb405b61c58b2e0be53fad5ef9d9731a55e8a81d972b8d90ed07c04fd37ca6403ff786e0600000195d83701ffd9d73704ee84ddb42102378b043c1724c92c69d923d266fe86477d3a5ddd21145062e148c64c5767700880c0fc82aa020273733cbd6e6218bda671596462a4b062f95cfe5e1dbb5b990dacb30e827d02f280f092cbdd080247a5dab669770da69a860acde21616a119818e1a489bb3c4b1b6b3c50547bc0c80e08d84ddcb01021f7e4762b8b755e3e3c72b8610cc87b9bc25d1f0a87c0c816ebb952e4f8aff3d2b01fd0a778957f4f3103a838afda488c3cdadf2697b3d34ad71234282b2fad9100e02080000000bdfc2c16c00",
"block_header": {
"block_size": 210,
"block_weight": 210,
"cumulative_difficulty": 754734824984346,
"cumulative_difficulty_top64": 0,
"depth": 1374119,
"difficulty": 815625611,
"difficulty_top64": 0,
"hash": "e22cf75f39ae720e8b71b3d120a5ac03f0db50bba6379e2850975b4859190bc6",
"height": 912345,
"long_term_weight": 210,
"major_version": 1,
"miner_tx_hash": "c7da3965f25c19b8eb7dd8db48dcd4e7c885e2491db77e289f0609bf8e08ec30",
"minor_version": 2,
"nonce": 1646,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "",
"prev_hash": "b61c58b2e0be53fad5ef9d9731a55e8a81d972b8d90ed07c04fd37ca6403ff78",
"reward": 7388968946286,
"timestamp": 1452793716,
"wide_cumulative_difficulty": "0x2ae6d65248f1a",
"wide_difficulty": "0x309d758b"
},
"credits": 0,
"json": "{\n \"major_version\": 1, \n \"minor_version\": 2, \n \"timestamp\": 1452793716, \n \"prev_id\": \"b61c58b2e0be53fad5ef9d9731a55e8a81d972b8d90ed07c04fd37ca6403ff78\", \n \"nonce\": 1646, \n \"miner_tx\": {\n \"version\": 1, \n \"unlock_time\": 912405, \n \"vin\": [ {\n \"gen\": {\n \"height\": 912345\n }\n }\n ], \n \"vout\": [ {\n \"amount\": 8968946286, \n \"target\": {\n \"key\": \"378b043c1724c92c69d923d266fe86477d3a5ddd21145062e148c64c57677008\"\n }\n }, {\n \"amount\": 80000000000, \n \"target\": {\n \"key\": \"73733cbd6e6218bda671596462a4b062f95cfe5e1dbb5b990dacb30e827d02f2\"\n }\n }, {\n \"amount\": 300000000000, \n \"target\": {\n \"key\": \"47a5dab669770da69a860acde21616a119818e1a489bb3c4b1b6b3c50547bc0c\"\n }\n }, {\n \"amount\": 7000000000000, \n \"target\": {\n \"key\": \"1f7e4762b8b755e3e3c72b8610cc87b9bc25d1f0a87c0c816ebb952e4f8aff3d\"\n }\n }\n ], \n \"extra\": [ 1, 253, 10, 119, 137, 87, 244, 243, 16, 58, 131, 138, 253, 164, 136, 195, 205, 173, 242, 105, 123, 61, 52, 173, 113, 35, 66, 130, 178, 250, 217, 16, 14, 2, 8, 0, 0, 0, 11, 223, 194, 193, 108\n ], \n \"signatures\": [ ]\n }, \n \"tx_hashes\": [ ]\n}",
"miner_tx_hash": "c7da3965f25c19b8eb7dd8db48dcd4e7c885e2491db77e289f0609bf8e08ec30",
"status": "OK",
"top_hash": "",
"untrusted": false
}
}
Look up by hash:
In the following example, block 993056 is looked up by its hash. Note that block 993056 has 3 non-coinbase transactions:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block","params":{"hash":"510ee3c4e14330a7b96e883c323a60ebd1b5556ac1262d0bc03c24a3b785516f"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"blob": "0102a3978cb7050ea4af6547c05c965afc8df6d31509ff3105dc7ae6b10172521d77e09711fd6df407000001dcce3c01ffa0ce3c049da8bece070259e9d685b3484886bc7b47c133e6099ecdf212d5eaa16ce19cd58e8c3c1e590a80d88ee16f024c5e2f542d25513c46b9e3b7d40140a22d0ae5314bfcae492ad9f56fff8185f080d0b8e1981a0213dd8ffdac9e6a2f71e327dad65328198dc879a492d145eae72677c0703a351580c0f9decfae010262bda00341681dccbc066757862da593734395745bdfe1fdc89b5948c86a5d4c2b01b691851cf057b9c302a3dbca879e1cba4cc45061ca55aaa6e03cdc67ab9e455002080000000c617fdf160379c6b9f00db027bde151705aafe85c495883aae2597d5cb8e1adb2e0f3ae1d07d715db73331abc3ec588ef07c7bb195786a4724b08dff431b51ffa32a4ce899bb197066426c0ed89f0b431fe171f7fd62bc95dd29943daa7cf3585cf1fdfc99d",
"block_header": {
"block_size": 3981,
"block_weight": 3981,
"cumulative_difficulty": 818657025727349,
"cumulative_difficulty_top64": 0,
"depth": 1293410,
"difficulty": 964985344,
"difficulty_top64": 0,
"hash": "510ee3c4e14330a7b96e883c323a60ebd1b5556ac1262d0bc03c24a3b785516f",
"height": 993056,
"long_term_weight": 3981,
"major_version": 1,
"miner_tx_hash": "372395aeac5e5ad2c40b4c546b0bad00c4242fb2bd88e2e25f4e43231876f81e",
"minor_version": 2,
"nonce": 2036,
"num_txes": 3,
"orphan_status": false,
"pow_hash": "",
"prev_hash": "0ea4af6547c05c965afc8df6d31509ff3105dc7ae6b10172521d77e09711fd6d",
"reward": 6932043647005,
"timestamp": 1457720227,
"wide_cumulative_difficulty": "0x2e89071361b75",
"wide_difficulty": "0x39848200"
},
"credits": 0,
"json": "{\n \"major_version\": 1, \n \"minor_version\": 2, \n \"timestamp\": 1457720227, \n \"prev_id\": \"0ea4af6547c05c965afc8df6d31509ff3105dc7ae6b10172521d77e09711fd6d\", \n \"nonce\": 2036, \n \"miner_tx\": {\n \"version\": 1, \n \"unlock_time\": 993116, \n \"vin\": [ {\n \"gen\": {\n \"height\": 993056\n }\n }\n ], \n \"vout\": [ {\n \"amount\": 2043647005, \n \"target\": {\n \"key\": \"59e9d685b3484886bc7b47c133e6099ecdf212d5eaa16ce19cd58e8c3c1e590a\"\n }\n }, {\n \"amount\": 30000000000, \n \"target\": {\n \"key\": \"4c5e2f542d25513c46b9e3b7d40140a22d0ae5314bfcae492ad9f56fff8185f0\"\n }\n }, {\n \"amount\": 900000000000, \n \"target\": {\n \"key\": \"13dd8ffdac9e6a2f71e327dad65328198dc879a492d145eae72677c0703a3515\"\n }\n }, {\n \"amount\": 6000000000000, \n \"target\": {\n \"key\": \"62bda00341681dccbc066757862da593734395745bdfe1fdc89b5948c86a5d4c\"\n }\n }\n ], \n \"extra\": [ 1, 182, 145, 133, 28, 240, 87, 185, 195, 2, 163, 219, 202, 135, 158, 28, 186, 76, 196, 80, 97, 202, 85, 170, 166, 224, 60, 220, 103, 171, 158, 69, 80, 2, 8, 0, 0, 0, 12, 97, 127, 223, 22\n ], \n \"signatures\": [ ]\n }, \n \"tx_hashes\": [ \"79c6b9f00db027bde151705aafe85c495883aae2597d5cb8e1adb2e0f3ae1d07\", \"d715db73331abc3ec588ef07c7bb195786a4724b08dff431b51ffa32a4ce899b\", \"b197066426c0ed89f0b431fe171f7fd62bc95dd29943daa7cf3585cf1fdfc99d\"\n ]\n}",
"miner_tx_hash": "372395aeac5e5ad2c40b4c546b0bad00c4242fb2bd88e2e25f4e43231876f81e",
"status": "OK",
"top_hash": "",
"tx_hashes": ["79c6b9f00db027bde151705aafe85c495883aae2597d5cb8e1adb2e0f3ae1d07","d715db73331abc3ec588ef07c7bb195786a4724b08dff431b51ffa32a4ce899b","b197066426c0ed89f0b431fe171f7fd62bc95dd29943daa7cf3585cf1fdfc99d"],
"untrusted": false
}
}
Retrieve information about incoming and outgoing connections to your node.
Alias: None.
Inputs: None.
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Following is an example of get_connections
and it's return:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_connections"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"connections": [{
"address": "51.75.162.171:44741",
"address_type": 1,
"avg_download": 0,
"avg_upload": 1,
"connection_id": "4420a6fcf9c642daaae41400ccfc1fd7",
"current_download": 0,
"current_upload": 1,
"height": 1,
"host": "51.75.162.171",
"incoming": true,
"ip": "51.75.162.171",
"live_time": 9,
"local_ip": false,
"localhost": false,
"peer_id": "ff561b6a65c2838c",
"port": "44741",
"pruning_seed": 0,
"recv_count": 382,
"recv_idle_time": 8,
"rpc_credits_per_hash": 0,
"rpc_port": 0,
"send_count": 15434,
"send_idle_time": 8,
"state": "normal",
"support_flags": 1
},{
...
}],
"status": "OK"
"untrusted": false
}
}
Retrieve general information about the state of your node and the network.
Alias:
See other RPC Methods /get_info (not JSON)
Inputs: None.
Outputs:
true
) or not (false
).true
) or not (false
).mainnet
, stagenet
or testnet
).true
) or online (false
).true
) or not (false
).true
) or not (false
).true
) or not (false
).true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Following is an example get_info
call and its return:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_info"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"adjusted_time": 1612090533,
"alt_blocks_count": 2,
"block_size_limit": 600000,
"block_size_median": 300000,
"block_weight_limit": 600000,
"block_weight_median": 300000,
"bootstrap_daemon_address": "",
"busy_syncing": false,
"credits": 0,
"cumulative_difficulty": 86168732847545368,
"cumulative_difficulty_top64": 0,
"database_size": 34329849856,
"difficulty": 225889137349,
"difficulty_top64": 0,
"free_space": 10795802624,
"grey_peerlist_size": 4999,
"height": 2286472,
"height_without_bootstrap": 2286472,
"incoming_connections_count": 85,
"mainnet": true,
"nettype": "mainnet",
"offline": false,
"outgoing_connections_count": 16,
"rpc_connections_count": 1,
"stagenet": false,
"start_time": 1611915662,
"status": "OK",
"synchronized": true,
"target": 120,
"target_height": 2286464,
"testnet": false,
"top_block_hash": "b92720d8315b96e32020d04e14a0c54cc13e057d4a5beb4501be490d306fdd8f",
"top_hash": "",
"tx_count": 11239803,
"tx_pool_size": 21,
"untrusted": false,
"update_available": false,
"version": "0.17.1.9-release",
"was_bootstrap_ever_used": false,
"white_peerlist_size": 1000,
"wide_cumulative_difficulty": "0x1322201881f9c18",
"wide_difficulty": "0x34980ab2c5"
}
}
Look up information regarding hard fork voting and readiness.
Alias: None.
Inputs: None.
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"hard_fork_info"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"credits": 0,
"earliest_height": 2210720,
"enabled": true,
"state": 2,
"status": "OK",
"threshold": 0,
"top_hash": "",
"untrusted": false,
"version": 14,
"votes": 10080,
"voting": 14,
"window": 10080
}
}
Ban another node by IP.
Alias: None.
Inputs:
true
to ban.Outputs:
Examples:
banning by host
In the following example, host is banned with its IP address string-formatted as A.B.C.D:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"set_bans","params":{"bans":[{"host":"192.168.1.51","ban":true,"seconds":30}]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"status": "OK",
"untrusted": false
}
}
banning by ip
In the following example, integer-formatted IP is banned:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"set_bans","params":{"bans":[{"ip":838969536,"ban":true,"seconds":30}]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"status": "OK"
}
}
Get list of banned IPs.
Alias: None.
Inputs: None.
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_bans"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"bans": [{
"host": "102.168.1.51",
"ip": 855746662,
"seconds": 22
},{
"host": "192.168.1.50",
"ip": 838969536,
"seconds": 28
}],
"status": "OK"
"untrusted": false
}
}
Flush tx ids from transaction pool
Alias: None.
Inputs:
Outputs:
Example:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"flush_txpool","params":{"txids":["dc16fa8eaffe1484ca9014ea050e13131d3acf23b419f33bb4cc0b32b6c49308",""]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"status": "OK"
}
}
Get a histogram of output amounts. For all amounts (possibly filtered by parameters), gives the number of outputs on the chain for that amount. RingCT outputs counts as 0 amount.
Inputs:
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_output_histogram","params":{"amounts":[20000000000]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"credits": 0,
"histogram": [{
"amount": 20000000000,
"recent_instances": 0,
"total_instances": 381477,
"unlocked_instances": 0
}],
"status": "OK",
"top_hash": "",
"untrusted": false
}
}
Get the coinbase amount and the fees amount for n last blocks starting at particular height
Alias: None.
Inputs:
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_coinbase_tx_sum","params":{"height":1563078,"count":2}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"credits": 0,
"emission_amount": 9471836197320,
"emission_amount_top64": 0,
"fee_amount": 0,
"fee_amount_top64": 0,
"status": "OK",
"top_hash": "",
"untrusted": false,
"wide_emission_amount": "0x89d556e91c8",
"wide_fee_amount": "0x0"
}
}
Give the node current version
Alias: None.
Inputs: None.
Outputs:
true
), or not (false
)true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_version"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"release": true,
"status": "OK",
"untrusted": false,
"version": 196613
}
Gives an estimation on fees per byte.
Alias: None.
Inputs:
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_fee_estimate"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"credits": 0,
"fee": 7874,
"quantization_mask": 10000,
"status": "OK",
"top_hash": "",
"untrusted": false
}
}
Display alternative chains seen by the node.
Alias: None.
Inputs: None.
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_alternate_chains"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"chains": [{
"block_hash": "dd4998cfe92a959a5a0e4ed72432cf23d7dfc4179cbea871ee2a705d71fb5e25",
"block_hashes": ["dd4998cfe92a959a5a0e4ed72432cf23d7dfc4179cbea871ee2a705d71fb5e25"],
"difficulty": 86227995333492079,
"difficulty_top64": 0,
"height": 2286736,
"length": 1,
"main_chain_parent_block": "6da3d2dc86ccc9353d19fc6b05083125f4ca7d22540d938010462f197a3fe590",
"wide_difficulty": "0x13257e7a78bfd6f"
}],
"status": "OK",
"untrusted": false
}
}
Relay a list of transaction IDs.
Alias: None.
Inputs:
Outputs:
Example:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"relay_tx","params":{"txids":["9fd75c429cbe52da9a52f2ffc5fbd107fe7fd2099c0d8de274dc8a67e0c98613"]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"status": "OK"
}
}
Get synchronisation informations
Alias: None.
Inputs: None.
Outputs:
. = requested but not received
, o = set received
, m = received set that matches the next blocks needed
Example:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sync_info"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"credits": 0,
"height": 2287210,
"next_needed_pruning_seed": 0,
"overview": "[]",
"peers": [{
"info": {
"address": "51.79.49.41:44317",
"address_type": 1,
"avg_download": 0,
"avg_upload": 1,
"connection_id": "718a970773e844618f3b830aa5775a45",
"current_download": 0,
"current_upload": 1,
"height": 1,
"host": "51.79.49.41",
"incoming": true,
"ip": "51.79.49.41",
"live_time": 26,
"local_ip": false,
"localhost": false,
"peer_id": "c1d50bcd29c89909",
"port": "44317",
"pruning_seed": 0,
"recv_count": 468,
"recv_idle_time": 5,
"rpc_credits_per_hash": 0,
"rpc_port": 0,
"send_count": 35347,
"send_idle_time": 3,
"state": "normal",
"support_flags": 1
}
},{
"info": {
...
}
},{
...
},{
...
},{
...
}],
"status": "OK",
"target_height": 2287203,
"top_hash": "",
"untrusted": false
}
}
Get all transaction pool backlog
Alias: None.
Inputs: None.
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_txpool_backlog"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"backlog": "...Binary...",
"status": "OK",
"untrusted": false
}
}
Alias: None.
Inputs:
false
) States if the result should be cumulative (true
) or not (false
)Outputs:
Example:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_output_distribution","params":{"amounts":[628780000],"from_height":1462078}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"distributions": [{
"amount": 2628780000,
"base": 0,
"distribution": "",
"start_height": 1462078
}],
"status": "OK"
}
}
Calculate PoW hash for a block candidate.
Alias: None.
Inputs:
Outputs:
Example:
$ curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"calc_pow","params":{"major_version":14,"height":2286447,"block_blob":"0e0ed286da8006ecdc1aab3033cf1716c52f13f9d8ae0051615a2453643de94643b550d543becd0000000002abc78b0101ffefc68b0101fcfcf0d4b422025014bb4a1eade6622fd781cb1063381cad396efa69719b41aa28b4fce8c7ad4b5f019ce1dc670456b24a5e03c2d9058a2df10fec779e2579753b1847b74ee644f16b023c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000051399a1bc46a846474f5b33db24eae173a26393b976054ee14f9feefe99925233802867097564c9db7a36af5bb5ed33ab46e63092bd8d32cef121608c3258edd55562812e21cc7e3ac73045745a72f7d74581d9a0849d6f30e8b2923171253e864f4e9ddea3acb5bc755f1c4a878130a70c26297540bc0b7a57affb6b35c1f03d8dbd54ece8457531f8cba15bb74516779c01193e212050423020e45aa2c15dcb","seed_hash":"d432f499205150873b2572b5f033c9c6e4b7c6f3394bd2dd93822cd7085e7307"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": "d0402d6834e26fb94a9ce38c6424d27d2069896a9b8b1ce685d79936bca6e0a8"
}
Not all daemon RPC calls use the JSON_RPC interface. This section gives examples of these calls.
The data structure for these calls is different than the JSON RPC calls. Whereas the JSON RPC methods were called using the /json_rpc
extension and specifying a method, these methods are called at their own extensions. For example:
IP=127.0.0.1
PORT=18081
METHOD='gettransactions'
PARAMS='{"txs_hashes":["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"]}'
curl \
http://$IP:$PORT/$METHOD \
-d $PARAMS \
-H 'Content-Type: application/json'
Note: It is recommended to use JSON RPC where such alternatives exist, rather than the following methods. For example, the recommended way to get a node's height is via the JSON RPC methods get_info or get_last_block_header, rather than getheight below.
For calls that end with .bin, the data is exchanged in the form of binary, serialized objects, as defined in the Core RPC Server.
Get the node's current height.
Alias: /getheight.
Inputs: None.
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)$ curl http://127.0.0.1:18081/get_height -H 'Content-Type: application/json'
{
"hash": "7e23a28cfa6df925d5b63940baf60b83c0cbb65da95f49b19e7cf0ce7dd709ce",
"height": 2287217,
"status": "OK",
"untrusted": false
}
Get all blocks info. Binary request.
Alias: /getblocks.bin.
Inputs:
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Get blocks by height. Binary request.
Alias: /getblocks_by_height.bin.
Inputs:
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Get hashes. Binary request.
Alias: /gethashes.bin.
Inputs:
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Get global outputs of transactions. Binary request.
Alias: None.
Inputs:
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Get outputs. Binary request.
Alias: None.
Inputs:
Outputs:
false
) or not (true
)true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Look up one or more transactions by hash.
Alias: /gettransactions.
Inputs:
false
by default). If set true
, the returned transaction information will be decoded rather than binary.false
by default).Outputs:
true
) or not (false
)true
) or included in a block (false
)Example 1: Return transaction information in binary format.
$ curl http://127.0.0.1:18081/get_transactions -d '{"txs_hashes":["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"]}' -H 'Content-Type: application/json'
{
"credits": 0,
"status": "OK",
"top_hash": "",
"txs": [{
"as_hex": "...",
"as_json": "",
"block_height": 993442,
"block_timestamp": 1457749396,
"double_spend_seen": false,
"in_pool": false,
"output_indices": [198769,418598,176616,50345,509],
"prunable_as_hex": "",
"prunable_hash": "0000000000000000000000000000000000000000000000000000000000000000",
"pruned_as_hex": "",
"tx_hash": "d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"
}],
"txs_as_hex": ["..."],
"untrusted": false
}
Example 2: Decode returned transaction information in JSON format. Note: the "vin", "vout" and "signatures" list have been truncated in the displayed return for space considerations.
$ curl http://127.0.0.1:18081/get_transactions -d '{"txs_hashes":["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"],"decode_as_json":true}' -H 'Content-Type: application/json'
{
"credits": 0,
"status": "OK",
"top_hash": "",
"txs": [{
"as_hex": "...",
"as_json": "{\n \"version\": 1, \n \"unlock_time\": 0, \n \"vin\": [ {\n \"key\": {\n \"amount\": 9999999999, \n \"key_offsets\": [ 691\n ], \n \"k_image\": \"6ebee1b651a8da723462b4891d471b990ddc226049a0866d3029b8e2f75b7012\"\n }\n }, {\n \"key\": {\n \"amount\": 9000000000000, \n \"key_offsets\": [ 175760\n ], \n \"k_image\": \"200bd02b70ee707441a8863c5279b4e4d9f376dc97a140b1e5bc7d72bc508069\"\n }\n }, ... \n ], \n \"vout\": [ {\n \"amount\": 60000000000, \n \"target\": {\n \"key\": \"8c792dea94dab48160e067fb681edd6247ba375281fbcfedc03cb970f3b98e2d\"\n }\n }, {\n \"amount\": 700000000000, \n \"target\": {\n \"key\": \"1ab33e69737e157d23e33274c42793be06a8711670e73fa10ecebc604f87cc71\"\n }\n }, ... \n ], \n \"extra\": [ 1, 3, 140, 109, 156, 205, 47, 148, 153, 9, 17, 93, 83, 33, 162, 110, 152, 1, 139, 70, 121, 19, 138, 10, 44, 6, 55, 140, 242, 124, 143, 219, 172\n ], \n \"signatures\": [ \"fd82214a59c99d9251fa00126d353f9cf502a80d8993a6c223e3c802a40ab405555637f495903d3ba558312881e586d452e6e95826d8e128345f6c0a8f9f350e\", \"8c04ef50cf34afa3a9ec19c457143496f8cf7045ed869b581f9efa2f1d65e30f1cec5272b00e9c61a34bdd3c78cf82ae8ef4df3132f70861391069b9c255cd08\", ... ]\n}",
"block_height": 993442,
"block_timestamp": 1457749396,
"double_spend_seen": false,
"in_pool": false,
"output_indices": [198769,418598,176616,50345,509],
"tx_hash": "d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"
}],
"txs_as_hex": ["..."],
"txs_as_json": ["{\n \"version\": 1, \n \"unlock_time\": 0, \n \"vin\": [ {\n \"key\": {\n \"amount\": 9999999999, \n \"key_offsets\": [ 691\n ], \n \"k_image\": \"6ebee1b651a8da723462b4891d471b990ddc226049a0866d3029b8e2f75b7012\"\n }\n }, {\n \"key\": {\n \"amount\": 9000000000000, \n \"key_offsets\": [ 175760\n ], \n \"k_image\": \"200bd02b70ee707441a8863c5279b4e4d9f376dc97a140b1e5bc7d72bc508069\"\n }\n }, ... \n ], \n \"vout\": [ {\n \"amount\": 60000000000, \n \"target\": {\n \"key\": \"8c792dea94dab48160e067fb681edd6247ba375281fbcfedc03cb970f3b98e2d\"\n }\n }, {\n \"amount\": 700000000000, \n \"target\": {\n \"key\": \"1ab33e69737e157d23e33274c42793be06a8711670e73fa10ecebc604f87cc71\"\n }\n }, ... \n ], \n \"extra\": [ 1, 3, 140, 109, 156, 205, 47, 148, 153, 9, 17, 93, 83, 33, 162, 110, 152, 1, 139, 70, 121, 19, 138, 10, 44, 6, 55, 140, 242, 124, 143, 219, 172\n ], \n \"signatures\": [ \"fd82214a59c99d9251fa00126d353f9cf502a80d8993a6c223e3c802a40ab405555637f495903d3ba558312881e586d452e6e95826d8e128345f6c0a8f9f350e\", \"8c04ef50cf34afa3a9ec19c457143496f8cf7045ed869b581f9efa2f1d65e30f1cec5272b00e9c61a34bdd3c78cf82ae8ef4df3132f70861391069b9c255cd08\", ... ]\n}"],
"untrusted": false
}
Example 3: Returned a missed (unexisting) transaction.
curl http://127.0.0.1:18081/get_transactions -d '{"txs_hashes":["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090409"]}' -H 'Content-Type: application/json'
{
"credits": 0,
"missed_tx": ["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090409"],
"status": "OK",
"top_hash": "",
"untrusted": false
}
Get the known blocks hashes which are not on the main chain.
Alias: None.
Inputs: None
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/get_alt_blocks_hashes -H 'Content-Type: application/json'
{
"blks_hashes": ["dd4998cfe92a959a5a0e4ed72432cf23d7dfc4179cbea871ee2a705d71fb5e25","f36c3856ffde6a7d06fc832c80ede4ad5b6c8f702c9736dae1e2140d86504db9","8d0c1f806817259d213c8829ea3356334e0d8fdd3b118e1243756e12dce767bb"],
"credits": 0,
"status": "OK",
"top_hash": "",
"untrusted": false
}
Check if outputs have been spent using the key image associated with the output.
Alias: None.
Inputs:
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/is_key_image_spent -d '{"key_images":["8d1bd8181bf7d857bdb281e0153d84cd55a3fcaa57c3e570f4a49f935850b5e3","7319134bfc50668251f5b899c66b005805ee255c136f0e1cecbb0f3a912e09d4"]}' -H 'Content-Type: application/json'
{
"credits": 0,
"spent_status": [1,1],
"status": "OK",
"top_hash": "",
"untrusted": false
}
Broadcast a raw transaction to the network.
Alias: /sendrawtransaction.
Inputs:
false
).Outputs:
true
) or not (false
).true
) or OK (false
).true
) or valid (false
).true
) or valid (false
).true
) or OK (false
).true
) or a ring confidential transaction (false
).true
) or relayed (false
).true
) or not (false
).true
) or OK (false
).true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example (No return information included here.):
$ curl http://127.0.0.1:18081/send_raw_transaction -d '{"tx_as_hex":"de6a3...", "do_not_relay":false}' -H 'Content-Type: application/json'
Start mining on the daemon.
Alias: None.
Inputs:
true
) or foreground (false
).true
) or not (false
).Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/start_mining -d '{"do_background_mining":false,"ignore_battery":true,"miner_address":"47xu3gQpF569au9C2ajo5SSMrWji6xnoE5vhr94EzFRaKAGw6hEGFXYAwVADKuRpzsjiU1PtmaVgcjUJF89ghGPhUXkndHc","threads_count":1}' -H 'Content-Type: application/json'
{
"status": "OK",
"untrusted": false
}
Stop mining on the daemon.
Alias: None.
Inputs: None.
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/stop_mining -H 'Content-Type: application/json'
{
"status": "OK",
"untrusted": false
}
Get the mining status of the daemon.
Alias: None.
Inputs: None.
Outputs:
true
) or disabled (false
).true
) or foreground (false
).true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example while mining:
$ curl http://127.0.0.1:18081/mining_status -H 'Content-Type: application/json'
{
"active": true,
"address": "47xu3gQpF569au9C2ajo5SSMrWji6xnoE5vhr94EzFRaKAGw6hEGFXYAwVADKuRpzsjiU1PtmaVgcjUJF89ghGPhUXkndHc",
"bg_idle_threshold": 0,
"bg_ignore_battery": false,
"bg_min_idle_seconds": 0,
"bg_target": 0,
"block_reward": 1181637918707,
"block_target": 120,
"difficulty": 239928394679,
"difficulty_top64": 0,
"is_background_mining_enabled": false,
"pow_algorithm": "RandomX",
"speed": 23,
"status": "OK",
"threads_count": 1,
"untrusted": false,
"wide_difficulty": "0x37dcd8c3b7"
}
Example while not mining:
$ curl http://127.0.0.1:18081/mining_status -H 'Content-Type: application/json'
{
"active": false,
"address": "",
"bg_idle_threshold": 0,
"bg_ignore_battery": false,
"bg_min_idle_seconds": 0,
"bg_target": 0,
"block_reward": 0,
"block_target": 120,
"difficulty": 239928394679,
"difficulty_top64": 0,
"is_background_mining_enabled": false,
"pow_algorithm": "RandomX",
"speed": 0,
"status": "OK",
"threads_count": 0,
"untrusted": false,
"wide_difficulty": "0x37dcd8c3b7"
}
Save the blockchain. The blockchain does not need saving and is always saved when modified, however it does a sync to flush the filesystem cache onto the disk for safety purposes against Operating System or Hardware crashes.
Alias: None.
Inputs: None.
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/save_bc -H 'Content-Type: application/json'
{
"status": "OK",
"untrusted": false
}
Get the known peers list.
Alias: None.
Inputs: None.
Outputs:
Example (truncated lists):
$ curl http://127.0.0.1:18081/get_peer_list -H 'Content-Type: application/json'
{
"gray_list": [{
"host": "640304833",
"id": 5345237316225602120,
"ip": 640304833,
"last_seen": 1525540510,
"port": 18080
},{
"host": "2183731038",
"id": 14955030573998424430,
"ip": 2183731038,
"last_seen": 1525540499,
"port": 28080
}, ...
],
"status": "OK",
"white_list": [{
"host": "1221637955",
"id": 10354694710033118926,
"ip": 1221637955,
"last_seen": 1525540511,
"port": 18080
},{
"host": "1780407354",
"id": 17193661050352240890,
"ip": 1780407354,
"last_seen": 1525540510,
"port": 18080
}, ...
]
}
Set the log hash rate display mode.
Alias: None.
Inputs:
true
) or hidden (false
)Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example while mining:
$ curl http://127.0.0.1:18081/set_log_hash_rate -d '{"visible":true}' -H 'Content-Type: application/json'
{
"status": "OK"
"untrusted": false
}
Error while not mining:
$ curl http://127.0.0.1:18081/set_log_hash_rate -d '{"visible":true}' -H 'Content-Type: application/json'
{
"status": "NOT MINING",
"untrusted": false
}
Set the daemon log level.
By default, log level is set to 0
.
Alias: None.
Inputs:
0
(less verbose) to 4
(most verbose)Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/set_log_level -d '{"level":1}' -H 'Content-Type: application/json'
{
"status": "OK"
"untrusted": false
}
Set the daemon log categories.
Categories are represented as a comma separated list of <Category>:<level>
(similarly to syslog standard <Facility>:<Severity-level>
), where:
*:WARNING,net:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,stacktrace:INFO,logging:INFO,msgwriter:INFO
.
Setting the categories to "" prevent any logs to be outputed.Alias: None.
Inputs:
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example to set all facilities to Security Level Info
:
$ curl http://127.0.0.1:18081/set_log_categories -d '{"categories": "*:INFO"}' -H 'Content-Type: application/json'
{
"categories": "*:INFO",
"status": "OK",
"untrusted": false
}
Example without input to set the default categories:
$ curl http://127.0.0.1:18081/set_log_categories -H 'Content-Type: application/json'
{
"categories": "*:WARNING,net:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,stacktrace:INFO,logging:INFO,msgwriter:INFO",
"status": "OK"
"untrusted": false
}
Show information about valid transactions seen by the node but not yet mined into a block, as well as spent key image information for the txpool in the node's memory.
Alias: None.
Inputs: None.
Outputs:
true
) or not (false
).Example (Note: Some lists in the returned information have been truncated for display reasons):
$ curl http://127.0.0.1:18081/get_transaction_pool -H 'Content-Type: application/json'
{
"spent_key_images": [{
"id_hash": "a2af919609db4ff5ab8d4ba18502e647d521760e1cbc30288f06fa87bf9a0c1c",
"txs_hashes": ["1ee6a4873b638711795fc3b0b73fc7146505a09a7f4749534fd408d571a273cf"]
},{
"id_hash": "02d5f6559e9bca5ae5a335130aeeb05df2db518ab9837fa64ebbab276c100792",
"txs_hashes": ["531aacc0ceb8514cdde5f104285202ccc3e969c77584e3c6fa614c987c583965"]
},
...],
"status": "OK",
"transactions": [{
"blob_size": 13193,
"do_not_relay": false,
"double_spend_seen": false,
"fee": 9694360000,
"id_hash": "f8fb875cfc9e2e59bcf96a42474c79e01d50b69e6548d445d45984f7db66e50f",
"kept_by_block": false,
"last_failed_height": 0,
"last_failed_id_hash": "0000000000000000000000000000000000000000000000000000000000000000",
"last_relayed_time": 1525615049,
"max_used_block_height": 1564924,
"max_used_block_id_hash": "4bae7856979f46c7de31f3fb58cac36d4dfd2765bf33f876edf33d0e05ebb4a7",
"receive_time": 1525615049,
"relayed": true,
"tx_blob": " ... ",
"tx_json": "{\n \"version\": 2, \n \"unlock_time\": 0, \n \"vin\": [ {\n \"key\": {\n \"amount\": 0, \n \"key_offsets\": [ 2630347, 594429, 1047509, 758973, 464501, 61971, 22268\n ], \n \"k_image\": \"0731363c58dd4492f031fa20c82fe6ddcb9cc070d73938afe8a5f7f77897f8b4\"\n }\n }\n ], \n \"vout\": [ {\n \"amount\": 0, \n \"target\": {\n \"key\": \"f3b3dd09483616e343b9866eed50a0ce01d5c0d0f2612ce2c4d0e9cce5c218cd\"\n }\n }, {\n \"amount\": 0, \n \"target\": {\n \"key\": \"9796f2d477a696b6282bf3cb1a41cefba0c4604eedcc2e7a44904d7033643e0e\"\n }\n }\n ], \n \"extra\": [ 1, 25, 228, 80, 5, 214, 117, 150, 9, 125, 98, 17, 113, 208, 89, 223, 242, 227, 188, 197, 141, 190, 135, 140, 152, 117, 240, 150, 21, 93, 62, 108, 124\n ], \n \"rct_signatures\": {\n \"type\": 1, \n \"txnFee\": 9694360000, \n \"ecdhInfo\": [ {\n \"mask\": \"645f06a2816aecf83d5041c3320eb31092b994fb2733bb74c8c47e288d452c04\", \n \"amount\": \"3908f14d39dcb3831331cb255eeadc5b0aea0143645b9cd3034abf613995740d\"\n }, {\n \"mask\": \"0785b5df0a994b14d59da810503a022721d8f629720f526e15bd848ad3c2c509\", \n \"amount\": \"fbd81cf2368dcd742905ded5287457030467aaf5bc9939e13f1d6bf8d4c8ca09\"\n }], \n \"outPk\": [ \"c19f5fa052859126e0eed0e3c860aadab049677b2b3dd14cc74d02f92f1d013f\", \"1581ef6368de1608ea366566b88272db220479cf215f6d88d7b60ec221d11e0a\"]\n }, \n \"rctsig_prunable\": {\n \"rangeSigs\": [ {\n \"asig\": \" ... \", \n \"Ci\": \" .. \"\n }, {\n \"asig\": \" ... \", \n \"Ci\": \" ... \"\n }], \n \"MGs\": [ {\n \"ss\": [ [ \"218a10a29e0f66e5a324af67b7734708a8a4cc8f16b28acd8cda538aaa495a02\", \"b368b4e956df5808c5c257f0dc3f7eff8c28463d0bb20759d19977fa02d6f205\"], [ \"f741d2c96bc23b362b4155a03fb6f1351ab5bf4445a43b3e52ba776f526af305\", \"a10ad1ee80dce3f311dd3dc141803daeecaa4d2a25a390cd9c35e4161b7c9e0c\"],
...], \n \"cc\": \"e93801b707261ca76e146fdf2085abae71ad9203a00edc843c74f4ead8a39601\"\n }]\n }\n}"
},
...]
}
Get hashes from transaction pool. Binary request.
Alias: None.
Inputs: None.
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/get_transaction_pool_hashes.bin -H 'Content-Type: application/json'
{
"status": "OK",
"tx_hashes": " ... ",
"untrusted": false
}
Get the transaction pool statistics.
Alias: None.
Inputs: None.
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/get_transaction_pool_stats -H 'Content-Type: application/json'
{
"credits": 0,
"pool_stats": {
"bytes_max": 14325,
"bytes_med": 1460,
"bytes_min": 1450,
"bytes_total": 410674,
"fee_total": 18198895000,
"histo": [{ ...
}],
"histo_98pc": 297,
"num_10m": 1,
"num_double_spends": 1,
"num_failing": 0,
"num_not_relayed": 0,
"oldest": 1612232218,
"txs_total": 124
},
"status": "OK",
"top_hash": "",
"untrusted": false
}
Send a command to the daemon to safely disconnect and shut down.
Alias: None.
Inputs: None.
Outputs:
Example:
$ curl http://127.0.0.1:18081/stop_daemon -H 'Content-Type: application/json'
{
"status": "OK"
}
This method is a convenient backward support and should not be used anymore. See get_info JSON RPC for details.
Alias:
Get daemon bandwidth limits.
Alias: None.
Inputs: None.
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/get_limit -H 'Content-Type: application/json'
{
"limit_down": 8192,
"limit_up": 128,
"status": "OK",
"untrusted": false
}
Set daemon bandwidth limits.
Alias: None.
Inputs:
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/set_limit -d '{"limit_down": 1024}' -H 'Content-Type: application/json'
{
"limit_down": 1024,
"limit_up": 128,
"status": "OK"
"untrusted": false
}
Limit number of Outgoing peers.
Alias: None.
Inputs:
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/out_peers -d '{"out_peers": 3232235535}' -H 'Content-Type: application/json'
{
"out_peers": 3232235535,
"status": "OK",
"untrusted": false
}
Limit number of Incoming peers.
Alias: None.
Inputs:
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Example:
$ curl http://127.0.0.1:18081/out_peers -d '{"in_peers": 3232235535}' -H 'Content-Type: application/json'
{
"in_peers": 3232235535,
"status": "OK",
"untrusted": false
}
Obsolete. Conserved here for reference.
Alias: None.
Inputs: None.
Outputs:
Example:
$ curl http://127.0.0.1:18081/start_save_graph -H 'Content-Type: application/json'
{
"status": "OK"
}
Obsolete. Conserved here for reference.
Alias: None.
Inputs: None.
Outputs:
Example:
$ curl http://127.0.0.1:18081/stop_save_graph -H 'Content-Type: application/json'
{
"status": "OK"
}
Get outputs.
Alias: None.
Inputs:
true
, a txid will included for each output in the response.Outputs:
false
) or not (true
)true
), or when the daemon is fully synced and thus handles the RPC locally (false
)Update daemon.
Alias: None.
Inputs:
check
or download
Outputs:
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)true
) or not (false
)Example:
$ curl http://127.0.0.1:18081/update -d '{"command":"check"}' -H 'Content-Type: application/json'
{
"auto_uri": "",
"hash": "",
"path": "",
"status": "OK",
"untrusted": false,
"update": false,
"user_uri": "",
"version": ""
}