Skip to content

Latest commit

 

History

History
169 lines (135 loc) · 5.18 KB

get_mempool-contents.md

File metadata and controls

169 lines (135 loc) · 5.18 KB

{% comment %} This file is licensed under the MIT License (MIT) available on http://opensource.org/licenses/MIT. {% endcomment %} {% assign filename="_data/devdocs/en/bitcoin-core/rest/requests/get_mempool-contents.md" %}

GET MemPool/Contents

{% include helpers/subhead-links.md %}

{% assign summary_restGetMemPool-contents="returns all transaction in the memory pool with detailed information." %}

{% autocrossref %}

The GET mempool/contents operation {{summary_restGetMemPool-contents}} Supports only json as output format.

Request

{% highlight text %} GET /mempool/contents.json {% endhighlight %}

Parameters: none

Result as JSON

{% itemplate ntpd1 %}

  • n: "result" t: "object" p: "Required
    (exactly 1)" d: "A object containing transactions currently in the memory pool. May be empty"

  • n: "→
    TXID" t: "string : object" p: "Optional
    (0 or more)" d: "The TXID of a transaction in the memory pool, encoded as hex in RPC byte order"

  • n: "→ →
    size" t: "number (int)" p: "Required
    (exactly 1)" d: "The size of the serialized transaction in bytes"

  • n: "→ →
    fee" t: "number (bitcoins)" p: "Required
    (exactly 1)" d: "The transaction fee paid by the transaction in decimal bitcoins"

  • n: "→ →
    modifiedfee" t: "number (bitcoins)" p: "Required
    (exactly 1)" d: "Added in Bitcoin Core 0.12.0

    The transaction fee with fee deltas used for mining priority in decimal bitcoins"

  • n: "→ →
    time" t: "number (int)" p: "Required
    (exactly 1)" d: "The time the transaction entered the memory pool, Unix epoch time format"

  • n: "→ →
    height" t: "number (int)" p: "Required
    (exactly 1)" d: "The block height when the transaction entered the memory pool"

  • n: "→ →
    startingpriority" t: "number (int)" p: "Required
    (exactly 1)" d: "The priority of the transaction when it first entered the memory pool"

  • n: "→ →
    currentpriority" t: "number (int)" p: "Required
    (exactly 1)" d: "The current priority of the transaction"

  • n: "→ →
    descendantcount" t: "number (int)" p: "Required
    (exactly 1)" d: "Added in Bitcoin Core 0.12.0

    The number of in-mempool descendant transactions (including this one)"

  • n: "→ →
    descendantsize" t: "number (int)" p: "Required
    (exactly 1)" d: "Added in Bitcoin Core 0.12.0

    The size of in-mempool descendants (including this one)"

  • n: "→ →
    descendantfees" t: "number (int)" p: "Required
    (exactly 1)" d: "Added in Bitcoin Core 0.12.0

    The modified fees (see modifiedfee above) of in-mempool descendants (including this one)"

  • n: "→ →
    ancestorcount" t: "number (int)" p: "Required
    (exactly 1)" d: "Added in Bitcoin Core 0.13.0

    The number of in-mempool ancestor transactions (including this one)"

  • n: "→ →
    ancestorsize" t: "number (int)" p: "Required
    (exactly 1)" d: "Added in Bitcoin Core 0.13.0

    The size of in-mempool ancestors (including this one)"

  • n: "→ →
    ancestorfees" t: "number (int)" p: "Required
    (exactly 1)" d: "Added in Bitcoin Core 0.13.0

    The modified fees (see modifiedfee above) of in-mempool ancestors (including this one)"

  • n: "→ →
    depends" t: "array" p: "Required
    (exactly 1)" d: "An array holding TXIDs of unconfirmed transactions this transaction depends upon (parent transactions). Those transactions must be part of a block before this transaction can be added to a block, although all transactions may be included in the same block. The array may be empty"

  • n: "→ → →
    Depends TXID" t: "string" p: "Optional (0 or more)" d: "The TXIDs of any unconfirmed transactions this transaction depends upon, encoded as hex in RPC byte order"

{% enditemplate %}

Examples from Bitcoin Core 0.13.1

Get all transactions in the memory pool in JSON:

{% highlight bash %} curl http://localhost:8332/rest/mempool/contents.json {% endhighlight %}

Result (whitespaced added):

{% highlight json %} { "b104586f229e330caf42c475fd52684e9eb5e2d02f0fcd216d9554c5347b0873": { "size": 485, "fee": 0.00009700, "modifiedfee": 0.00009700, "time": 1479423635, "height": 439431, "startingpriority": 15327081.81818182, "currentpriority": 21536936.36363636, "descendantcount": 1, "descendantsize": 485, "descendantfees": 9700, "ancestorcount": 1, "ancestorsize": 485, "ancestorfees": 9700, "depends": [ ] }, "094f7dcbc7494510d4daeceb2941ed73b1bd011bf527f6c3b7c897fee85c11d4": { "size": 554, "fee": 0.00005540, "modifiedfee": 0.00005540, "time": 1479423327, "height": 439430, "startingpriority": 85074.91071428571, "currentpriority": 3497174.4375, "descendantcount": 1, "descendantsize": 554, "descendantfees": 5540, "ancestorcount": 1, "ancestorsize": 554, "ancestorfees": 5540, "depends": [ ] } } {% endhighlight %}

See also

  • [GET MemPool/Info][rest get mempool-info]: {{summary_restGetMemPool-info}}
  • [GetMemPoolInfo][rpc getmempoolinfo] RPC: {{summary_getMemPoolInfo}}
  • [GetRawMemPool][rpc getrawmempool] RPC: {{summary_getRawMemPool}}

{% endautocrossref %}