getmempoolentry - Dogecoin

This method returns mempool data for a single transaction that is currently queued.

Parameters

ParameterTypeRequiredDescription
txidstringYesThe transaction id of a mempool entry

Request

bashcurl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "getmempoolentry",
    "params": ["d0dd61c93cd4a571030c15b5f6a94466a8f7246b986dd318d656c910e6e5a8ed"],
    "id": "getblock.io"
}'

example.js

javascriptconst axios = require('axios');
const { data } = await axios.post('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/', {
  jsonrpc: '2.0', method: 'getmempoolentry', params: ["d0dd61c93cd4a571030c15b5f6a94466a8f7246b986dd318d656c910e6e5a8ed"], id: 'getblock.io'
});
console.log(data.result);

example.py

pythonimport requests

response = requests.post(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/',
    headers={'Content-Type': 'application/json'},
    json={
        'jsonrpc': '2.0',
        'method': 'getmempoolentry',
        'params': ["d0dd61c93cd4a571030c15b5f6a94466a8f7246b986dd318d656c910e6e5a8ed"],
        'id': 'getblock.io'
    }
)

print(response.json()['result'])

example.rs

rustuse reqwest::Client;
use serde_json::{json, Value};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();

    let response = client
        .post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/")
        .header("Content-Type", "application/json")
        .json(&json!({
            "jsonrpc": "2.0",
            "method": "getmempoolentry",
            "params": ["d0dd61c93cd4a571030c15b5f6a94466a8f7246b986dd318d656c910e6e5a8ed"],
            "id": "getblock.io"
        }))
        .send()
        .await?
        .json::<Value>()
        .await?;

    println!("Result: {}", response["result"]);
    Ok(())
}

Response

json{
    "error": null,
    "id": "getblock.io",
    "result": {
        "size": 225,
        "fee": 0.00340500,
        "modifiedfee": 0.00340500,
        "time": 1789703820,
        "height": 6378929,
        "descendantcount": 1,
        "descendantsize": 225,
        "ancestorcount": 1,
        "ancestorsize": 225,
        "depends": []
    }
}

Response Parameters

ParameterTypeDescription
errornull|objectError object when the call fails, otherwise null
idstringRequest identifier matching the request
result.sizenumericSerialized transaction size in bytes
result.feenumericFee paid, in DOGE
result.timenumericTime the transaction entered the mempool
result.heightnumericChain height when the transaction entered the mempool
result.descendantcountnumericNumber of in-mempool descendants, including this transaction
result.ancestorcountnumericNumber of in-mempool ancestors, including this transaction
result.dependsarrayTransaction ids of unconfirmed parents

Use Cases

  • Pending Inspection: Read the fee and size of a queued transaction
  • Chain Analysis: Read depends to find unconfirmed parents
  • Stuck Diagnosis: Compare a transaction's fee against the mempool minimum

Error Handling

Error CodeMessageDescription
-5Transaction not in mempoolThe transaction id is not currently queued
-32700Parse errorRequest body is not valid JSON
-32603Internal errorNode failed to process the request