Let's say I have deployed the standard eosio.token contract to an account called "myeosiotoken," and I have used it to create an "ABC" token. Then, I issue 1,000 ABC to "someaccount1" and 2,000 ABC to "someaccount2."

I can retrieve the balance of 1,000 ABC on someaccount1 with:

cleos get table myeosiotoken someaccount1 accounts

And I can retrieve the balance of 2,000 ABC on someaccount2 with:

cleos get table myeosiotoken someaccount2 accounts

Is there a way to use cleos to retrieve a list of ALL balances of token ABC in the accounts table?

Is there a way to use cleos to retrieve a list of ALL balances of ALL tokens in the accounts table?

  • Just use cleos get table myeosiotoken myeosiotoken accounts to retrieve balance.
    – Mr.Y
    Feb 11, 2019 at 13:14
  • Unfortunately, that will only retrieve the token balance held by the contract itself. Feb 11, 2019 at 13:16
  • yes that you exactly asked in first question.
    – Mr.Y
    Feb 11, 2019 at 13:19
  • My bad, that's poor wording on my part. Fixing it. Feb 11, 2019 at 13:20
  • no problem.....
    – Mr.Y
    Feb 11, 2019 at 13:22

1 Answer 1


The only way to do it with a standard eosio.token contract would be to use something like the state_history_plugin to see which accounts had the open command used on them, and then write a script to loop through all of those accounts with the get table command you state in the question.

If you are capable of adapting the contract for yourself, then you can always add another table which would list all of the users and their current balances.

You can also check all scopes with: cleos get scope -t accounts myeosiotoken

  • I just found out about "cleos get scope -t accounts myeosiotoken", it lists all "scopes" (which seems to mean blockchain accounts, in my mind) that "have" records in the given table (in that case, "accounts"). If you omit the -t parameter, it lists all accounts that "have" (whatever that means in the memory model) any table records that "originate" (again, whatever) from the given contract/account (myeosiotoken in this case). It won't list the token balances, but it seems to give the full list of accounts that have a table row/balance that I can query. Feb 11, 2019 at 14:56
  • Thanks I didn't know that! I added it to the answer Feb 11, 2019 at 16:15
  • unfortunately the newer version of cleos does not support the command any longer. cleos get scope -t accounts myeosiotoken throws the error: ERROR: ExtrasError: [scope -t]. Is there another way to get all scopes of a table using cleos? Jun 13, 2021 at 7:25
  • It works for me on EOS v2.1, which version of EOS are you using? Jun 14, 2021 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.