0

I am trying to follow the example from https://getmonero.org/resources/developer-guides/wallet-rpc.html#getbalance

and getting this result:

    $ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"getbalance","params":{"account_index":0}}' -H 'Content-Type: application/json'
    {
      "error": {
        "code": -32601,
        "message": "Method not found"
      },
      "id": "0",
      "jsonrpc": "2.0"
    }

?????

1

That looks very much like user error.

You use port 18081, which is the default daemon RPC port, and are giving it a wallet RPC.

Ask the wallet instead, using the port you selected for it.

  • Pls explain this better. That answer makes no sense to me. I didn't select a port - it's running on whatever the default port is. I have monerod running and I copied the curl example directly from the user guide. Not sure how that could be user error? – hxsquid Jul 15 '18 at 18:34
  • You pasted a command line. This command line contains a port number. This port number is the default one used by the monero daemon. Therefore, it is unlikely to be the wallet's, though possible. But if you say you didn't change the defaults, so it's not and you selected the wrong port number. – user36303 Jul 15 '18 at 23:04
  • getbalance is a wallet command not a node command. Have you started monero-wallet-rpc? I ask because you stated in comment above you are running monerod with no mention of monero-wallet-rpc – jtgrassie Jul 16 '18 at 10:31

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.