<p>The official or standard names would be the ones built into the bitcoin JSON-RPC API. The <a href="https://bitcoin.org/en/developer-reference" rel="nofollow noreferrer">developer reference section</a> is a good place to start you can see example outputs from different calls. </p>

<p>For example the result to the <code>gettransaction</code> call:</p>

<pre><code>{
    "amount" : 0.00000000,
    "fee" : 0.00000000,
    "confirmations" : 106670,
    "blockhash" : "000000008b630b3aae99b6fe215548168bed92167c47a2f7ad4df41e571bcb51",
    "blockindex" : 1,
    "blocktime" : 1396321351,
    "txid" : "5a7d24cd665108c66b2d56146f244932edae4e2376b561b3d396d5ae017b9589",
    "walletconflicts" : [
    ],
    "time" : 1396321351,
    "timereceived" : 1418924711,
    "bip125-replaceable" : "no",
    "details" : [
        {
            "account" : "",
            "address" : "mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN",
            "category" : "send",
            "amount" : -0.10000000,
            "vout" : 0,
            "fee" : 0.00000000
        },
        {
            "account" : "doc test",
            "address" : "mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN",
            "category" : "receive",
            "amount" : 0.10000000,
            "vout" : 0
        }
    ],
    "hex" : "0100000001cde58f2e37d000eabbb60d9cf0b79ddf67cede6dba58732539983fa341dd5e6c010000006a47304402201feaf12908260f666ab369bb8753cdc12f78d0c8bdfdef997da17acff502d321022049ba0b80945a7192e631c03bafd5c6dc3c7cb35ac5c1c0ffb9e22fec86dd311c01210321eeeb46fd878ce8e62d5e0f408a0eab41d7c3a7872dc836ce360439536e423dffffffff0180969800000000001976a9142b14950b8d31620c6cc923c5408a701b1ec0a02088ac00000000"
}
</code></pre>

<p>Source: <a href="https://bitcoin.org/en/developer-reference#gettransaction" rel="nofollow noreferrer">https://bitcoin.org/en/developer-reference#gettransaction</a></p>

CC BY-SA 3.0
2017-04-08T04:53:27.713Z
Note that `gettransaction` is a wallet RPC, which shows the effects of a transaction on your own balance/wallet. This depends on which addresses are considered yours, labels/accounts, and other transactions. If you want a pure "decode" of the actual transaction data, use decoderawtransaction on the hex field.
Pieter Wuille
CC BY-SA 3.0
2017-04-04T01:27:48.427Z
2017-04-04T01:27:48.427Z
m1xolyd1an
<p>Is there a <em>"standard"</em> Bitcoin transaction format?</p>

<p>The context is that I am putting together a tech talk to explain the blockchain concept to complete newbies, and I wanted to show the general structure of a transaction. However, I see different JSON document structures (different field names and content structure) returned by different sources, for the same transaction. For example, compare the output of the following 3 sources for Tx ID <code>90b18aa54288ec610d83ff1abe90f10d8ca87fb6411a72b2e56a169fdc9b0219</code></p>

<ol>
<li><a href="https://blockexplorer.com/api/tx/90b18aa54288ec610d83ff1abe90f10d8ca87fb6411a72b2e56a169fdc9b0219" rel="nofollow noreferrer">https://blockexplorer.com/api/tx/90b18aa54288ec610d83ff1abe90f10d8ca87fb6411a72b2e56a169fdc9b0219</a></li>
<li><a href="https://blockchain.info/tx/90b18aa54288ec610d83ff1abe90f10d8ca87fb6411a72b2e56a169fdc9b0219?format=json" rel="nofollow noreferrer">https://blockchain.info/tx/90b18aa54288ec610d83ff1abe90f10d8ca87fb6411a72b2e56a169fdc9b0219?format=json</a></li>
<li><a href="https://cdn4.cryptocoinsnews.com/wp-content/uploads/2014/07/Bitcoin_tx_example.png" rel="nofollow noreferrer">https://cdn4.cryptocoinsnews.com/wp-content/uploads/2014/07/Bitcoin_tx_example.png</a></li>
</ol>

<p>I know the image (#3) is showing only a subset but it has <code>in</code> and <code>out</code> arrays, and an input has a <code>prev_out</code> object with a <code>hash</code> string field. However, #1 (BlockExplorer) has <code>vin</code> and <code>vout</code> arrays, and the input does not have a <code>prev_out</code> object. It directly contains a string <code>txid</code> field with the hash of previous output transaction. There is yet another JSON structure in #2 (blockchain.info).</p>

<p>Is there an <em>"official"</em> or <em>"standard"</em> JSON structure of a transaction? If so, I would like to show that in my talk. Or what would be the recommended way to show a newbie what a Bitcoin transaction looks like?</p>

<transactions>
Bitcoin Transaction Structure
Ajoy Bhatia
# Bitcoin Transaction Structure

(Asked by: username_0 on 2017-04-04)

Is there a *"standard"* Bitcoin transaction format?

The context is that I am putting together a tech talk to explain the blockchain concept to complete newbies, and I wanted to show the general structure of a transaction. However, I see different JSON document structures (different field names and content structure) returned by different sources, for the same transaction. For example, compare the output of the following 3 sources for Tx ID `90b18aa54288ec610d83ff1abe90f10d8ca87fb6411a72b2e56a169fdc9b0219`

1. <https://blockexplorer.com/api/tx/90b18aa54288ec610d83ff1abe90f10d8ca87fb6411a72b2e56a169fdc9b0219>
2. <https://blockchain.info/tx/90b18aa54288ec610d83ff1abe90f10d8ca87fb6411a72b2e56a169fdc9b0219?format=json>
3. <https://cdn4.cryptocoinsnews.com/wp-content/uploads/2014/07/Bitcoin_tx_example.png>

I know the image (#3) is showing only a subset but it has `in` and `out` arrays, and an input has a `prev_out` object with a `hash` string field. However, #1 (BlockExplorer) has `vin` and `vout` arrays, and the input does not have a `prev_out` object. It directly contains a string `txid` field with the hash of previous output transaction. There is yet another JSON structure in #2 (blockchain.info).

Is there an *"official"* or *"standard"* JSON structure of a transaction? If so, I would like to show that in my talk. Or what would be the recommended way to show a newbie what a Bitcoin transaction looks like?

**Tags:** transactions


---

## 1 answers

### Answer by username_1 on 2017-04-04. Score: 1 | Accepted answer

The official or standard names would be the ones built into the bitcoin JSON-RPC API. The [developer reference section](https://bitcoin.org/en/developer-reference) is a good place to start you can see example outputs from different calls.

For example the result to the `gettransaction` call:

```
{
    "amount" : 0.00000000,
    "fee" : 0.00000000,
    "confirmations" : 106670,
    "blockhash" : "000000008b630b3aae99b6fe215548168bed92167c47a2f7ad4df41e571bcb51",
    "blockindex" : 1,
    "blocktime" : 1396321351,
    "txid" : "5a7d24cd665108c66b2d56146f244932edae4e2376b561b3d396d5ae017b9589",
    "walletconflicts" : [
    ],
    "time" : 1396321351,
    "timereceived" : 1418924711,
    "bip125-replaceable" : "no",
    "details" : [
        {
            "account" : "",
            "address" : "mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN",
            "category" : "send",
            "amount" : -0.10000000,
            "vout" : 0,
            "fee" : 0.00000000
        },
        {
            "account" : "doc test",
            "address" : "mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN",
            "category" : "receive",
            "amount" : 0.10000000,
            "vout" : 0
        }
    ],
    "hex" : "0100000001cde58f2e37d000eabbb60d9cf0b79ddf67cede6dba58732539983fa341dd5e6c010000006a47304402201feaf12908260f666ab369bb8753cdc12f78d0c8bdfdef997da17acff502d321022049ba0b80945a7192e631c03bafd5c6dc3c7cb35ac5c1c0ffb9e22fec86dd311c01210321eeeb46fd878ce8e62d5e0f408a0eab41d7c3a7872dc836ce360439536e423dffffffff0180969800000000001976a9142b14950b8d31620c6cc923c5408a701b1ec0a02088ac00000000"
}

```

Source: <https://bitcoin.org/en/developer-reference#gettransaction>

> **Comments:**
> **username_2**: Note that `gettransaction` is a wallet RPC, which shows the effects of a transaction on your own balance/wallet. This depends on which addresses are considered yours, labels/accounts, and other transactions. If you want a pure "decode" of the actual transaction data, use decoderawtransaction on the hex field.  

---

