Documentation exported from Syscoin Core 4.1.2

listassetallocations (4.1.2 RPC)

blockchain

control

generating

governance

governancewallet

mining

network

rawtransactions

syscoin

syscoinwallet

util

wallet

zmq

listassetallocations ( count from {"asset_guid":n,"addresses":["address",...]} )

Scan through all asset allocations.

Arguments:
1. count                   (numeric, optional, default=10) The number of results to return.
2. from                    (numeric, optional, default=0) The number of results to skip.
3. options                 (json object) A json object with options to filter results.
     {
       "asset_guid": n,    (numeric) Asset GUID to filter
       "addresses": [      (json array) A json array with owners
         "address",        (string) Address to filter
         ...
       ],
     }

Result:
[
  {
    "asset_allocation":   (string) The unique key for this allocation
    "asset_guid":         (string) The guid of the asset
    "symbol":             (string) The asset symbol
    "address":            (string) The address of the owner of this allocation
    "balance":            (numeric) The current balance
    "balance_zdag":       (numeric) The zdag balance
    "locked_outpoint":    (string) The locked UTXO if applicable for this allocation
  }
  ...
]

Examples:
> syscoin-cli listassetallocations 0
> syscoin-cli listassetallocations 10 10
> syscoin-cli listassetallocations 0 0 '{"asset_guid":92922}'
> syscoin-cli listassetallocations 0 0 '{"addresses":[{"address":"sys1qw40fdue7g7r5ugw0epzk7xy24tywncm26hu4a7"},{"address":"sys1qw40fdue7g7r5ugw0epzk7xy24tywncm26hu4a7"}]}'
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listassetallocations", "params": [0] }' -H 'content-type: text/plain;' http://127.0.0.1:8370/
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listassetallocations", "params": [10, 10] }' -H 'content-type: text/plain;' http://127.0.0.1:8370/
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listassetallocations", "params": [0, 0, '{"asset_guid":92922}'] }' -H 'content-type: text/plain;' http://127.0.0.1:8370/
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listassetallocations", "params": [0, 0, '{"addresses":[{"address":"sys1qw40fdue7g7r5ugw0epzk7xy24tywncm26hu4a7"},{"address":"sys1qw40fdue7g7r5ugw0epzk7xy24tywncm26hu4a7"}]}'] }' -H 'content-type: text/plain;' http://127.0.0.1:8370/