I am trying this command to get transaction from bitcoin 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}

2 Answers 2


Is your core compiled with the wallet? Because gettransaction RPC get wallet transactions, and hence need wallet capabilities. For general transactions, you should use getrawtransaction instead.
I ran it here (with wallet enabled) and works just fine.


You're passing invalid transaction to the gettransaction method.

  • no that's not the case. I am passing a valid txId. Dec 26, 2018 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.