I been messing around with electrum and decided to try its jsonrpc. After setting up the daemon and run the curl command, it gives an server error after running it.
curl --data-binary '{"id":"curltext","method":"getbalance","params":[]}' http://127.0.0.1:7777
{"error": {"message": "Server error: File \"/usr/lib/python2.7/site-packages/electrum/commands.py\", line 301, in getbalance | AttributeError: 'NoneType' object has no attribute 'get_balance'", "code": -32603}, "jsonrpc": "2.0", "id": "curltext"}
Does electrum still support this? The version im using is 2.8.2. Maybe im doing something wrong or maybe something broke between the version the doc used and now.
The function is get_balance with an underscore. Check out
http://docs.electrum.org/en/latest/protocol.html for more information on the JSONRPC.
I tried that before and got an error that the method isnt supported (it does it with about anything that is not a proper command).
curl --data-binary '{"id":"curltext","method":"get_balance","params":[]}' http://127.0.0.1:7777
{"error": {"message": "Method get_balance not supported.", "code": -32601}, "jsonrpc": "2.0", "id": "curltext"}
With random method
curl --data-binary '{"id":"curltext","method":"balanceget","params":[]}' http://127.0.0.1:7777
{"error": {"message": "Method balanceget not supported.", "code": -32601}, "jsonrpc": "2.0", "id": "curltext"}
EDIT: I did notice that there was a fix in
https://github.com/spesmilo/electrum/commit/0e49274eae9f497164ecc694729acdcf1188a43a but did that ever make it out in 2.8.2 or should I install master?