<p>The genesis block is a special case. Among other quirks, its coinbase transaction doesn't actually create any spendable outputs, which is why the <code>getrawtransaction</code> RPC treats it as if it doesn't exist.</p>
<p>You can still display the transaction as part of the genesis block using <code>getblock</code>:</p>
<pre><code>$ bitcoin-cli getblock 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f 2
{
  &quot;hash&quot;: &quot;000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f&quot;,
  &quot;confirmations&quot;: 799215,
  &quot;height&quot;: 0,
  &quot;version&quot;: 1,
  &quot;versionHex&quot;: &quot;00000001&quot;,
  &quot;merkleroot&quot;: &quot;4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b&quot;,
  &quot;time&quot;: 1231006505,
  &quot;mediantime&quot;: 1231006505,
  &quot;nonce&quot;: 2083236893,
  &quot;bits&quot;: &quot;1d00ffff&quot;,
  &quot;difficulty&quot;: 1,
  &quot;chainwork&quot;: &quot;0000000000000000000000000000000000000000000000000000000100010001&quot;,
  &quot;nTx&quot;: 1,
  &quot;nextblockhash&quot;: &quot;00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048&quot;,
  &quot;strippedsize&quot;: 285,
  &quot;size&quot;: 285,
  &quot;weight&quot;: 1140,
  &quot;tx&quot;: [
    {
      &quot;txid&quot;: &quot;4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b&quot;,
      &quot;hash&quot;: &quot;4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b&quot;,
      &quot;version&quot;: 1,
      &quot;size&quot;: 204,
      &quot;vsize&quot;: 204,
      &quot;weight&quot;: 816,
      &quot;locktime&quot;: 0,
      &quot;vin&quot;: [
        {
          &quot;coinbase&quot;: &quot;04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73&quot;,
          &quot;sequence&quot;: 4294967295
        }
      ],
      &quot;vout&quot;: [
        {
          &quot;value&quot;: 50.00000000,
          &quot;n&quot;: 0,
          &quot;scriptPubKey&quot;: {
            &quot;asm&quot;: &quot;04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f OP_CHECKSIG&quot;,
            &quot;desc&quot;: &quot;pk(04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f)#vlz6ztea&quot;,
            &quot;hex&quot;: &quot;4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac&quot;,
            &quot;type&quot;: &quot;pubkey&quot;
          }
        }
      ],
      &quot;hex&quot;: &quot;01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4d04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000&quot;
    }
  ]
}
</code></pre>

CC BY-SA 4.0
2023-07-18T21:40:33.320Z
ok.. I was hoping to see it as its raw hex representation.  Is there any way to do that?
patrick
CC BY-SA 4.0
2023-07-18T21:43:20.060Z
The `hex` field of the transaction is its hexadecimal representation.
Vojtěch Strnad
CC BY-SA 4.0
2023-07-18T08:56:00.520Z
2023-07-18T08:56:00.520Z
Vojtěch Strnad
<p>If I try to look at the txn in the genesis block, I get:</p>
<pre><code>root@0eef0ed7601c:/home/bitcoin# bitcoin-cli getrawtransaction 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
error code: -5
error message:
The genesis block coinbase is not considered an ordinary transaction and cannot be retrieved
</code></pre>
<p>Is another way to get it to display?</p>

<bitcoin-cli><coinbase-transaction><genesis-block><getrawtransaction>
How can I look at the genesis block raw txn?
patrick
# How can I look at the genesis block raw txn?

(Asked by: username_0 on 2023-07-18)

If I try to look at the txn in the genesis block, I get:
root@0eef0ed7601c:/home/bitcoin# bitcoin-cli getrawtransaction 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
error code: -5
error message:
The genesis block coinbase is not considered an ordinary transaction and cannot be retrieved

Is another way to get it to display?

**Tags:** bitcoin-cli, coinbase-transaction, genesis-block, getrawtransaction


---

## 1 answers

### Answer by username_1 on 2023-07-18. Score: 2

The genesis block is a special case. Among other quirks, its coinbase transaction doesn't actually create any spendable outputs, which is why the getrawtransaction RPC treats it as if it doesn't exist.
You can still display the transaction as part of the genesis block using getblock:
$ bitcoin-cli getblock 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f 2
{
  "hash": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
  "confirmations": 799215,
  "height": 0,
  "version": 1,
  "versionHex": "00000001",
  "merkleroot": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
  "time": 1231006505,
  "mediantime": 1231006505,
  "nonce": 2083236893,
  "bits": "1d00ffff",
  "difficulty": 1,
  "chainwork": "0000000000000000000000000000000000000000000000000000000100010001",
  "nTx": 1,
  "nextblockhash": "00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048",
  "strippedsize": 285,
  "size": 285,
  "weight": 1140,
  "tx": [
    {
      "txid": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
      "hash": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
      "version": 1,
      "size": 204,
      "vsize": 204,
      "weight": 816,
      "locktime": 0,
      "vin": [
        {
          "coinbase": "04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73",
          "sequence": 4294967295
        }
      ],
      "vout": [
        {
          "value": 50.00000000,
          "n": 0,
          "scriptPubKey": {
            "asm": "04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f OP_CHECKSIG",
            "desc": "pk(04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f)#vlz6ztea",
            "hex": "4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac",
            "type": "pubkey"
          }
        }
      ],
      "hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4d04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000"
    }
  ]
}

> **Comments:**
> **username_0**: ok.. I was hoping to see it as its raw hex representation.  Is there any way to do that?  
> **username_1**: The `hex` field of the transaction is its hexadecimal representation.  

---

