Mempool

Get All Mempool Transactions

post

Get all Transaction Identifiers in the mempool

Authorizations
Body

A NetworkRequest is utilized to retrieve some data specific exclusively to a NetworkIdentifier.

metadataobjectOptional
Responses
200
Expected response to a valid request
application/json
post
POST /mempool HTTP/1.1
Host: ada.nownodes.io
api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 197

{
  "network_identifier": {
    "blockchain": "cardano",
    "network": "mainnet",
    "sub_network_identifier": {
      "network": "shard 1",
      "metadata": {
        "producer": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5"
      }
    }
  },
  "metadata": {}
}
{
  "transaction_identifiers": [
    {
      "hash": "0x2f23fd8cca835af21f3ac375bac601f97ead75f2e79143bdf71fe2c4be043e8f"
    }
  ]
}

Get a Mempool Transaction

post

Get a transaction in the mempool by its Transaction Identifier. This is a separate request than fetching a block transaction (/block/transaction) because some blockchain nodes need to know that a transaction query is for something in the mempool instead of a transaction in a block. Transactions may not be fully parsable until they are in a block (ex: may not be possible to determine the fee to pay before a transaction is executed). On this endpoint, it is ok that returned transactions are only estimates of what may actually be included in a block.

Authorizations
Body

A MempoolTransactionRequest is utilized to retrieve a transaction from the mempool.

Responses
200
Expected response to a valid request
application/json
post
POST /mempool/transaction HTTP/1.1
Host: ada.nownodes.io
api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 286

{
  "network_identifier": {
    "blockchain": "cardano",
    "network": "mainnet",
    "sub_network_identifier": {
      "network": "shard 1",
      "metadata": {
        "producer": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5"
      }
    }
  },
  "transaction_identifier": {
    "hash": "0x2f23fd8cca835af21f3ac375bac601f97ead75f2e79143bdf71fe2c4be043e8f"
  }
}
{
  "transaction": {
    "transaction_identifier": {
      "hash": "0x2f23fd8cca835af21f3ac375bac601f97ead75f2e79143bdf71fe2c4be043e8f"
    },
    "operations": [
      {
        "operation_identifier": {
          "index": 5,
          "network_index": 0
        },
        "related_operations": [
          {
            "index": 1
          },
          {
            "index": 2
          }
        ],
        "type": "Transfer",
        "status": "Reverted",
        "account": {
          "address": "0x3a065000ab4183c6bf581dc1e55a605455fc6d61",
          "sub_account": {
            "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
            "metadata": {}
          },
          "metadata": {
            "chain_code": "text"
          }
        },
        "amount": {
          "value": "1238089899992",
          "currency": {
            "symbol": "BTC",
            "decimals": 8,
            "metadata": null
          },
          "metadata": {}
        },
        "coin_change": {
          "coin_identifier": {
            "identifier": "0x2f23fd8cca835af21f3ac375bac601f97ead75f2e79143bdf71fe2c4be043e8f:1"
          },
          "coin_action": "coin_created"
        },
        "metadata": {
          "staking_credential": {
            "hex_bytes": "1B400D60AAF34EAF6DCBAB9BBA46001A23497886CF11066F7846933D30E5AD3F",
            "curve_type": "edwards25519"
          },
          "payment_key": {
            "hex_bytes": "1B400D60AAF34EAF6DCBAB9BBA46001A23497886CF11066F7846933D30E5AD3F",
            "curve_type": "edwards25519"
          },
          "asm": "304502201fd8abb11443f8b1b9a04e0495e0543d05611473a790c8939f089d073f90509a022100f4677825136605d732e2126d09a2d38c20c75946cd9fc239c0497e84c634e3dd01 03301a8259a12e35694cc22ebc45fee635f4993064190f6ce96e7fb19a03bb6be2",
          "hex": "48304502201fd8abb11443f8b1b9a04e0495e0543d05611473a790c8939f089d073f90509a022100f4677825136605d732e2126d09a2d38c20c75946cd9fc239c0497e84c634e3dd012103301a8259a12e35694cc22ebc45fee635f4993064190f6ce96e7fb19a03bb6be2"
        }
      }
    ],
    "related_transactions": [
      {
        "network_identifier": {
          "blockchain": "cardano",
          "network": "mainnet",
          "sub_network_identifier": {
            "network": "shard 1",
            "metadata": {
              "producer": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5"
            }
          }
        },
        "transaction_identifier": {
          "hash": "0x2f23fd8cca835af21f3ac375bac601f97ead75f2e79143bdf71fe2c4be043e8f"
        },
        "direction": "forward"
      }
    ],
    "metadata": {
      "size": 12378,
      "lockTime": 1582272577
    }
  },
  "metadata": {
    "descendant_fees": 123923,
    "ancestor_count": 2
  }
}