Question regarding getmultibalances

+1 vote
Can you please provide me with an example when we want to check for balance of multiple assets on multiple addresses. For example, i've put:

getmultibalances 1Z1TDmQtkwdjrRgzajLJJiUEA2VTQkWtJafAGi asset1

However i get "Error parsing JSON:asset1" error, probably due to bad parameter insertion. Thank you in advance.
asked May 21, 2016 by anonymous

1 Answer

0 votes

The assets parameter has to be specified as an array, because asset names can contain a comma. So the syntax would be:

getmultibalances 1Z1TDmQtkwdjrRgzajLJJiUEA2VTQkWtJafAGi ["asset1"]

FYI the addresses parameter can be a comma-delimited list or an array.

answered May 21, 2016 by MultiChain
String[] s = new String[]{"1wz6oeiDirBWk4NBvsJz6UstkAduX9zi7xbnJ", "15B9xqugb9A6rVvAxb998c2jPx926S3VSY37UZ"};
MultiBalance list2 = getMultiChainCommand().getAddressCommand()
.getMultiBalances(s);
response 500 error. I am using java lib https://github.com/SimplyUb/MultiChainJavaAPI in android.
p.s. if getMultiBalances() - work. getMultiBalances(s) - not work ;(
...