How to view stake accounts via CLI

Hi, I’m currently searching for a way to view all the stake accounts of an “account address” view CLI.

I know I can view all the tokens an account has with spl-token accounts but I haven’t been able to figure out how to view all the stake accounts. How do I view this through CLI?

Not positive this is right, but maybe the solana stakes command.

I don’t have an account with stake to test it on right now, but you should try that.

Thanks for the reply.
Yes, I tried that but unfortunately it returns nothing. Not sure if it’s not working yet or there is some kind of bug because in the --help it does seem like it should return my stake accounts by passing my wallet address. But it returns nothing.

This is the command I tried.
solana stakes <MY WALLET ADDRESS>

It returns nothing when I have 5 stake accounts.

Looking back at it now, I just noticed I need to pass the [VOTE_ACCOUNT_PUBKEYS] instead so I’m assuming this is the wrong command in general.

Try running solana stakes without specifying the address afterwards.

I think it’s supposed to list the stake accounts associated with your default Solana key if you don’t specifically specify the -k flag.

I could be wrong. I may have to experiment with it if I get the chance.

solana stakes loads all staking accounts for everybody.
Looks like hundreds if not thousands of results

Oh, OK, then you might not be able to filter from the CLI.

From the API you are able to say "give me all accounts owned by a certain smart contract where a certain offset and length of bytes inside of the account’s data matches a certain value. This might be used to query all the stake accounts for a specific user, but I’m not 100% sure what the account format standard is yet.