blockchainaddressgethistory

Rostrum Electrum for Bitcoin Cash

Overview

The blockchain.address.get_mempool method retrieves the unconfirmed transactions associated with a Bitcoin Cash or Nexa address. This allows users to view pending transactions that have not yet been included in a block, providing insights into upcoming transactions.

Parameters

NameTypeRequiredDescription
addressstringYesThe Bitcoin Cash or Nexa address in Cash Address format or legacy format.
filterstringNoSpecifies which UTXOs are included. Options: 'include_tokens', 'tokens_only', 'exclude_token'.

Returns

The method returns an array of unconfirmed transactions for the specified address.

FieldDescription
unconfirmed_txsList of unconfirmed transactions with details such as transaction hash, inputs, and outputs.

Example Result

{
  "unconfirmed_txs": [
    {
      "tx_hash": "b6f6998abc08195f5b..."
    },
    {
      "tx_hash": "a2c8579bfcc32e..."
    }
  ]
}

Request Example

curl --location 'https://api.tatum.io/v3/blockchain/node/rostrum-mainnet/' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {API_KEY}' \
--data '{
    "method": "blockchain.address.get_mempool",
    "params": ["qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a", "include_tokens"],
    "id": 1,
    "jsonrpc": "2.0"
}'
// yarn add @tatumio/tatum

import { TatumSDK, Rostrum, Network } from '@tatumio/tatum'

const rostrum = await TatumSDK.init<Rostrum>({ network: Network.ROSTRUM_MAINNET })

const mempoolTransactions = await tatum.rpc.getMempoolTransactions({
  address: 'qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a',
  filter: 'include_tokens',
})

console.log('Mempool Transactions:', mempoolTransactions)

await rostrum.destroy() // Destroy Tatum SDK - needed for stopping background jobs when done