Skip to main content

get_recent_txs_and_info

Returns the wallet's transaction history, with balance info and per-transaction detail.

Request

{
"id": 0,
"jsonrpc": "2.0",
"method": "get_recent_txs_and_info",
"params": {
"count": 100,
"exclude_mining_txs": false,
"exclude_unconfirmed": false,
"offset": 0,
"order": "FROM_END_TO_BEGIN",
"update_provision_info": true
}
}

Request parameters

  • count - how many items to fetch. If the number of items fetched is less than count, enumeration is over.
  • exclude_mining_txs - exclude mining/staking (coinbase) transactions from the results; last_item_index should be used for subsequent calls when this is set.
  • exclude_unconfirmed - do not include unconfirmed transactions in the results (they're also excluded automatically whenever offset is non-zero).
  • offset - index to start fetching transfer entries from. If filters are used, last_item_index from a previous call can be reused here.
  • order - "FROM_BEGIN_TO_END" or "FROM_END_TO_BEGIN".
  • update_provision_info - whether to compute the pi balance-summary block. Can be set to false to skip that work on very large wallets, when only the raw transfer list is needed.

Response

{
"id": 0,
"jsonrpc": "2.0",
"result": {
"last_item_index": 1,
"pi": {
"balance": 100000000000,
"curent_height": 121212,
"transfer_entries_count": 3,
"transfers_count": 1,
"unlocked_balance": 90000000000
},
"total_transfers": 1,
"transfers": [{
"amount": 1000000000000,
"comment": "Comment here",
"contract": [{
"cancel_expiration_time": 0,
"contract_id": "0000000000000000000000000000000000000000000000000000000000000000",
"expiration_time": 0,
"height": 0,
"is_a": false,
"payment_id": "",
"private_detailes": {
"a_addr": "NiRDNaMeZjwCjnHuU5gUNyrP1pM3U5vckbakzzV6dEHyDYeCpW8XGLBFTshcaY8LkG9RQn7FsQx8w2JeJzJwPwuDm2NfixPAXf",
"a_pledge": 0,
"b_addr": "NiRqzHVJfBJUj1WBUvHTPzYAJ4cKA6PQb2ZR33ZmS4Zp7DDcUxUE29nAkMtLPfCPXwPUgvYRZZ9NM2gN4uRRP1e12wTGSCMzn",
"b_pledge": 0,
"c": "",
"t": "",
"to_pay": 0
},
"state": 0,
"timestamp": 0
}],
"employed_entries": {},
"fee": 10000000000,
"height": 0,
"is_income": false,
"is_mining": false,
"is_mixing": false,
"is_service": false,
"payment_id": "00000000ff00ff00",
"remote_addresses": ["NiRqzHVJfBJUj1WBUvHTPzYAJ4cKA6PQb2ZR33ZmS4Zp7DDcUxUE29nAkMtLPfCPXwPUgvYRZZ9NM2gN4uRRP1e12wTGSCMzn"],
"remote_aliases": ["@example_alias"],
"service_entries": [{
"body": "dcfd7e055a6a3043ea3541a571a57a63e25dcc64e4a270f14fa9a58ac5dbec85dcfd7e055a6a3043ea3541a571a57a63e25dcc64e4a270f14fa9a58ac5dbec85",
"flags": 0,
"instruction": "K",
"security": "d8f6e37f28a632c06b0b3466db1b9d2d1b36a580ee35edfd971dc1423bc412a5",
"service_id": "C"
}],
"show_sender": false,
"subtransfers": [{
"amount": 1000000000000,
"asset_id": "cc608f59f8080e2fbfe3c8c80eb6e6a953d47cf2d6aebd345bada3a1cab99852",
"is_income": false
}],
"timestamp": 1712590951,
"transfer_internal_index": 12,
"tx_blob_size": 0,
"tx_hash": "5509650e12c8f901e6731a2bfaf3abfd64409e3e1366d3d94cd11db8beddb0c3",
"tx_type": 0,
"unlock_time": 0
}]
}
}

Response information

  • last_item_index - index of the last returned item; useful for the next call's offset when filters are used.
  • pi - additional balance-state details (only present when update_provision_info was true in the request):
    • balance - current balance of native coins.
    • curent_height - current sync height of the wallet (typo carried over from the API).
    • transfer_entries_count - number of UTXO entries in the wallet.
    • transfers_count - number of transfer history entries in the wallet.
    • unlocked_balance - unlocked balance of native coins.
  • total_transfers - total number of transfers matching the request in the wallet's tx history.
  • transfers - the transfer history array. Each entry has:
    • amount - native coin amount.
    • comment - human-readable comment attached to the transfer, if any.
    • contract - escrow contract details, present only if this transaction is part of an escrow contract flow (see the contracts_* wallet RPC methods); each entry mirrors the shape returned by contracts_get_all.
    • employed_entries - marks which entries from the transaction are connected to this wallet; opaque/internal, safe to ignore in most integrations.
    • fee - transaction fee.
    • height - height of the block that included the transaction (0 if the transaction is unconfirmed).
    • is_income - whether this transfer entry is incoming (derived from the native subtransfer).
    • is_mining - whether this transaction is a coinbase transaction (generated by PoW mining or PoS staking).
    • is_mixing - whether this transaction uses mixins (auditable wallets normally don't).
    • is_service - whether this transaction is used internally by one of Nirmata's services (contracts, atomic/ionic swaps, marketplace, etc.).
    • payment_id - hex-encoded payment ID blob, if one was present.
    • remote_addresses - the other side's address(es): destination(s) for an outgoing transfer, sender for an incoming one.
    • remote_aliases - aliases for the remote addresses, if any were discovered.
    • service_entries - additional entries carried in the transaction that aren't part of its consensus data:
      • body - hex-encoded body of the attachment.
      • flags - bitmask of TX_SERVICE_ATTACHMENT_ENCRYPT_BODY=1, TX_SERVICE_ATTACHMENT_DEFLATE_BODY=2, TX_SERVICE_ATTACHMENT_ENCRYPT_BODY_ISOLATE_AUDITABLE=4, TX_SERVICE_ATTACHMENT_ENCRYPT_ADD_PROOF=8.
      • instruction - the instruction relevant to this particular service.
      • security - hex-encoded public key of the owner, optional.
      • service_id - identifier distinguishing one service from another.
    • show_sender - whether the sender is included in the transaction.
    • subtransfers - the amounts transferred in this transaction, grouped by asset:
      • amount - amount of the asset transferred.
      • asset_id - the asset's ID (the native coin has a fixed, well-known asset ID).
      • is_income - whether this subtransfer was incoming or outgoing.
    • timestamp - timestamp of the block that included the transaction (0 if unconfirmed).
    • transfer_internal_index - index of this entry in the wallet's internal transaction-history array.
    • tx_blob_size - size of the transaction in bytes.
    • tx_hash - the transaction's ID (hash).
    • tx_type - one of: GUI_TX_TYPE_NORMAL=0, GUI_TX_TYPE_PUSH_OFFER=1, GUI_TX_TYPE_UPDATE_OFFER=2, GUI_TX_TYPE_CANCEL_OFFER=3, GUI_TX_TYPE_NEW_ALIAS=4, GUI_TX_TYPE_UPDATE_ALIAS=5, GUI_TX_TYPE_COIN_BASE=6, GUI_TX_TYPE_ESCROW_PROPOSAL=7, GUI_TX_TYPE_ESCROW_TRANSFER=8, GUI_TX_TYPE_ESCROW_RELEASE_NORMAL=9, GUI_TX_TYPE_ESCROW_RELEASE_BURN=10, GUI_TX_TYPE_ESCROW_CANCEL_PROPOSAL=11, GUI_TX_TYPE_ESCROW_RELEASE_CANCEL=12, GUI_TX_TYPE_HTLC_DEPOSIT=13, GUI_TX_TYPE_HTLC_REDEEM=14.
    • unlock_time - unlock time of this transfer, if present.