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:
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
* Block blob data - array of strings; list of block blobs which have been mined. See [get_block_template](#get_block_template) to get a blob on which to mine.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`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.
* *block_header* - A structure containing block header information. See [get_last_block_header](#get_last_block_header).
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
Similar to [get_block_header_by_hash](#get_block_header_by_hash) above, this method includes a block's height as an input parameter to retrieve basic information about the block.
* *block_header* - A structure containing block header information. See [get_last_block_header](#get_last_block_header).
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
Similar to [get_block_header_by_height](#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:
* *start_height* - unsigned int; The starting block's height.
* *end_height* - unsigned int; The ending block's height.
Outputs:
* *headers* - array of `block_header` (a structure containing block header information. See [get_last_block_header](#get_last_block_header)).
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`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 -X POST 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'
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.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
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):
* *block_size_limit* - unsigned int; Maximum allowed block size
* *block_size_median* - unsigned int; Median block size of latest 100 blocks
* *bootstrap_daemon_address* - string; @Bootstrap-node to give immediate usability to wallets while syncing by proxying RPC to it. (Note: the replies may be untrustworthy).
* *cumulative_difficulty* - unsigned int; Cumulative difficulty of all blocks in the blockchain.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
* *was_bootstrap_ever_used* - boolean; States if a bootstrap node has ever been used since the daemon started.
* *earliest_height* - unsigned int; Block height at which hard fork would be enabled if voted in.
* *enabled* - boolean; Tells if hard fork is enforced.
* *state* - unsigned int; Current hard fork state: 0 (There is likely a hard fork), 1 (An update is needed to fork properly), or 2 (Everything looks good).
* *status* - string; General RPC error code. "OK" means everything looks good.
* *threshold* - unsigned int; Minimum percent of votes to trigger hard fork. Default is 80.
* *version* - unsigned int; The major block version for the fork.
* *votes* - unsigned int; Number of votes towards hard fork.
* *voting* - unsigned int; Hard fork voting status.
* *window* - unsigned int; Number of blocks over which current votes are cast. Default is 10080 blocks.
Example:
```
$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"hard_fork_info"}' -H 'Content-Type: application/json'
* *histogram* - list of histogram entries, in the following structure:
* *amount* - unsigned int; Output amount in @atomic-units
* *total_instances* - unsigned int;
* *unlocked_instances* - unsigned int;
* *recent_instances* - unsigned int;
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
* *backlog*: array of structures *tx_backlog_entry* (in binary form):
* *blob_size* - unsigned int (in binary form)
* *fee* - unsigned int (in binary form)
* *time_in_pool* - unsigned int (in binary form)
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
Example:
```
$ curl -X POST 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
}
}
```
### **get_output_distribution**
Alias: *None*.
Inputs:
* *amounts* - array of unsigned int; amounts to look for
* *cumulative* - boolean; (optional, default is `false`) States if the result should be cumulative (`true`) or not (`false`)
* *from_height* - unsigned int; (optional, default is 0) starting height to check from
* *to_height* - unsigned int; (optional, default is 0) ending height to check up to
Outputs:
* *distributions* - array of structure distribution as follows:
* *amount* - unsigned int
* *base* - unsigned int
* *distribution* - array of unsigned int
* *start_height* - unsigned int
* *status* - string; General RPC error code. "OK" means everything looks good.
Example:
```
$ curl -X POST 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"
}
}
```
---
## Other Daemon RPC Calls
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:
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](#getinfo) or [get_last_block_header](#get_last_block_header), rather than [getheight](#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](https://github.com/monero-project/monero/blob/master/src/rpc/core_rpc_server_commands_defs.h).
### **/get_height**
Get the node's current height.
Alias: */getheight*.
Inputs: *None*.
Outputs:
* *height* - unsigned int; Current length of longest chain known to daemon.
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
```
$ curl -X POST http://127.0.0.1:18081/get_height -H 'Content-Type: application/json'
{
"height": 1564055,
"status": "OK",
"untrusted": false
}
```
### **/get_blocks.bin**
Get all blocks info. Binary request.
Alias: */getblocks.bin*.
Inputs:
* *block_ids* - binary array of hashes; first 10 blocks id goes sequential, next goes in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block
* *start_height* - unsigned int
* *prune* - boolean
Outputs:
* *blocks* - array of block complete entries
* *current_height* - unsigned int
* *output_indices* - structure as follows:
* *indices* - array of tx output indices, structure as follows:
* *indices* - array of unsigned int
* *start_height* - unsigned int
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
<!-- Cannot get this working
Example:
```
$ curl -X POST http://127.0.0.1:18081/get_blocks.bin -d '{"block_ids":["d109a406528a7b44fef8bc03e75eaabb0f919f852884b43b550b8b3be80a49e7"],"start_height":1562062}' -H 'Content-Type: application/json'
```
--->
### **/get_blocks_by_height.bin**
Get blocks by height. Binary request.
Alias: */getblocks_by_height.bin*.
Inputs:
* *heights* - array of unsigned int; list of block heights
Outputs:
* *blocks* - array of block complete entries
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
curl -X POST http://127.0.0.1:18081/get_blocks_by_height.bin --data-binary '{"heights":[1564246]}'
```
--->
### **/get_hashes.bin**
Get hashes. Binary request.
Alias: */gethashes.bin*.
Inputs:
* *block_ids* - binary array of hashes; first 10 blocks id goes sequential, next goes in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block
* *start_height* - unsigned int
Outputs:
* *current_height* - unsigned int
* *m_block_ids* - binary array of hashes; see *block_ids* above.
* *start_height* - unsigned int
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
<!-- Cannot get this working
Example:
```
$ curl -X POST http://127.0.0.1:18081/get_hashes.bin -d '{"block_ids":["d109a406528a7b44fef8bc03e75eaabb0f919f852884b43b550b8b3be80a49e7"],"start_height":1562062}' -H 'Content-Type: application/json'
```
--->
### **/get_o_indexes.bin**
Get global outputs of transactions. Binary request.
Alias: *None*.
Inputs:
* *txid* - binary txid
Outputs:
* *o_indexes* - array of unsigned int; List of output indexes
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
<!-- Cannot get this working
Example:
```
$ curl -X POST http://127.0.0.1:18081/get_o_indexes.bin --data-binary '{"txid":"d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"}'
```
--->
### **/get_random_outs.bin**
Get a list of random outputs for a specific list of amounts. Binary request.
Alias: */getrandom_outs.bin*.
Inputs:
* *amounts* - array of unsigned int; amounts to get random outputs for
* *outs_count* - unsigned int; Number of output to get
Output:
* *outs* - array of structure *outs_for_amount* as follows:
* *amount* - unsigned int;
* *outs* - array of structure *out_entry* as follows:
* *global_amount_index* - unsigned int;
* *out_key* - public key;
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
<!-- Cannot get this working
Example:
```
$ curl -X POST http://127.0.0.1:18081/get_o_indexes.bin -d '{"txid":"d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"}' -H 'Content-Type: application/json'
```
--->
### **/get_outs.bin**
Get outputs. Binary request.
Alias: *None*.
Inputs:
* *outputs* - array of structure *get_outputs_out* as follows:
* *amount* - unsigned int;
* *index* - unsigned int;
Outputs:
* *outs* - array of structure *outkey* as follows:
* *amount* - unsigned int;
* *height* - unsigned int; block height of the output
* *key* - the public key of the output
* *mask*
* *txid* - transaction id
* *unlocked* - boolean; States if output is locked (`false`) or not (`true`)
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
<!-- Cannot get this working
Example:
```
$ curl -X POST http://127.0.0.1:18081/get_o_indexes.bin --data-binary '{"txid":"d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"}'
```
--->
### **/get_random_rctouts.bin**
Get random RingCT outputs. Binary request.
Alias: */getrandom_rctouts.bin*.
Inputs:
* *outs_count* - unsigned int; amount of RingCT output to get
Outputs:
* *outs* - array of structure *out_entry* as follows:
* *amount* - unsigned int;
* *commitment* - RingCT Key;
* *global_amount_index* - unsigned int;
* *out_key* - public key;
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
<!-- Cannot get this working
Example:
```
$ curl -X POST http://127.0.0.1:18081/get_random_rctouts.bin -d '{"outs_count":7}' -H 'Content-Type: application/json'
```
--->
### **/get_transactions**
Look up one or more transactions by hash.
Alias: */gettransactions*.
Inputs:
* *txs_hashes* - string list; List of transaction hashes to look up.
* *decode_as_json* - boolean; Optional (`false` by default). If set `true`, the returned transaction information will be decoded rather than binary.
* *prune* - boolean; Optional (`false` by default).
Outputs:
* *missed_tx* - array of strings. (Optional - returned if not empty) Transaction hashes that could not be found.
* *status* - General RPC error code. "OK" means everything looks good.
* *txs* - array of structure *entry* as follows:
* *as_hex* - string; Full transaction information as a hex string.
* *as_json* - json string; List of transaction info:
* *version* - Transaction version
* *unlock_time* - If not 0, this tells when a transaction output is spendable.
* *vin* - List of inputs into transaction:
* *key* - The public key of the previous output spent in this transaction.
* *amount* - The amount of the input, in @atomic-units.
* *key_offsets* - A list of integer offets to the input.
* *k_image* - The key image for the given input
* *vout* - List of outputs from transaction:
* *amount* - Amount of transaction output, in @atomic-units.
* *target* - Output destination information:
* *key* - The stealth public key of the receiver. Whoever owns the private key associated with this key controls this transaction output.
* *extra* - Usually called the "payment ID" but can be used to include any random 32 bytes.
* *signatures* - List of signatures used in ring signature to hide the true origin of the transaction.
* *block_height* - unsigned int; block height including the transaction
* *block_timestamp* - unsigned int; Unix time at chich the block has been added to the blockchain
* *double_spend_seen* - boolean; States if the transaction is a double-spend (`true`) or not (`false`)
* *in_pool* - boolean; States if the transaction is in pool (`true`) or included in a block (`false`)
* *output_indices* - array of unsigned int; transaction indexes
* *tx_hash* - string; transaction hash
* *txs_as_hex* - string; Full transaction information as a hex string (old compatibility parameter)
* *txs_as_json* - json string; (Optional - returned if set in inputs. Old compatibility parameter) List of transaction as in *as_json* above:
Example 1: Return transaction information in binary format.
```
$ curl -X POST http://127.0.0.1:18081/get_transactions -d '{"txs_hashes":["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"]}' -H 'Content-Type: application/json'
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:18081/get_transactions -d '{"txs_hashes":["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"],"decode_as_json":true}' -H 'Content-Type: application/json'
Get the known blocks hashes which are not on the main chain.
Alias: *None*.
Inputs: *None*
Outputs:
* *blks_hashes* - array of strings; list of alternative blocks hashes to main chain
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
Example:
```
$ curl -X POST http://127.0.0.1:18081/get_alt_blocks_hashes -H 'Content-Type: application/json'
Check if outputs have been spent using the key image associated with the output.
Alias: *None*.
Inputs:
* *key_images* - string list; List of key image hex strings to check.
Outputs:
* *spent_status* - unsigned int list; List of statuses for each image checked. Statuses are follows: 0 = unspent, 1 = spent in blockchain, 2 = spent in transaction pool
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
Example:
```
$ curl -X POST http://127.0.0.1:18081/is_key_image_spent -d '{"key_images":["8d1bd8181bf7d857bdb281e0153d84cd55a3fcaa57c3e570f4a49f935850b5e3","7319134bfc50668251f5b899c66b005805ee255c136f0e1cecbb0f3a912e09d4"]}' -H 'Content-Type: application/json'
{
"spent_status": [1,2],
"status": "OK"
"untrusted": false
}
```
### **/send_raw_transaction**
Broadcast a raw transaction to the network.
Alias: */sendrawtransaction*.
Inputs:
* *tx_as_hex* - string; Full transaction information as hexidecimal string.
* *do_not_relay* - boolean; Stop relaying transaction to other nodes (default is `false`).
Outputs:
* *double_spend* - boolean; Transaction is a double spend (`true`) or not (`false`).
* *fee_too_low* - boolean; Fee is too low (`true`) or OK (`false`).
* *invalid_input* - boolean; Input is invalid (`true`) or valid (`false`).
* *invalid_output* - boolean; Output is invalid (`true`) or valid (`false`).
* *low_mixin* - boolean; Mixin count is too low (`true`) or OK (`false`).
* *not_rct* - boolean; Transaction is a standard ring transaction (`true`) or a ring confidential transaction (`false`).
* *not_relayed* - boolean; Transaction was not relayed (`true`) or relayed (`false`).
* *overspend* - boolean; Transaction uses more money than available (`true`) or not (`false`).
* *reason* - string; Additional information. Currently empty or "Not relayed" if transaction was accepted but not relayed.
* *status* - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.
* *too_big* - boolean; Transaction size is too big (`true`) or OK (`false`).
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
$ curl -X POST http://127.0.0.1:18081/mining_status -H 'Content-Type: application/json'
{
"active": false,
"address": "",
"is_background_mining_enabled": false,
"speed": 0,
"status": "OK",
"threads_count": 0
}
```
### **/save_bc**
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:
* *status* - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.
Example:
```
$ curl -X POST http://127.0.0.1:18081/save_bc -H 'Content-Type: application/json'
{
"status": "OK"
}
```
### **/get_peer_list**
Get the known peers list.
Alias: *None*.
Inputs: *None*.
Outputs:
* *gray_list* - array of offline *peer* structure as follows:
* *host* - unsigned int; IP address in integer format
* *id* - string; Peer id
* *ip* - unsigned int; IP address in integer format
* *last_seen* - unsigned int; unix time at which the peer has been seen for the last time
* *port* - unsigned int; TCP port the peer is using to connect to monero network.
* *status* - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.
* *white_list* - array of online *peer* structure, as above.
Example (truncated lists):
```
$ curl -X POST 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_log_hash_rate**
Set the log hash rate display mode.
Alias: *None*.
Inputs:
* *visible* - boolean; States if hash rate logs should be visible (`true`) or hidden (`false`)
Outputs:
* *status* - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.
Example while mining:
```
$ curl -X POST http://127.0.0.1:18081/set_log_hash_rate -d '{"visible":true}' -H 'Content-Type: application/json'
{
"status": "OK"
}
```
Error while not mining:
```
$ curl -X POST http://127.0.0.1:18081/set_log_hash_rate -d '{"visible":true}' -H 'Content-Type: application/json'
{
"status": "NOT MINING"
}
```
### **/set_log_level**
Set the daemon log level.
By default, log level is set to `0`.
Alias: *None*.
Inputs:
* *level* - integer; daemon log level to set from `0` (less verbose) to `4` (most verbose)
Outputs:
* *status* - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.
Example:
```
$ curl -X POST http://127.0.0.1:18081/set_log_level -d '{"level":1}' -H 'Content-Type: application/json'
{
"status": "OK"
}
```
### **/set_log_categories**
Set the daemon log categories.
Categories are represented as a comma separated list of `<Category>:<level>` (similarly to syslog standard `<Facility>:<Severity-level>`), where:
* *Category* is one of the following:
* *\** - All facilities
* *default*
* *net*
* *net.http*
* *net.p2p*
* *logging*
* *net.throttle*
* *blockchain.db*
* *blockchain.db.lmdb*
* *bcutil*
* *checkpoints*
* *net.dns*
* *net.dl*
* *i18n*
* *perf*
* *stacktrace*
* *updates*
* *account*
* *cn*
* *difficulty*
* *hardfork*
* *miner*
* *blockchain*
* *txpool*
* *cn.block_queue*
* *net.cn*
* *daemon*
* *debugtools.deserialize*
* *debugtools.objectsizes*
* *device.ledger*
* *wallet.gen_multisig*
* *multisig*
* *bulletproofs*
* *ringct*
* *daemon.rpc*
* *wallet.simplewallet*
* *WalletAPI*
* *wallet.ringdb*
* *wallet.wallet2*
* *wallet.rpc*
* *tests.core*
* *Level* is one of the following:
* *FATAL* - higher level
* *ERROR*
* *WARNING*
* *INFO*
* *DEBUG*
* *TRACE* - lower level
A level automatically includes higher level.
By default, categories are set to `*: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:
* *categories* - string; Optional, daemon log categories to enable
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:
* *spent_key_images* - List of spent output key images:
* *id_hash* - string; Key image.
* *txs_hashes* - string list; tx hashes of the txes (usually one) spending that key image.
* *status* - string; General RPC error code. "OK" means everything looks good.
* *status* - string; General RPC error code. "OK" means everything looks good.
* *tx_hashes* - binary array of transaction hashes.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
Example:
```
$ curl -X POST http://127.0.0.1:18081/get_transaction_pool_hashes.bin -H 'Content-Type: application/json'
{
"status": "OK",
"tx_hashes": " ... ",
"untrusted": false
}
```
### **/get_transaction_pool_stats**
Get the transaction pool statistics.
Alias: *None*.
Inputs: *None*.
Outputs:
* *pool_stats* - Structure as follows:
* *bytes_max* - unsigned int; Max transaction size in pool
* *bytes_med* - unsigned int; Median transaction size in pool
* *bytes_min* - unsigned int; Min transaction size in pool
* *bytes_total* - unsigned int; total size of all transactions in pool
* *histo* - structure *txpool_histo* as follows:
* *txs* - unsigned int; number of transactions
* *bytes* - unsigned int; size in bytes.
* *histo_98pc* unsigned int; the time 98% of txes are "younger" than
* *num_10m* unsigned int; number of transactions in pool for more than 10 minutes
* *num_double_spends* unsigned int; number of double spend transactions
* *num_failing* unsigned int; number of failing transactions
* *num_not_relayed* unsigned int; number of non-relayed transactions
* *oldest* unsigned int; unix time of the oldest transaction in the pool
* *txs_total* unsigned int; total number of transactions.
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
Example:
```
$ curl -X POST http://127.0.0.1:18081/get_transaction_pool_stats -H 'Content-Type: application/json'
{
"pool_stats": {
"bytes_max": 47222,
"bytes_med": 13290,
"bytes_min": 13092,
"bytes_total": 449511,
"fee_total": 289715320000,
"histo": "\t▒'▒5▒4▒\/▒▒▒$3",
"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
}
```
### **/stop_daemon**
Send a command to the daemon to safely disconnect and shut down.
Alias: *None*.
Inputs: *None*.
Outputs:
* *status* - string; General RPC error code. "OK" means everything looks good.
Example:
```
$ curl -X POST http://127.0.0.1:18081/stop_daemon -H 'Content-Type: application/json'
{
"status": "OK"
}
```
### **/get_info (not JSON)**
This method is a convenient backward support and should not be used anymore. See [get_info](#get_info) JSON RPC for details.
Alias:
* */getinfo*
* *get_info*
### **/get_limit**
Get daemon bandwidth limits.
Alias: *None*.
Inputs: *None*.
Outputs:
* *limit_down* - unsigned int; Download limit in kBytes per second
* *limit_up* - unsigned int; Upload limit in kBytes per second
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
Example:
```
$ curl -X POST http://127.0.0.1:18081/get_limit -H 'Content-Type: application/json'
{
"limit_down": 8192,
"limit_up": 128,
"status": "OK",
"untrusted": false
}
```
### **/set_limit**
Set daemon bandwidth limits.
Alias: *None*.
Inputs:
* *limit_down* - signed int; Download limit in kBytes per second (-1 reset to default, 0 don't change the current limit)
* *limit_up* - signed int; Upload limit in kBytes per second (-1 reset to default, 0 don't change the current limit)
Outputs:
* *limit_down* - unsigned int; Download limit in kBytes per second
* *limit_up* - unsigned int; Upload limit in kBytes per second
* *status* - string; General RPC error code. "OK" means everything looks good.
* *status* - string; General RPC error code. "OK" means everything looks good.
Example:
```
$ curl -X POST http://127.0.0.1:18081/start_save_graph -H 'Content-Type: application/json'
{
"status": "OK"
}
```
### **/stop_save_graph**
Obsolete. Conserved here for reference.
Alias: *None*.
Inputs: *None*.
Outputs:
* *status* - string; General RPC error code. "OK" means everything looks good.
Example:
```
$ curl -X POST http://127.0.0.1:18081/stop_save_graph -H 'Content-Type: application/json'
{
"status": "OK"
}
```
### **/get_outs**
Get outputs.
Alias: *None*.
Inputs:
* *outputs* array of *get_outputs_out* structure as follows:
* *amount* - unsigned int;
* *index* - unsigned int;
Outputs:
* *outs* - array of structure *outkey* as follows:
* *height* - unsigned int; block height of the output
* *key* - String; the public key of the output
* *mask* - String
* *txid* - String; transaction id
* *unlocked* - boolean; States if output is locked (`false`) or not (`true`)
* *status* - string; General RPC error code. "OK" means everything looks good.
* *untrusted* - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (`true`), or when the daemon is fully synced (`false`).
### **/update**
Update daemon.
Alias: *None*.
Inputs:
* *command* - String; command to use, either `check` or `download`
* *path* - String; Optional, path where to download the update.
Outputs:
* *auto_uri* - string;
* *hash* - string;
* *path* - String; path to download the update
* *status* - string; General RPC error code. "OK" means everything looks good.
* *update* - boolean; States if an update is available to download (`true`) or not (`false`)
* *user_uri* - string;
* *version* - string; Version available for download.
Example:
```
$ curl -X POST http://127.0.0.1:18081/update -d '{"command":"check"}' -H 'Content-Type: application/json'