What's wrong with this getrawtransaction JSON-RPC call?

2

This is a very simple question. I'm trying implement a client for Bitcoind JSON API and I'm stuck on this getrawtransaction call:

{"id":"getrawtransaction",
"param":["91eb6cb34b9253cce0ab5da171a0f5aae9d3d36208e23062ba61cd9e21c09a3d",1],
"method":"getrawtransaction","jsonrpc":"2.0"}

As the result I get:

{"result":null,"error":{"code":-1,"message":"getrawtransaction <txid> 
[verbose=0]\nIf verbose=0, returns a string that is\nserialized, hex-encoded data for
 <txid>.\nIf verbose is non-zero, returns an Object\nwith information about
 <txid>."},"id":"getrawtransaction"}

Could someone point me at what can be wrong? I'm sure it's something simple but I cannot get it. Bitcoind v. 0.8.

Alexey Kalmykov

Posted 2013-05-05T18:14:04.737

Reputation: 744

Answers

3

I think that should be "params" not "param"

nanotube

Posted 2013-05-05T18:14:04.737

Reputation: 2 254

Thanks! Shame on me. I knew it would be something stupid:)Alexey Kalmykov 2013-05-05T18:29:16.740

Hehe, happens to all of us. :)nanotube 2013-05-05T18:35:51.447