`sendmany` curl example is wrong #12067

issue laanwj opened this issue on January 1, 2018
  1. laanwj commented at 10:43 AM on January 1, 2018: member

    The example in RPC help is:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendmany", "params": ["", "{\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\":0.01,\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\":0.02}", 6, "testing"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
    

    Which is wrong: the second argument "{\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\":0.01,\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\":0.02}" needs to be a JSON object, not a JSON object serialized as string, I think this would be correct:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendmany", "params": ["", {"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX":0.01,"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz":0.02}, 6, "testing"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
    
  2. laanwj added the label Docs on Jan 1, 2018
  3. laanwj added the label good first issue on Jan 1, 2018
  4. laanwj added the label RPC/REST/ZMQ on Jan 1, 2018
  5. l2a5b1 referenced this in commit e09b603ca0 on Jan 2, 2018
  6. l2a5b1 referenced this in commit 0d663f8197 on Jan 2, 2018
  7. laanwj closed this on Jan 3, 2018

  8. laanwj referenced this in commit c04cb48df9 on Jan 3, 2018
  9. classesjack referenced this in commit 4d8e8641ce on Jan 12, 2018
  10. hkjn referenced this in commit 64b402144d on Jan 13, 2018
  11. HashUnlimited referenced this in commit deb21973c3 on Mar 15, 2018
  12. lionello referenced this in commit a1616eb38e on Nov 7, 2018
  13. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me