<p>You're trying to run code from example, dont do it, try with <strong>real</strong> transaction id, not from examples.</p>

<pre><code>Examples:
&gt; bitcoin-cli gettransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"
&gt; bitcoin-cli gettransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d" true
&gt; curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettransaction", "params": ["1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
</code></pre>

CC BY-SA 4.0
2018-12-24T11:59:56.973Z
2018-12-24T11:59:56.973Z
Roman Kiselenko
<p>I am trying this command to get transaction from bitvoin testnet:</p>

<pre><code>curl  --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettransaction", "params": ["txId"] }' -H 'content-type: text/plain;' http://username:password@IP:PORT/
</code></pre>

<p>And i am getting following error</p>

<pre><code>{ "result":null, "error":{"code" :-32601, "message" : "Method not found"}, id:curltext}
</code></pre>

<p>Please help. </p>

<bitcoind><bitcoin-core-development>
Unable to get transaction with json-rpc command
Nancy
# Unable to get transaction with json-rpc command

(Asked by: username_0 on 2018-12-24)

I am trying this command to get transaction from bitvoin testnet:

```
curl  --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettransaction", "params": ["txId"] }' -H 'content-type: text/plain;' http://username:password@IP:PORT/

```

And i am getting following error

```
{ "result":null, "error":{"code" :-32601, "message" : "Method not found"}, id:curltext}

```

Please help.

**Tags:** bitcoind, bitcoin-core-development


---

## 1 answers

### Answer by username_1 on 2018-12-24. Score: 1

You're trying to run code from example, dont do it, try with **real** transaction id, not from examples.

```
Examples:
> bitcoin-cli gettransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"
> bitcoin-cli gettransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d" true
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettransaction", "params": ["1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

```


---

