<p>You can use the <code>listtransactions</code> JSON-RPC call to get the complete list of transactions that have to do with your addresses. This includes both sends and receives. You can filter for the transaction you're looking for by the category (should be "send"), address, amount and time. The txid and confirmations in this RPC call should be what's actually included in the blockchain and can be relied upon.</p>

<p>For reference, here's what the RPC call looks like:</p>

<pre><code>[
{   
    "account" : "",
    "address" : "1ENnzep2ivWYqXjAodTueiZscT6kunAyYs",
    "category" : "send",
    "amount" : -0.00040000,
    "fee" : -0.00010000,
    "confirmations" : 34055,
    "blockhash" : "000000000000000019313300fa20943b3974a97c1da2de6de13ea1281f77097f",
    "blockindex" : 414,
    "blocktime" : 1404861981,
    "txid" : "8a1f0f07fb397b2aa0e77995723f2dac9aee7df63a6f05a7db7d168d62a60f94",
    "walletconflicts" : [
    ],
    "time" : 1404861981,
    "timereceived" : 1412296394
}
]
</code></pre>

CC BY-SA 3.0
2015-02-17T16:54:27.377Z
So it is organized by output addresses, but what this fee means? If my transaction has 2 output addresses, the entries returned by `listtransactions` for both will contain the same fee?
lvella
CC BY-SA 3.0
2015-02-17T21:42:54.067Z
The fee will be the same, yes.
Jimmy Song
CC BY-SA 3.0
2015-03-28T06:10:33.177Z
I am somewhat unsatisfied with this answer, because the answer for `listtransactions` will become increasingly large with my wallet usage. That won't be practical, if checking outgoing transactions is a routine operation.
lvella
CC BY-SA 3.0
2017-04-03T09:35:27.400Z
wouldn't an answer be that you get a negative confirmation amount if a malleability tx got confirmed instead?
tobi
CC BY-SA 3.0
2015-02-17T15:09:29.377Z
2015-02-17T15:09:29.377Z
Jimmy Song
<p>I have created, signed and sent a raw transaction via bitcoind RPC. Now I want to wait for it to have n confirmations.</p>

<p>Considering <a href="https://en.bitcoin.it/wiki/Transaction_Malleability" rel="noreferrer">transaction malleability</a>, I can't just check the <code>"confirmations"</code> field returned by <code>gettransaction</code>, because the transaction with that particular <code>txid</code> may never be accepted, in case an equivalent transaction with some other <code>txid</code> was accepted instead.</p>

<p>So, what is the canonical way, using bitcoind JSON-RPC, to check if an equivalent transaction was accepted in place of mine? What calls are better suited for the task?</p>

<transactions><json-rpc><transaction-malleability>
Using bitcoins JSON RPC, how can I confirm a transaction I published?
lvella
# Using bitcoins JSON RPC, how can I confirm a transaction I published?

(Asked by: username_0 on 2015-02-16)

I have created, signed and sent a raw transaction via bitcoind RPC. Now I want to wait for it to have n confirmations.

Considering [transaction malleability](https://en.bitcoin.it/wiki/Transaction_Malleability), I can't just check the `"confirmations"` field returned by `gettransaction`, because the transaction with that particular `txid` may never be accepted, in case an equivalent transaction with some other `txid` was accepted instead.

So, what is the canonical way, using bitcoind JSON-RPC, to check if an equivalent transaction was accepted in place of mine? What calls are better suited for the task?

**Tags:** transactions, json-rpc, transaction-malleability


---

## 1 answers

### Answer by username_1 on 2015-02-17. Score: 1 | Accepted answer

You can use the listtransactions JSON-RPC call to get the complete list of transactions that have to do with your addresses. This includes both sends and receives. You can filter for the transaction you're looking for by the category (should be "send"), address, amount and time. The txid and confirmations in this RPC call should be what's actually included in the blockchain and can be relied upon.
For reference, here's what the RPC call looks like:
[
{   
    "account" : "",
    "address" : "1ENnzep2ivWYqXjAodTueiZscT6kunAyYs",
    "category" : "send",
    "amount" : -0.00040000,
    "fee" : -0.00010000,
    "confirmations" : 34055,
    "blockhash" : "000000000000000019313300fa20943b3974a97c1da2de6de13ea1281f77097f",
    "blockindex" : 414,
    "blocktime" : 1404861981,
    "txid" : "8a1f0f07fb397b2aa0e77995723f2dac9aee7df63a6f05a7db7d168d62a60f94",
    "walletconflicts" : [
    ],
    "time" : 1404861981,
    "timereceived" : 1412296394
}
]

> **Comments:**
> **username_0**: So it is organized by output addresses, but what this fee means? If my transaction has 2 output addresses, the entries returned by `listtransactions` for both will contain the same fee?  
> **username_1**: The fee will be the same, yes.  
> **username_0**: I am somewhat unsatisfied with this answer, because the answer for `listtransactions` will become increasingly large with my wallet usage. That won't be practical, if checking outgoing transactions is a routine operation.  
> **username_2**: wouldn't an answer be that you get a negative confirmation amount if a malleability tx got confirmed instead?  

---

