Error Code -1 value is type obj, expected real

+2 votes

Hello,

I am trying to use a command issuemore and passing the parameter in json-api as :

{"id":1526293256,"method":"issuemore","params":
["1C6ZGuhbKsbjKNG6K8YvTS43x7fdqZiRLowm2","01","0",
{"empName":"121","empSalary":"2121","empDept":"21","empDesgn":"21"}]}
 
I am getting the following error:
Error Code -1 value is type obj, expected real
Can you help me what I am doing wrong here. Thanks
asked May 14, 2018 by piyush.sahay
edited May 14, 2018 by piyush.sahay

1 Answer

0 votes

If you're getting these kinds of JSON API errors, in general it's recommended to use multichain-cli to send the API request, then you can look at the first line of its output that shows the request.

In this case it looks like you may have the asset name wrong (unless it's actually called 01), your quantity is a string instead of a number and you're missing the native amount parameter which comes before the details object.

answered May 14, 2018 by MultiChain
...