The Iridium Daemon embed an HTTP server which provides a JSON 2.0 RPC interface for Iridium blockchain management.
You will find here the description of all the methods included in Iridium RPC Daemon API (iridiumd).
The JSON RPC queries to your running Iridium RPC Daemon use GET and POST requests.

Example of a GET request:

$ curl -s localhost:13001/getheight | jq

Returns:

{
  "height": 685056,
  "network_height": 685056,
  "status": "OK"
}



Example of a POST request:

$ curl -X POST http://127.0.0.1:13007/json_rpc \
    -d '{"jsonrpc":"2.0","id":"test_request","method":"getlastblockheader"}' \
    -H 'Content-Type: application/json' -s \
    | jq

Returns:

{
  "id": "test_request",
  "jsonrpc": "2.0",
  "result": {
    "block_header": {
      "depth": 0,
      "difficulty": 340000000,
      "hash": "01a7d7a872c5c74f08c6e409dac44afb4d9a7c9fb5f6b1e48719adb61881e214",
      "height": 685057,
      "major_version": 5,
      "minor_version": 0,
      "nonce": 1359090124,
      "orphan_status": false,
      "prev_hash": "c958a83436f94e2eb161e30e1df8c8c6147b076ed5fe4baf370abdfa0169eb0b",
      "reward": 699603584,
      "timestamp": 1624225522
    },
    "status": "OK"
  }
}



For starting and configuring the iridiumd, look at the Iridium command line and configuration options.


Iridium RPC Daemon API GET summary

Usage:

http://iridiumd_rpc_bind_IP:iridiumd_rpc_bind_port/"method"


iridiumd_rpc_bind_IP is the rpc-bind-ip option of the iridiumd, default is listening to 127.0.0.1 (localhost)
iridiumd_rpc_bind_port is the rpc-bind-port option of the iridiumd, default 13007 port.
The following methods can be directly called as GET requests:

Json methods

Method Description
getheightReturns current blockchain height (The current mined block)
getinfoReturns multiple node informations
gettransactionsReturns transactions as serialized blobs
sendrawtransactionSend transaction to the network
get_generated_coinsGet current supply as raw

Binary methods

Method Description
getblocks.binReturns blocks in binary form
queryblocks.binqueryblocks.bin
queryblockslite.binqueryblockslite.bin
get_o_indexes.binGet global output indicies
getrandom_outs.binGet random output indicies for a given amount(purpose: for ring signatures)
get_pool_changes.binget_pool_changes.bin
get_pool_changes_lite.binget_pool_changes.bin
get_blocks_details_by_hashes.binget_blocks_details_by_hashes.bin
get_blocks_hashes_by_timestamps.binget_blocks_hashes_by_timestamps.bin
get_transaction_details_by_hashes.binget_transaction_details_by_hashes.bin
get_transaction_hashes_by_payment_id.binget_transaction_hashes_by_payment_id.bin

Iridium RPC Daemon API POST summary

Usage:

http://iridiumd_rpc_bind_IP:iridiumd_rpc_bind_port/json_rpc


iridiumd_rpc_bind_IP is the rpc-bind-ip option of the iridiumd, default is listening to 127.0.0.1 (localhost)
iridiumd_rpc_bind_port is the rpc-bind-port option of the iridiumd, default 13007 port.

Method Description
getblockcountReturns current chain height.
on_getblockhashReturns block hash by its height.
getblocktemplateReturns blocktemplate with an empty “hole” for nonce.
submitblockSubmits mined block.
getlastblockheaderReturns last block header.
getblockheaderbyhashReturns last block header by given hash.
getblockheaderbyheightReturns block header by given block height.
getcurrencyIdReturns unique currency identifier.
get_block_rawReturns raw block by hash.
f_blocks_list_jsonReturns list of shortly described blocks.
f_block_jsonReturns detailed description of a block.
f_transaction_jsonReturns detailed description of a transaction.
f_on_transactions_pool_jsonReturns all unconfirmed transactions (Tx in mempool).