json-rpc of bitcoin not working for testnet(curl command)

0

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}

Divya Singh

Posted 2018-12-25T07:23:16.000

Reputation: 1

Answers

0

You're passing invalid transaction to the gettransaction method.

Зелёный

Posted 2018-12-25T07:23:16.000

Reputation: 871

no that's not the case. I am passing a valid txId.Divya Singh 2018-12-26T09:11:18.847