<p>You can use the <code>getindexinfo</code> RPC call to list (and get the status of) all the available indexes since version 0.21 (currently in rc3).</p>
<p>On my local <code>bitcoind</code> with (only) <code>txindex</code> enabled, here is the output:</p>
<pre><code>$ bitcoin-cli getindexinfo
{
  &quot;txindex&quot;: {
    &quot;synced&quot;: true,
    &quot;best_block_height&quot;: 660887
  }
}
</code></pre>

CC BY-SA 4.0
2020-12-14T12:39:37.570Z
2020-12-14T12:39:37.570Z
Antoine Poinsot
<p>Using JSONRPC, how do I detect if a node has <code>-txindex</code> enabled?</p>

<bitcoin-core><bitcoind><json-rpc>
Is it possible to detect if flag -txindex is enabled using RPC?
warchantua
# Is it possible to detect if flag -txindex is enabled using RPC?

(Asked by: username_0 on 2020-12-14)

Using JSONRPC, how do I detect if a node has `-txindex` enabled?

**Tags:** bitcoin-core, bitcoind, json-rpc


---

## 1 answers

### Answer by username_1 on 2020-12-14. Score: 1 | Accepted answer

You can use the `getindexinfo` RPC call to list (and get the status of) all the available indexes since version 0.21 (currently in rc3).

On my local `bitcoind` with (only) `txindex` enabled, here is the output:

```
$ bitcoin-cli getindexinfo
{
  "txindex": {
    "synced": true,
    "best_block_height": 660887
  }
}

```


---

