This is a list of the Blurd 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 BLUR according to the Blurd implementation. 1 BLUR = 1e12 atomic units.
(Guide updated as of network height of 429,811)
The majority of Blurd 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=52542
METHOD='get_block_header_by_height'
ALIAS='getblockheaderbyheight'
PARAMS='{"height":429811}'
curl \
-X POST http://$IP:$PORT/json_rpc \
-d '{"method":"'$METHOD'","params":'$PARAMS'}'
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:
Example:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"get_block_count"}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"count": 4,
"status": "OK"
}
}
Look up a block's hash by its height.
Alias: on_getblockhash.
Inputs:
Outputs:
Example:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"on_get_block_hash","params":[420000]}'
{
"id": "0",
"jsonrpc": "2.0",
"result": "61126b109f73f86d81cdf814ce3ebfebfa455409dd6835f1503885fcd77ccd86"
}
Get a block template on which mining a new block.
Alias: getblocktemplate.
Inputs:
Outputs:
true
), or when the daemon is fully synced (false
).Example:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"get_block_template","params":{"wallet_address":"bL2yv6tv5hGcS1L5WvPgu7VkVg525icyRRd2sCKNY5ZQACRHnoXNG6EJqTpatQZ9HAaDegZUYCKUPhkwGSfeWSxA2DBUtKpQh","reserve_size":60}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"blockhashing_blob": "0a0ac6a1a3e605e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f000000003b99f6e1bf4502a3a1c1e77d89a28b90d1ce264558ba8afa58e9cad68063347601",
"blocktemplate_blob": "0a0ac6a1a3e605e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f00000000018d9e1a01fff49d1a01c3baa3cfa3a301022c82c2a7b49551ba37754e2c7aa19ea6a0d896fbec6e044d3bb6e33ea3705a525f01cd059a08448965b9c41417543c734d07e895caae79d948474d372d0055af86ce023c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"difficulty": 115497497,
"expected_reward": 5610198850883,
"height": 429812,
"prev_hash": "e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f",
"reserved_offset": 129,
"status": "OK",
"untrusted": false
}
}
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 -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"submit_block","params":["0707e6bdfedc053771512f1bc27c62731ae9e8f2443db64ce742f4e57f5cf8d393de28551e441a0000000002fb830a01ffbf830a018cfe88bee283060274c0aae2ef5730e680308d9c00b6da59187ad0352efe3c71d36eeeb28782f29f2501bd56b952c3ddc3e350c2631d3a5086cac172c56893831228b17de296ff4669de020200000000"]'
{
"id": "0",
"jsonrpc": "2.0",
"error": {
"code": -7,
"message": "Block not accepted"
}
}
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 (false
).In this example, the most recent block (429811 at the time) is returned:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"get_last_block_header"}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"block_header": {
"block_size": 85,
"depth": 0,
"difficulty": 115525980,
"hash": "e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f",
"height": 429811,
"major_version": 10,
"minor_version": 10,
"nonce": 4228969614,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "c9fe516b38bfcf3fec9e5b77ee638de3f9700249a4cf1b114a120f2d16000000",
"prev_hash": "152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c",
"reward": 5610204201190,
"timestamp": 1556664436
},
"status": "OK",
"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 (false
).In this example, block 429811 is looked up by its hash:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"get_block_header_by_hash","params":{"hash":"e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f"}}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"block_header": {
"block_size": 85,
"depth": 7,
"difficulty": 115525980,
"hash": "e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f",
"height": 429811,
"major_version": 10,
"minor_version": 10,
"nonce": 4228969614,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "c9fe516b38bfcf3fec9e5b77ee638de3f9700249a4cf1b114a120f2d16000000",
"prev_hash": "152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c",
"reward": 5610204201190,
"timestamp": 1556664436
},
"status": "OK",
"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 (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 -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"get_block_header_by_height","params":{"height":429811}}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"block_header": {
"block_size": 85,
"depth": 3,
"difficulty": 115525980,
"hash": "e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f",
"height": 429811,
"major_version": 10,
"minor_version": 10,
"nonce": 4228969614,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "c9fe516b38bfcf3fec9e5b77ee638de3f9700249a4cf1b114a120f2d16000000",
"prev_hash": "152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c",
"reward": 5610204201190,
"timestamp": 1556664436
},
"status": "OK",
"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 (false
).In this example, blocks range from height 429811 to 429814 is looked up (notice that the returned informations are ascending order and that it is at the April 2018 network upgrade time):
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"get_block_headers_range","params":{"start_height":429811,"end_height":429814}}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"headers": [
{
"block_size": 85,
"depth": 26,
"difficulty": 115525980,
"hash": "e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f",
"height": 429811,
"major_version": 10,
"minor_version": 10,
"nonce": 4228969614,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "c9fe516b38bfcf3fec9e5b77ee638de3f9700249a4cf1b114a120f2d16000000",
"prev_hash": "152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c",
"reward": 5610204201190,
"timestamp": 1556664436
},
{
"block_size": 85,
"depth": 25,
"difficulty": 115497497,
"hash": "29293c6a76a57cf4a4368ea52e67121d92b70a34deb0da40b7c055e7389a1371",
"height": 429812,
"major_version": 10,
"minor_version": 10,
"nonce": 952654155,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "c6982fd83a2abd3f8b479d60987b770246305c7ac51130cd10ac526f23000000",
"prev_hash": "e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f",
"reward": 5610198850883,
"timestamp": 1556664691
},
{
"block_size": 85,
"depth": 24,
"difficulty": 103344002,
"hash": "66a34433d2168e885df2a2ff890e1e49e3156357d3dcc4843e1f502a4a6428ff",
"height": 429813,
"major_version": 10,
"minor_version": 10,
"nonce": 53516223,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "c0cf57cd367a65ea6671061d7be96caff7b618cb5eb6f09723441cb625000000",
"prev_hash": "29293c6a76a57cf4a4368ea52e67121d92b70a34deb0da40b7c055e7389a1371",
"reward": 5610193500580,
"timestamp": 1556664700
},
{
"block_size": 85,
"depth": 23,
"difficulty": 106253270,
"hash": "73f9cec7fb41f0abd15c5548b34640da92ae9f2504fd86546fd660c8771e99f2",
"height": 429814,
"major_version": 10,
"minor_version": 10,
"nonce": 1196796717,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "d576cbb87dfef79a9365181b962ed552677ab0c8770ef288612635d90a000000",
"prev_hash": "66a34433d2168e885df2a2ff890e1e49e3156357d3dcc4843e1f502a4a6428ff",
"reward": 5610188150283,
"timestamp": 1556664945
}
],
"status": "OK",
"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 (false
).Look up by height:
In the following example, block 429811 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 -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"get_block","params":{"height":429811}}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"blob": "0a0af4a0a3e605152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c8ef410fc018c9e1a01fff39d1a01e681ead1a3a301026908be5bb4427b716e50cf2cc179dafbabea4ac7b89dbd3cbd631ce873e563ef2101c8be6c6c0c010f4fa7d981fe5080408dce775d38ff51ad47bb0ad64e6c9c9a910000",
"block_header": {
"block_size": 85,
"depth": 26,
"difficulty": 115525980,
"hash": "e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f",
"height": 429811,
"major_version": 10,
"minor_version": 10,
"nonce": 4228969614,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "c9fe516b38bfcf3fec9e5b77ee638de3f9700249a4cf1b114a120f2d16000000",
"prev_hash": "152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c",
"reward": 5610204201190,
"timestamp": 1556664436
},
"json": "{\n \"major_version\": 10, \n \"minor_version\": 10, \n \"timestamp\": 1556664436, \n \"prev_id\": \"152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c\", \n \"nonce\": 4228969614, \n \"miner_tx\": {\n \"version\": 1, \n \"unlock_time\": 429836, \n \"vin\": [ {\n \"gen\": {\n \"height\": 429811\n }\n }\n ], \n \"vout\": [ {\n \"amount\": 5610204201190, \n \"target\": {\n \"key\": \"6908be5bb4427b716e50cf2cc179dafbabea4ac7b89dbd3cbd631ce873e563ef\"\n }\n }\n ], \n \"extra\": [ 1, 200, 190, 108, 108, 12, 1, 15, 79, 167, 217, 129, 254, 80, 128, 64, 141, 206, 119, 93, 56, 255, 81, 173, 71, 187, 10, 214, 78, 108, 156, 154, 145\n ], \n \"rct_signatures\": {\n \"type\": 0\n }\n }, \n \"tx_hashes\": [ ]\n}",
"miner_tx_hash": "59e4508bc9efb495e6d091023bffefc8e9177a5aa0209aa3c13a711e09885c42",
"status": "OK",
"untrusted": false
}
}
Look up by hash:
In the following example, block 429811 is looked up by its hash. Note that block 429811 has 1 non-coinbase transaction:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"get_block","params":{"hash":"e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f"}}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"blob": "0a0af4a0a3e605152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c8ef410fc018c9e1a01fff39d1a01e681ead1a3a301026908be5bb4427b716e50cf2cc179dafbabea4ac7b89dbd3cbd631ce873e563ef2101c8be6c6c0c010f4fa7d981fe5080408dce775d38ff51ad47bb0ad64e6c9c9a910000",
"block_header": {
"block_size": 85,
"depth": 26,
"difficulty": 115525980,
"hash": "e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f",
"height": 429811,
"major_version": 10,
"minor_version": 10,
"nonce": 4228969614,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "c9fe516b38bfcf3fec9e5b77ee638de3f9700249a4cf1b114a120f2d16000000",
"prev_hash": "152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c",
"reward": 5610204201190,
"timestamp": 1556664436
},
"json": "{\n \"major_version\": 10, \n \"minor_version\": 10, \n \"timestamp\": 1556664436, \n \"prev_id\": \"152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c\", \n \"nonce\": 4228969614, \n \"miner_tx\": {\n \"version\": 1, \n \"unlock_time\": 429836, \n \"vin\": [ {\n \"gen\": {\n \"height\": 429811\n }\n }\n ], \n \"vout\": [ {\n \"amount\": 5610204201190, \n \"target\": {\n \"key\": \"6908be5bb4427b716e50cf2cc179dafbabea4ac7b89dbd3cbd631ce873e563ef\"\n }\n }\n ], \n \"extra\": [ 1, 200, 190, 108, 108, 12, 1, 15, 79, 167, 217, 129, 254, 80, 128, 64, 141, 206, 119, 93, 56, 255, 81, 173, 71, 187, 10, 214, 78, 108, 156, 154, 145\n ], \n \"rct_signatures\": {\n \"type\": 0\n }\n }, \n \"tx_hashes\": [ ]\n}",
"miner_tx_hash": "59e4508bc9efb495e6d091023bffefc8e9177a5aa0209aa3c13a711e09885c42",
"status": "OK",
"untrusted": false
}
}
Retrieve information about incoming and outgoing connections to your node.
Alias: None.
Inputs: None.
Outputs:
Following is an example ofget_connections
and it's return:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"get_connections"}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"connections": [
{
"address": "45.79.85.65:52541",
"avg_download": 4,
"avg_upload": 2,
"connection_id": "ce119c03b28d9f4c05e8c48db8790154",
"current_download": 2,
"current_upload": 1,
"height": 429840,
"host": "45.79.85.65",
"incoming": false,
"ip": "45.79.85.65",
"live_time": 5,
"local_ip": false,
"localhost": false,
"peer_id": "5b60df46b90a1f9d",
"port": "52541",
"recv_count": 24572,
"recv_idle_time": 4,
"send_count": 11344,
"send_idle_time": 4,
"state": "state_normal",
"support_flags": 1
},
{
"address": "212.71.234.44:52541",
"avg_download": 3,
"avg_upload": 0,
"connection_id": "75f4706e6d8e23bf3b71e52f02f0fe3e",
"current_download": 2,
"current_upload": 0,
"height": 429840,
"host": "212.71.234.44",
"incoming": false,
"ip": "212.71.234.44",
"live_time": 6,
"local_ip": false,
"localhost": false,
"peer_id": "297d552575a558a3",
"port": "52541",
"recv_count": 24568,
"recv_idle_time": 5,
"send_count": 1348,
"send_idle_time": 5,
"state": "state_normal",
"support_flags": 1
},
{
"address": "45.33.92.232:52541",
"avg_download": 4,
"avg_upload": 0,
"connection_id": "80967188e69616cca4071b4b4cf51567",
"current_download": 2,
"current_upload": 0,
"height": 429840,
"host": "45.33.92.232",
"incoming": false,
"ip": "45.33.92.232",
"live_time": 6,
"local_ip": false,
"localhost": false,
"peer_id": "6371e6a1c81c9e17",
"port": "52541",
"recv_count": 24998,
"recv_idle_time": 5,
"send_count": 1465,
"send_idle_time": 6,
"state": "state_normal",
"support_flags": 1
}
],
"status": "OK"
}
}
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 online (false
).true
) or not (false
).true
) or not (false
).true
), or when the daemon is fully synced (false
).Following is an exampleget_info
call and its return:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"get_info"}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"alt_blocks_count": 0,
"block_size_limit": 600000,
"block_size_median": 85,
"bootstrap_daemon_address": "",
"cumulative_difficulty": 7240811386970,
"difficulty": 84498252,
"free_space": 14855622656,
"grey_peerlist_size": 288,
"height": 429840,
"height_without_bootstrap": 429840,
"incoming_connections_count": 0,
"mainnet": true,
"offline": false,
"outgoing_connections_count": 4,
"rpc_connections_count": 1,
"stagenet": false,
"start_time": 1556666776,
"status": "OK",
"target": 60,
"target_height": 429840,
"testnet": false,
"top_block_hash": "c86b4f4bf7e500f841fb7a4fa77ccdc61e086e3d606906b8b176507f6d5b14b1",
"tx_count": 2220,
"tx_pool_size": 0,
"untrusted": false,
"version": "0.1.9.6",
"was_bootstrap_ever_used": false,
"white_peerlist_size": 112
}
}
Look up information regarding hard fork voting and readiness.
Alias: None.
Inputs: None.
Outputs:
Example:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"hard_fork_info"}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"earliest_height": 342000,
"enabled": true,
"state": 2,
"status": "OK",
"threshold": 0,
"untrusted": false,
"version": 10,
"votes": 10080,
"voting": 10,
"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 -X POST http://127.0.0.1:52542/json_rpc -d '{"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"
}
}
banning by ip
In the following example, integer-formatted IP is banned:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"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:
Example:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"get_bans"}'
{
"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"
}
}
Flush tx ids from transaction pool
Alias: None.
Inputs:
Outputs:
Example:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"flush_txpool","params":{"txids":["dc16fa8eaffe1484ca9014ea050e13131d3acf23b419f33bb4cc0b32b6c49308",""]}}'
{
"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 (false
).Example:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"get_output_histogram","params":{"amounts":[5610054394505]}}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"histogram": [
{
"amount": 5610054394505,
"recent_instances": 0,
"total_instances": 0,
"unlocked_instances": 0
}
],
"status": "OK",
"untrusted": false
}
}
Get the coinbase ammount and the fees ammount for n last blocks starting at particular height
Alias: None.
Inputs:
Outputs:
Example:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"get_coinbase_tx_sum","params":{"height":421000,"count":3}}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"emission_amount": 16972617018662,
"fee_amount": 0,
"status": "OK"
}
}
Give the node current version
Alias: None.
Inputs: None.
Outputs:
true
), or when the daemon is fully synced (false
).Example:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"get_version"}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"status": "OK",
"untrusted": false,
"version": 65555
}
}
Gives an estimation on fees per kB.
Alias: None.
Inputs:
Outputs:
true
), or when the daemon is fully synced (false
).Example:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"get_fee_estimate"}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"fee": 224410000,
"status": "OK",
"untrusted": false
}
}
Display alternative chains seen by the node.
Alias: None.
Inputs: None.
Outputs:
Example:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"get_alternate_chains"}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"status": "OK"
}
}
Relay a list of transaction IDs.
Alias: None.
Inputs:
Outputs:
Example:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"relay_tx","params":{"txids":[9fd75c429cbe52da9a52f2ffc5fbd107fe7fd2099c0d8de274dc8a67e0c98613]}}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"status": "OK"
}
}
Get synchronisation informations
Alias: None.
Inputs: None.
Outputs:
Example:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"sync_info"}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"height": 429841,
"peers": [
{
"info": {
"address": "45.79.85.65:52541",
"avg_download": 0,
"avg_upload": 0,
"connection_id": "ce119c03b28d9f4c05e8c48db8790154",
"current_download": 2,
"current_upload": 1,
"height": 429841,
"host": "45.79.85.65",
"incoming": false,
"ip": "45.79.85.65",
"live_time": 514,
"local_ip": false,
"localhost": false,
"peer_id": "5b60df46b90a1f9d",
"port": "52541",
"recv_count": 171000,
"recv_idle_time": 32,
"send_count": 67472,
"send_idle_time": 32,
"state": "state_normal",
"support_flags": 1
}
},
{
"info": {
"address": "212.71.234.44:52541",
"avg_download": 0,
"avg_upload": 0,
"connection_id": "75f4706e6d8e23bf3b71e52f02f0fe3e",
"current_download": 2,
"current_upload": 0,
"height": 429841,
"host": "212.71.234.44",
"incoming": false,
"ip": "212.71.234.44",
"live_time": 515,
"local_ip": false,
"localhost": false,
"peer_id": "297d552575a558a3",
"port": "52541",
"recv_count": 171500,
"recv_idle_time": 32,
"send_count": 90416,
"send_idle_time": 32,
"state": "state_normal",
"support_flags": 1
}
},
{
"info": {
"address": "45.33.92.232:52541",
"avg_download": 0,
"avg_upload": 0,
"connection_id": "80967188e69616cca4071b4b4cf51567",
"current_download": 2,
"current_upload": 0,
"height": 429841,
"host": "45.33.92.232",
"incoming": false,
"ip": "45.33.92.232",
"live_time": 515,
"local_ip": false,
"localhost": false,
"peer_id": "6371e6a1c81c9e17",
"port": "52541",
"recv_count": 171762,
"recv_idle_time": 32,
"send_count": 79333,
"send_idle_time": 32,
"state": "state_normal",
"support_flags": 1
}
}
],
"status": "OK",
"target_height": 429840
}
}
Get all transaction pool backlog
Alias: None.
Inputs: None.
Outputs:
true
), or when the daemon is fully synced (false
).Example:
$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"get_txpool_backlog"}'
{
"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 -X POST http://127.0.0.1:52542/json_rpc -d '{"method":"get_output_distribution","params":{"amounts":[628780000],"from_height":1462078}}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"distributions": [{
"amount": 2628780000,
"base": 0,
"distribution": "",
"start_height": 1462078
}],
"status": "OK"
}
}
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=52542
METHOD='gettransactions'
PARAMS='{"txs_hashes":["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"]}'
curl \
-X POST http://$IP:$PORT/$METHOD \
-d $PARAMS
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 (false
).$ curl -X POST http://127.0.0.1:52542/get_height
{
"height": 429811,
"status": "OK",
"untrusted": false
}
Get all blocks info. Binary request.
Alias: /getblocks.bin.
Inputs:
Outputs:
true
), or when the daemon is fully synced (false
).Get blocks by height. Binary request.
Alias: /getblocks_by_height.bin.
Inputs:
Outputs:
true
), or when the daemon is fully synced (false
).Get hashes. Binary request.
Alias: /gethashes.bin.
Inputs:
Outputs:
true
), or when the daemon is fully synced (false
).Get global outputs of transactions. Binary request.
Alias: None.
Inputs:
Outputs:
true
), or when the daemon is fully synced (false
).Get outputs. Binary request.
Alias: None.
Inputs:
Outputs:
false
) or not (true
)true
), or when the daemon is fully synced (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 -X POST http://127.0.0.1:52542/get_transactions -d '{"txs_hashes":["4f34ac178f15b392d9a08afa25b2f9ba03ce71b3badc878fc4e562be166b1218"]}'
{
"status": "OK",
"txs": [
{
"as_hex": "010002020005f5dc06f68210999f03a619ac2379b1ed3700d2bf2727a743b5f6c5853cc453d10ad612d30bd709d753b242782b020005819a0e92fe02ed9409d1092324f42e89154fa6ee34239d005db1d9aa5fcfad87480dbfaf8c043d650362637402000272ef3b4cab54932750415a330da2bab94dc7e924b68b07622272769dfee966b40002f0ca073373e04f28c17621e4f1da0c1473fe19e3da7eefddfec5c3344ec82ccc440221000cd5f71acbee9bd8861c82bcc16f2e1f15906ad49d0b8fabec4ad734afcd6f43015942ede1687aec409af0edd8beed6abf13e838fae69b248a51d68d4081d2356c04f0d598c102db07e30c0cf40a67af4863a91d2e07f4c4bfcce4faf48d59b731149e8bb03d060dac7a93fd4dbae80a5b0f2d4c3d3f5f6817833a2b4ada377631abdfc676900087371f8ccba17fcc4510a2fc4e506214143c5477ed0e287d88de5bbaa3688e0c6b4b849bc04e77345008466109b7092b4db6d54dcfb04bb1fa50c9fd898b950abe70a0a44cc87abb7cc34a7c2cb9a89949158c0e535a400aea20640118d70a798f694cbb80b8eb04d23aa3e6fe921149d9182f4b27bce9457475de0822ea7b470a85f6bf205a5bc0668871f954c2bf9d69f6b8fab3baf7da6530e44512372e83c68ec7289e8fcb3558787b165d31c4477c394de5604389a27752a286ed9f2cdc6b215ec0ab0b3d637ad668d061de9ab33471d03cb54930eb38334ac525f540c66cb4890a61f1dd44b2877c3d43e398f4832f3853764e809dda37f77373252d6f27cc7855e2c53712850c6c3be549813740a3b683f06208ad3bd04e36d0d7ab07069f1acf22cf2f3aea3996654d62539bcf72f3ec4287b6652eb975b446964302067d739de193961a7d301ee250b78b6fb1416cd81d416d458c492d7f9a591ad775af0ac8de629661c9604b4e27f546bbbaa31a00ace1c376b09108c9d9dc18d3f9f92b9333ac810303b8e6c26cb554abb17b9c9db5b89dbd0b2d88d0796c171dcec14cd382cfce21c64a7e91c4ec71a43c889753563cc9ba9281738a1748cce7ceeacafcdc049201dc5b8d29c58bbca602295e723ec16a9b892492c077f7e7aa12e93acb186e58a3f37a6641feedff928d9c490e09f3e94cd79e014cbfa6b5490106a456e34c1e758f62ced7fcecb5338db514ccb4285630eca77f7aa3651894f2664849572bedd7d9b765c71616432f13330e60dba01af390e2680e26a30aa3d74ff143fa174d7610b7d701609049ae8b04ec159f2e74785b928a88f292358c594a6fa4e1a2798a0a8e7c26d5791abc9bb36de332a1ab1017c0b21dc2e0390d5b1a75309ed598976b89d8bbe6d75642fdc6b7fd061947f805ab356f5a30371645fb0e776b8c3f8c47691e30ba37cc853c8e097d4fa22282fff81007390e3de89596c5dab1394bf936b0621db1f66b60b834fcc1aecf906a5419b0727b9b6cbe9f0e5a07c50a6317368b5c14eb15bb7aed0e1c59ec3f6fc3c67b53ffed6cfc485b0b1b0c438b12e8dbe80526596036d9fb2b0a6010721d4835806ef69ce5e59bed01433df52dca637426b0cce7aeeb8046bd5b90c3f6a9ad2eb214b9b903ba623e9e8b65e115d8fb0fb720681c1a36556ed8b87efdf07e867b0039c90e2db44bc2e4170bc3f8506b335b7ff849d69ae4e229472db03b912188923ffd12b49fbaf322463a22f5978657225cf1ca3ca2240cd9f7fef2a85490694407f52faf78fdd168605179a321fd93905ecf42dbec86282668b4e5a0925a8cc53b5f65175c2d700329c991c0548d0be6f2a20e1ac1cf38c1a48f79b08cd4c8109fdfc1c49502990506c7824dc4d826e6ddc3315ffa71a21741318e7b71e8b16e9e65b8c3d48c6c99ecac64388b41cddc9b8582b339b2f40d7467ce1d6ac73820470b8b51237d155f609cdca85eb114e38f257e073667e5b49eba677f29ab94eb68e95012df93a4cb12c0c8bd7af7163005970b20da5744f75fcea0934998aa2c0cbb783ff0219f521ca9137cd8a566786a93aeb4de4a117b4a2835fc8f6dbe695a4e44b77206efc60cbf77bc2b04bff92dd5921aeac5766fa31a74e91f0dd689ec13f6e3839a4a326e063eec87c0e5ad6b9c74636689441894bfbaeb4a2f99362b8f58b7771ce215c7a78f4fc534fd5204ccf5c201b2e6004bd6ddb47dd4176f1dfb22377470cf7e0b3ca4f225d4971e2e2f889415a06aac0a0b1ba48ebd09ec77c21d03ff45b4fc8c2743a01086b2c5d2c2445ca9098ff8cdda70eca3ff1b42c0a21cf270c7cb4e0329922df5ed509ba6e39eb43566971278fa344f131ddbae0f0fbb3898d8496317cc1a54d4dff82bd75a6ec78854e3e93131799e230a5cec2aeb05802c7aa199a81251fd491894cb3920d72898de5293e36de525af6336b2a9a8a70ab742c10360019c0005ac7e1616409df9f3e753551d3d0ea624f65317799a013bb8360ca6420914a94c46c54e55ff1e0d2e6e91db770dfc8049b1419cbe9c34d5bda77e647503ee2cd5492d21eb088ad2cf9be8297783395ca54531d434651751b82e1ee79907458dca88655f80a9774c01fb8563e64336432b68d494e2932f1d978b21500d008d7d4f186a50486b4e7a3c1b3987f8f64b0e56b6678069b33fbbf003e6036b0f0d94fef3d983c417c26bcae20ac7c8b34c197ebd77c25e857da4b134d6c04400096680c2967c37f19d5b4d1d3381a455a7911f6072a44e317ba68cbf46f64a094c92ad9ab8620e19e30b370f27f3ecb923b0d301a7ea8a008f11cd7171332a0bda082212e9a14554f53ea9a4fda635b2c0c22142703b30883a931b20ab8909090f0d5b453756bf3982509160050f74cfae12349a926f3bebe8fed23bff021c0d666f6c1b8e1c29c81c70b378a9289e431bdcbab9d05fdd09870e3e6c994e8702d512ebd70b4e8fb3f27d51dc11c2b0c43ead40519d81fcf438f936d163bf340ab0c2c074b9e83114515496a896aaefb9778ebaf3b1308b4da00597f40dcbb300199c1e25169cac602e0d7aeb34832a682d577167fab78f46e3ce5987713f0c08555ac20240085bc68ae4c49032350397651ea188b5e65e340f1c195eeaa42b0d2558b44b29c7ce1cad4e43dd5a6c0a80cb739c9d5290890817cf2353746a5a077477782c37f0b700ba0d0777f779849b02f652423195bf0017c25bedb8bc0001fba13800284412de3ea92080518b3281b8c4d76512d435c756da11494973df081d3c6a893b7d7bbb64869d2b36712ebe2c1585736a44c9e386f01ac8559b2803c70458f9b27949700b6c348a7292ee0f93d1a48e473c9f891c1edf5743281f0cf19000be44b48173aa74c415e93a93fd1c30e102b9c2a032e26c465b341bf5088dc4735988d8df51604275ae33c08336896924b8a8e26c75b91f8ddbe3455a0d8508050502c25ec0f6b5cd754d1868a04a52501c6aa71f2e0c48a5a63c89310a047809de2a0b2b5e7011932858a11f24973d4baf1e0bed60707ad95e0ac12f08f1a4ca4688ef280b46f0b6afd6112fc4375aa0a28b9a41aa82dfc439cfb27a7f8d21ec1a9ec65a73efb5d78e921a90ad1ae5a1ff428dd7cb3ed243a412a318d5",
"as_json": "",
"block_height": 429265,
"block_timestamp": 1556631361,
"double_spend_seen": false,
"in_pool": false,
"output_indices": [
433678,
433679
],
"tx_hash": "4f34ac178f15b392d9a08afa25b2f9ba03ce71b3badc878fc4e562be166b1218"
}
],
"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 -X POST http://127.0.0.1:52542/get_transactions -d '{"txs_hashes":["4f34ac178f15b392d9a08afa25b2f9ba03ce71b3badc878fc4e562be166b1218"],"decode_as_json":true}'
{
"status": "OK",
"txs": [
{
"as_hex": "010002020005f5dc06f68210999f03a619ac2379b1ed3700d2bf2727a743b5f6c5853cc453d10ad612d30bd709d753b242782b020005819a0e92fe02ed9409d1092324f42e89154fa6ee34239d005db1d9aa5fcfad87480dbfaf8c043d650362637402000272ef3b4cab54932750415a330da2bab94dc7e924b68b07622272769dfee966b40002f0ca073373e04f28c17621e4f1da0c1473fe19e3da7eefddfec5c3344ec82ccc440221000cd5f71acbee9bd8861c82bcc16f2e1f15906ad49d0b8fabec4ad734afcd6f43015942ede1687aec409af0edd8beed6abf13e838fae69b248a51d68d4081d2356c04f0d598c102db07e30c0cf40a67af4863a91d2e07f4c4bfcce4faf48d59b731149e8bb03d060dac7a93fd4dbae80a5b0f2d4c3d3f5f6817833a2b4ada377631abdfc676900087371f8ccba17fcc4510a2fc4e506214143c5477ed0e287d88de5bbaa3688e0c6b4b849bc04e77345008466109b7092b4db6d54dcfb04bb1fa50c9fd898b950abe70a0a44cc87abb7cc34a7c2cb9a89949158c0e535a400aea20640118d70a798f694cbb80b8eb04d23aa3e6fe921149d9182f4b27bce9457475de0822ea7b470a85f6bf205a5bc0668871f954c2bf9d69f6b8fab3baf7da6530e44512372e83c68ec7289e8fcb3558787b165d31c4477c394de5604389a27752a286ed9f2cdc6b215ec0ab0b3d637ad668d061de9ab33471d03cb54930eb38334ac525f540c66cb4890a61f1dd44b2877c3d43e398f4832f3853764e809dda37f77373252d6f27cc7855e2c53712850c6c3be549813740a3b683f06208ad3bd04e36d0d7ab07069f1acf22cf2f3aea3996654d62539bcf72f3ec4287b6652eb975b446964302067d739de193961a7d301ee250b78b6fb1416cd81d416d458c492d7f9a591ad775af0ac8de629661c9604b4e27f546bbbaa31a00ace1c376b09108c9d9dc18d3f9f92b9333ac810303b8e6c26cb554abb17b9c9db5b89dbd0b2d88d0796c171dcec14cd382cfce21c64a7e91c4ec71a43c889753563cc9ba9281738a1748cce7ceeacafcdc049201dc5b8d29c58bbca602295e723ec16a9b892492c077f7e7aa12e93acb186e58a3f37a6641feedff928d9c490e09f3e94cd79e014cbfa6b5490106a456e34c1e758f62ced7fcecb5338db514ccb4285630eca77f7aa3651894f2664849572bedd7d9b765c71616432f13330e60dba01af390e2680e26a30aa3d74ff143fa174d7610b7d701609049ae8b04ec159f2e74785b928a88f292358c594a6fa4e1a2798a0a8e7c26d5791abc9bb36de332a1ab1017c0b21dc2e0390d5b1a75309ed598976b89d8bbe6d75642fdc6b7fd061947f805ab356f5a30371645fb0e776b8c3f8c47691e30ba37cc853c8e097d4fa22282fff81007390e3de89596c5dab1394bf936b0621db1f66b60b834fcc1aecf906a5419b0727b9b6cbe9f0e5a07c50a6317368b5c14eb15bb7aed0e1c59ec3f6fc3c67b53ffed6cfc485b0b1b0c438b12e8dbe80526596036d9fb2b0a6010721d4835806ef69ce5e59bed01433df52dca637426b0cce7aeeb8046bd5b90c3f6a9ad2eb214b9b903ba623e9e8b65e115d8fb0fb720681c1a36556ed8b87efdf07e867b0039c90e2db44bc2e4170bc3f8506b335b7ff849d69ae4e229472db03b912188923ffd12b49fbaf322463a22f5978657225cf1ca3ca2240cd9f7fef2a85490694407f52faf78fdd168605179a321fd93905ecf42dbec86282668b4e5a0925a8cc53b5f65175c2d700329c991c0548d0be6f2a20e1ac1cf38c1a48f79b08cd4c8109fdfc1c49502990506c7824dc4d826e6ddc3315ffa71a21741318e7b71e8b16e9e65b8c3d48c6c99ecac64388b41cddc9b8582b339b2f40d7467ce1d6ac73820470b8b51237d155f609cdca85eb114e38f257e073667e5b49eba677f29ab94eb68e95012df93a4cb12c0c8bd7af7163005970b20da5744f75fcea0934998aa2c0cbb783ff0219f521ca9137cd8a566786a93aeb4de4a117b4a2835fc8f6dbe695a4e44b77206efc60cbf77bc2b04bff92dd5921aeac5766fa31a74e91f0dd689ec13f6e3839a4a326e063eec87c0e5ad6b9c74636689441894bfbaeb4a2f99362b8f58b7771ce215c7a78f4fc534fd5204ccf5c201b2e6004bd6ddb47dd4176f1dfb22377470cf7e0b3ca4f225d4971e2e2f889415a06aac0a0b1ba48ebd09ec77c21d03ff45b4fc8c2743a01086b2c5d2c2445ca9098ff8cdda70eca3ff1b42c0a21cf270c7cb4e0329922df5ed509ba6e39eb43566971278fa344f131ddbae0f0fbb3898d8496317cc1a54d4dff82bd75a6ec78854e3e93131799e230a5cec2aeb05802c7aa199a81251fd491894cb3920d72898de5293e36de525af6336b2a9a8a70ab742c10360019c0005ac7e1616409df9f3e753551d3d0ea624f65317799a013bb8360ca6420914a94c46c54e55ff1e0d2e6e91db770dfc8049b1419cbe9c34d5bda77e647503ee2cd5492d21eb088ad2cf9be8297783395ca54531d434651751b82e1ee79907458dca88655f80a9774c01fb8563e64336432b68d494e2932f1d978b21500d008d7d4f186a50486b4e7a3c1b3987f8f64b0e56b6678069b33fbbf003e6036b0f0d94fef3d983c417c26bcae20ac7c8b34c197ebd77c25e857da4b134d6c04400096680c2967c37f19d5b4d1d3381a455a7911f6072a44e317ba68cbf46f64a094c92ad9ab8620e19e30b370f27f3ecb923b0d301a7ea8a008f11cd7171332a0bda082212e9a14554f53ea9a4fda635b2c0c22142703b30883a931b20ab8909090f0d5b453756bf3982509160050f74cfae12349a926f3bebe8fed23bff021c0d666f6c1b8e1c29c81c70b378a9289e431bdcbab9d05fdd09870e3e6c994e8702d512ebd70b4e8fb3f27d51dc11c2b0c43ead40519d81fcf438f936d163bf340ab0c2c074b9e83114515496a896aaefb9778ebaf3b1308b4da00597f40dcbb300199c1e25169cac602e0d7aeb34832a682d577167fab78f46e3ce5987713f0c08555ac20240085bc68ae4c49032350397651ea188b5e65e340f1c195eeaa42b0d2558b44b29c7ce1cad4e43dd5a6c0a80cb739c9d5290890817cf2353746a5a077477782c37f0b700ba0d0777f779849b02f652423195bf0017c25bedb8bc0001fba13800284412de3ea92080518b3281b8c4d76512d435c756da11494973df081d3c6a893b7d7bbb64869d2b36712ebe2c1585736a44c9e386f01ac8559b2803c70458f9b27949700b6c348a7292ee0f93d1a48e473c9f891c1edf5743281f0cf19000be44b48173aa74c415e93a93fd1c30e102b9c2a032e26c465b341bf5088dc4735988d8df51604275ae33c08336896924b8a8e26c75b91f8ddbe3455a0d8508050502c25ec0f6b5cd754d1868a04a52501c6aa71f2e0c48a5a63c89310a047809de2a0b2b5e7011932858a11f24973d4baf1e0bed60707ad95e0ac12f08f1a4ca4688ef280b46f0b6afd6112fc4375aa0a28b9a41aa82dfc439cfb27a7f8d21ec1a9ec65a73efb5d78e921a90ad1ae5a1ff428dd7cb3ed243a412a318d5",
"as_json": "{\n \"version\": 1, \n \"unlock_time\": 0, \n \"vin\": [ {\n \"key\": {\n \"amount\": 0, \n \"key_offsets\": [ 110197, 262518, 53145, 3238, 4524\n ], \n \"k_image\": \"79b1ed3700d2bf2727a743b5f6c5853cc453d10ad612d30bd709d753b242782b\"\n }\n }, {\n \"key\": {\n \"amount\": 0, \n \"key_offsets\": [ 232705, 48914, 150125, 1233, 35\n ], \n \"k_image\": \"24f42e89154fa6ee34239d005db1d9aa5fcfad87480dbfaf8c043d6503626374\"\n }\n }\n ], \n \"vout\": [ {\n \"amount\": 0, \n \"target\": {\n \"key\": \"72ef3b4cab54932750415a330da2bab94dc7e924b68b07622272769dfee966b4\"\n }\n }, {\n \"amount\": 0, \n \"target\": {\n \"key\": \"f0ca073373e04f28c17621e4f1da0c1473fe19e3da7eefddfec5c3344ec82ccc\"\n }\n }\n ], \n \"extra\": [ 2, 33, 0, 12, 213, 247, 26, 203, 238, 155, 216, 134, 28, 130, 188, 193, 111, 46, 31, 21, 144, 106, 212, 157, 11, 143, 171, 236, 74, 215, 52, 175, 205, 111, 67, 1, 89, 66, 237, 225, 104, 122, 236, 64, 154, 240, 237, 216, 190, 237, 106, 191, 19, 232, 56, 250, 230, 155, 36, 138, 81, 214, 141, 64, 129, 210, 53, 108\n ], \n \"rct_signatures\": {\n \"type\": 4, \n \"txnFee\": 673590000, \n \"ecdhInfo\": [ {\n \"mask\": \"db07e30c0cf40a67af4863a91d2e07f4c4bfcce4faf48d59b731149e8bb03d06\", \n \"amount\": \"0dac7a93fd4dbae80a5b0f2d4c3d3f5f6817833a2b4ada377631abdfc6769000\"\n }, {\n \"mask\": \"87371f8ccba17fcc4510a2fc4e506214143c5477ed0e287d88de5bbaa3688e0c\", \n \"amount\": \"6b4b849bc04e77345008466109b7092b4db6d54dcfb04bb1fa50c9fd898b950a\"\n }], \n \"outPk\": [ \"be70a0a44cc87abb7cc34a7c2cb9a89949158c0e535a400aea20640118d70a79\", \"8f694cbb80b8eb04d23aa3e6fe921149d9182f4b27bce9457475de0822ea7b47\"]\n }, \n \"rctsig_prunable\": {\n \"bp\": [ {\n \"A\": \"0a85f6bf205a5bc0668871f954c2bf9d69f6b8fab3baf7da6530e44512372e83\", \n \"S\": \"c68ec7289e8fcb3558787b165d31c4477c394de5604389a27752a286ed9f2cdc\", \n \"T1\": \"6b215ec0ab0b3d637ad668d061de9ab33471d03cb54930eb38334ac525f540c6\", \n \"T2\": \"6cb4890a61f1dd44b2877c3d43e398f4832f3853764e809dda37f77373252d6f\", \n \"taux\": \"27cc7855e2c53712850c6c3be549813740a3b683f06208ad3bd04e36d0d7ab07\", \n \"mu\": \"069f1acf22cf2f3aea3996654d62539bcf72f3ec4287b6652eb975b446964302\", \n \"L\": [ \"7d739de193961a7d301ee250b78b6fb1416cd81d416d458c492d7f9a591ad775\", \"af0ac8de629661c9604b4e27f546bbbaa31a00ace1c376b09108c9d9dc18d3f9\", \"f92b9333ac810303b8e6c26cb554abb17b9c9db5b89dbd0b2d88d0796c171dce\", \"c14cd382cfce21c64a7e91c4ec71a43c889753563cc9ba9281738a1748cce7ce\", \"eacafcdc049201dc5b8d29c58bbca602295e723ec16a9b892492c077f7e7aa12\", \"e93acb186e58a3f37a6641feedff928d9c490e09f3e94cd79e014cbfa6b54901\"\n ], \n \"R\": [ \"a456e34c1e758f62ced7fcecb5338db514ccb4285630eca77f7aa3651894f266\", \"4849572bedd7d9b765c71616432f13330e60dba01af390e2680e26a30aa3d74f\", \"f143fa174d7610b7d701609049ae8b04ec159f2e74785b928a88f292358c594a\", \"6fa4e1a2798a0a8e7c26d5791abc9bb36de332a1ab1017c0b21dc2e0390d5b1a\", \"75309ed598976b89d8bbe6d75642fdc6b7fd061947f805ab356f5a30371645fb\", \"0e776b8c3f8c47691e30ba37cc853c8e097d4fa22282fff81007390e3de89596\"\n ], \n \"a\": \"c5dab1394bf936b0621db1f66b60b834fcc1aecf906a5419b0727b9b6cbe9f0e\", \n \"b\": \"5a07c50a6317368b5c14eb15bb7aed0e1c59ec3f6fc3c67b53ffed6cfc485b0b\", \n \"t\": \"1b0c438b12e8dbe80526596036d9fb2b0a6010721d4835806ef69ce5e59bed01\"\n }, {\n \"A\": \"433df52dca637426b0cce7aeeb8046bd5b90c3f6a9ad2eb214b9b903ba623e9e\", \n \"S\": \"8b65e115d8fb0fb720681c1a36556ed8b87efdf07e867b0039c90e2db44bc2e4\", \n \"T1\": \"170bc3f8506b335b7ff849d69ae4e229472db03b912188923ffd12b49fbaf322\", \n \"T2\": \"463a22f5978657225cf1ca3ca2240cd9f7fef2a85490694407f52faf78fdd168\", \n \"taux\": \"605179a321fd93905ecf42dbec86282668b4e5a0925a8cc53b5f65175c2d7003\", \n \"mu\": \"29c991c0548d0be6f2a20e1ac1cf38c1a48f79b08cd4c8109fdfc1c495029905\", \n \"L\": [ \"c7824dc4d826e6ddc3315ffa71a21741318e7b71e8b16e9e65b8c3d48c6c99ec\", \"ac64388b41cddc9b8582b339b2f40d7467ce1d6ac73820470b8b51237d155f60\", \"9cdca85eb114e38f257e073667e5b49eba677f29ab94eb68e95012df93a4cb12\", \"c0c8bd7af7163005970b20da5744f75fcea0934998aa2c0cbb783ff0219f521c\", \"a9137cd8a566786a93aeb4de4a117b4a2835fc8f6dbe695a4e44b77206efc60c\", \"bf77bc2b04bff92dd5921aeac5766fa31a74e91f0dd689ec13f6e3839a4a326e\"\n ], \n \"R\": [ \"3eec87c0e5ad6b9c74636689441894bfbaeb4a2f99362b8f58b7771ce215c7a7\", \"8f4fc534fd5204ccf5c201b2e6004bd6ddb47dd4176f1dfb22377470cf7e0b3c\", \"a4f225d4971e2e2f889415a06aac0a0b1ba48ebd09ec77c21d03ff45b4fc8c27\", \"43a01086b2c5d2c2445ca9098ff8cdda70eca3ff1b42c0a21cf270c7cb4e0329\", \"922df5ed509ba6e39eb43566971278fa344f131ddbae0f0fbb3898d8496317cc\", \"1a54d4dff82bd75a6ec78854e3e93131799e230a5cec2aeb05802c7aa199a812\"\n ], \n \"a\": \"51fd491894cb3920d72898de5293e36de525af6336b2a9a8a70ab742c1036001\", \n \"b\": \"9c0005ac7e1616409df9f3e753551d3d0ea624f65317799a013bb8360ca64209\", \n \"t\": \"14a94c46c54e55ff1e0d2e6e91db770dfc8049b1419cbe9c34d5bda77e647503\"\n }\n ], \n \"MGs\": [ {\n \"ss\": [ [ \"ee2cd5492d21eb088ad2cf9be8297783395ca54531d434651751b82e1ee79907\", \"458dca88655f80a9774c01fb8563e64336432b68d494e2932f1d978b21500d00\"], [ \"8d7d4f186a50486b4e7a3c1b3987f8f64b0e56b6678069b33fbbf003e6036b0f\", \"0d94fef3d983c417c26bcae20ac7c8b34c197ebd77c25e857da4b134d6c04400\"], [ \"096680c2967c37f19d5b4d1d3381a455a7911f6072a44e317ba68cbf46f64a09\", \"4c92ad9ab8620e19e30b370f27f3ecb923b0d301a7ea8a008f11cd7171332a0b\"], [ \"da082212e9a14554f53ea9a4fda635b2c0c22142703b30883a931b20ab890909\", \"0f0d5b453756bf3982509160050f74cfae12349a926f3bebe8fed23bff021c0d\"], [ \"666f6c1b8e1c29c81c70b378a9289e431bdcbab9d05fdd09870e3e6c994e8702\", \"d512ebd70b4e8fb3f27d51dc11c2b0c43ead40519d81fcf438f936d163bf340a\"]], \n \"cc\": \"b0c2c074b9e83114515496a896aaefb9778ebaf3b1308b4da00597f40dcbb300\"\n }, {\n \"ss\": [ [ \"199c1e25169cac602e0d7aeb34832a682d577167fab78f46e3ce5987713f0c08\", \"555ac20240085bc68ae4c49032350397651ea188b5e65e340f1c195eeaa42b0d\"], [ \"2558b44b29c7ce1cad4e43dd5a6c0a80cb739c9d5290890817cf2353746a5a07\", \"7477782c37f0b700ba0d0777f779849b02f652423195bf0017c25bedb8bc0001\"], [ \"fba13800284412de3ea92080518b3281b8c4d76512d435c756da11494973df08\", \"1d3c6a893b7d7bbb64869d2b36712ebe2c1585736a44c9e386f01ac8559b2803\"], [ \"c70458f9b27949700b6c348a7292ee0f93d1a48e473c9f891c1edf5743281f0c\", \"f19000be44b48173aa74c415e93a93fd1c30e102b9c2a032e26c465b341bf508\"], [ \"8dc4735988d8df51604275ae33c08336896924b8a8e26c75b91f8ddbe3455a0d\", \"8508050502c25ec0f6b5cd754d1868a04a52501c6aa71f2e0c48a5a63c89310a\"]], \n \"cc\": \"047809de2a0b2b5e7011932858a11f24973d4baf1e0bed60707ad95e0ac12f08\"\n }], \n \"pseudoOuts\": [ \"f1a4ca4688ef280b46f0b6afd6112fc4375aa0a28b9a41aa82dfc439cfb27a7f\", \"8d21ec1a9ec65a73efb5d78e921a90ad1ae5a1ff428dd7cb3ed243a412a318d5\"]\n }\n}",
"block_height": 429265,
"block_timestamp": 1556631361,
"double_spend_seen": false,
"in_pool": false,
"output_indices": [
433678,
433679
],
"tx_hash": "4f34ac178f15b392d9a08afa25b2f9ba03ce71b3badc878fc4e562be166b1218"
}
],
"untrusted": false
}
Example 3: Returned a missed (unexisting) transaction.
curl -X POST http://127.0.0.1:52542/get_transactions -d '{"txs_hashes":["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090409"]}'
{
"missed_tx": ["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090409"],
"status": "OK",
"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 (false
).Example:
$ curl -X POST http://127.0.0.1:52542/get_alt_blocks_hashes
{
"status": "OK",
"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 (false
).Example:
$ curl -X POST http://127.0.0.1:52542/is_key_image_spent -d '{"key_images":["8d1bd8181bf7d857bdb281e0153d84cd55a3fcaa57c3e570f4a49f935850b5e3","7319134bfc50668251f5b899c66b005805ee255c136f0e1cecbb0f3a912e09d4"]}'
{
"spent_status": [1,2],
"status": "OK"
"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 (false
).Example (No return information included here):
$ curl -X POST http://127.0.0.1:52542/send_raw_transaction -d '{"tx_as_hex":"de6a3...", "do_not_relay":false}'
Start mining on the daemon.
Alias: None.
Inputs:
Outputs:
Example:
$ curl -X POST http://127.0.0.1:52542/start_mining -d '{"miner_address":"bL2yv6tv5hGcS1L5WvPgu7VkVg525icyRRd2sCKNY5ZQACRHnoXNG6EJqTpatQZ9HAaDegZUYCKUPhkwGSfeWSxA2DBUtKpQh","threads_count":4}'
{
"status": "OK"
}
Stop mining on the daemon.
Alias: None.
Inputs: None.
Outputs:
Example:
$ curl -X POST http://127.0.0.1:52542/stop_mining
{
"status": "OK"
}
Get the mining status of the daemon.
Alias: None.
Inputs: None.
Outputs:
true
) or disabled (false
).Example while mining:
$ curl -X POST http://127.0.0.1:52542/mining_status
{
"active": true,
"address": "bL2yv6tv5hGcS1L5WvPgu7VkVg525icyRRd2sCKNY5ZQACRHnoXNG6EJqTpatQZ9HAaDegZUYCKUPhkwGSfeWSxA2DBUtKpQh",
"speed": 20,
"status": "OK",
"threads_count": 1
}
Example while not mining:
$ curl -X POST http://127.0.0.1:52542/mining_status
{
"active": false,
"address": "",
"speed": 0,
"status": "OK",
"threads_count": 0
}
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 Harware crashes.
Alias: None.
Inputs: None.
Outputs:
Example:
$ curl -X POST http://127.0.0.1:52542/save_bc
{
"status": "OK"
}
Get the known peers list.
Alias: None.
Inputs: None.
Outputs:
Example (truncated lists):
$ curl -X POST http://127.0.0.1:52542/get_peer_list
{
"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:
Example while mining:
$ curl -X POST http://127.0.0.1:52542/set_log_hash_rate -d '{"visible":true}'
{
"status": "OK"
}
Error while not mining:
$ curl -X POST http://127.0.0.1:52542/set_log_hash_rate -d '{"visible":true}'
{
"status": "NOT MINING"
}
Set the daemon log level.
By default, log level is set to 0
.
Alias: None.
Inputs:
0
(less verbose) to 4
(most verbose)Outputs:
Example:
$ curl -X POST http://127.0.0.1:52542/set_log_level -d '{"level":1}'
{
"status": "OK"
}
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 printed.Alias: None.
Inputs:
Outputs:
Example to set all facilities to Security LevelInfo
:
$ curl -X POST http://127.0.0.1:52542/set_log_categories -d '{"categories": "*:INFO"}'
{
"categories": "*:INFO",
"status": "OK"
}
Example without input to set the default categories:
$ curl -X POST http://127.0.0.1:52542/set_log_categories
{
"categories": "*:WARNING,net:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,stacktrace:INFO,logging:INFO,msgwriter:INFO",
"status": "OK"
}
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 -X POST http://127.0.0.1:52542/get_transaction_pool
{
"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 (false
).Example:
$ curl -X POST http://127.0.0.1:52542/get_transaction_pool_hashes.bin
{
"status": "OK",
"tx_hashes": " ... ",
"untrusted": false
}
Get the transaction pool statistics.
Alias: None.
Inputs: None.
Outputs:
true
), or when the daemon is fully synced (false
).Example:
$ curl -X POST http://127.0.0.1:52542/get_transaction_pool_stats
{
"pool_stats": {
"bytes_max": 47222,
"bytes_med": 13290,
"bytes_min": 13092,
"bytes_total": 449511,
"fee_total": 289715320000,
"histo_98pc": 0,
"num_10m": 18,
"num_double_spends": 1,
"num_failing": 17,
"num_not_relayed": 0,
"oldest": 1525457001,
"txs_total": 26
},
"status": "OK",
"untrusted": false
}
Send a command to the daemon to safely disconnect and shut down.
Alias: None.
Inputs: None.
Outputs:
Example:
$ curl -X POST http://127.0.0.1:52542/stop_daemon
{
"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 (false
).Example:
$ curl -X POST http://127.0.0.1:52542/get_limit
{
"limit_down": 8192,
"limit_up": 128,
"status": "OK",
"untrusted": false
}
Set daemon bandwidth limits.
Alias: None.
Inputs:
Outputs:
Example:
$ curl -X POST http://127.0.0.1:52542/set_limit -d '{"limit_down": 1024}'
{
"limit_down": 1024,
"limit_up": 128,
"status": "OK"
}
Limit number of Outgoing peers.
Alias: None.
Inputs:
Outputs:
Example:
$ curl -X POST http://127.0.0.1:52542/out_peers -d '{"out_peers": 3232235535}'
{
"status": "OK"
}
Limit number of Incoming peers.
Alias: None.
Inputs:
Outputs:
Example:
$ curl -X POST http://127.0.0.1:52542/out_peers -d '{"in_peers": 3232235535}'
{
"status": "OK"
}
Get outputs.
Alias: None.
Inputs:
Outputs:
false
) or not (true
)true
), or when the daemon is fully synced (false
).