getrawmempool

Gives back a json array containing string transaction ids for every transaction in the memory pool.

To retrieve a particular transaction from the mempool, use getmempoolentry.

Example Request and Result for getrawmempool method

In this section, we provide an illustrative example of a request made to retrieve details contents using the getrawmempool method. Additionally, we present the resulting response containing information about the transaction ids from memory pool.

Parameters

FieldTypeDescription

verbose

boolean

True for a json object, false for array of transaction ids

mempool_squence

boolean

If verbose=false, returns a json object with transaction list and mempool sequence number attached.

The example in this section uses a non-existing project id.

Make sure you replace it with your Bitcoin mainnet or Bitcoin Testnet endpoint when issuing the API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Returns a json array containing string transaction ids.

POST https://bitcoin-mainnet.blastapi.io/<project-id>

Request Body

NameTypeDescription

jsonrpc*

string

1.0

id*

string

bwarelabs

method*

string

getrawmempool

params*

array<string>

[]

{
    "result": [
        "e51d8322e437c7b03debfc3fa6f3006fd0e81be0ee18eddbe3e3292c57fa5b35",
        "8d7a253e2a86d7de02975dc5a49b891cdc08330b887b452c620e152a86b25d07",
        ...
   ],
    "error": null,
    "id": "bwarelabs"
}

Curl Request example

curl --location 'https://bitcoin-mainnet.blastapi.io/<public-id>' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "1.0",
    "id": "bwarelabs",
    "method": "getrawmempool",
    "params": []
}'

Last updated