Hi all,
this is my first post on BTC Forum. I am experimenting with Bitcoin Core RPC, and with curl in particular, on Ubuntu.
I start the server: > bitcoind -rest &
I have a Bitcoin Core wallet just for testing. I am able to call some RPC, using bitcoin-cli and curl, for instance:
curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listaccounts", "params": [6] }'
http://USER:[email protected]:8332/I successfully RPC-ed the "walletpassphrase"
curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "walletpassphrase", "params": ["WALLETPASSWD", 60] }'
http://USER:[email protected]:8332/ , getting:
{"result":null,"error":null,"id":"curltest"}
When I try to call the "sendmany" procedure, I get errors:
- if I try to transfer 0.0002 BTC to 3 addresses:
curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendmany", "params": ["", "{\"1HwLtBDtLGeHrLkGWHKfE7WgbCz5FbdWW4\":0.0002, \"1G3kKtEK356sfkKaykQvnv37GFUPR3Lns4\":0.0002, \"1KigrTAFLRiZQuHEeX1TwfgzvijtvxU4WA\":0.0002}", 6, "testing"] }'
http://USER:[email protected]:8332/ , I get:
{"result":null,"error":{"code":-1,"message":"JSON value is not an object as expected"},"id":"curltest"}
- if I try to transfer 0.0002 BTC to 2 addresses (same call):
curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendmany", "params": ["", "{\"1HwLtBDtLGeHrLkGWHKfE7WgbCz5FbdWW4\":0.0002, \"1G3kKtEK356sfkKaykQvnv37GFUPR3Lns4\":0.0002}", 6, "testing"] }'
http://USER:[email protected]:8332/ , I get:
{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}
Can someone please help?
TIA
Michele