Why I'm not able to query pool-params from cli?

I’m using the below command to query stake pool as per doc 9. Querying a Stake Pool — cardano-node Documentation 1.0.0 documentation

cardano-cli query pool-params
–stake-pool-id cb416392997a88c272733182fbdc42cd1333b1ec525f55c69c8effa5
–testnet-magic 1097911063

But getting this error
Invalid argument `pool-params’

Kindly correct me If there I’m firing wrong command on terminal.


hmm, seems this param not available with the current version of cardano-cli…
as a workaround you can query the ledger state and grep the pool-id:

cardano-cli query ledger-state --mainnet > ledger-state.json
grep -A30 <pool_id> ledger-state.json

Hi I tried this command on testnet

cardano-cli query ledger-state --testnet-magic 1097911063 > ledger-state.json | grep -A30 cb416392997a88c272733182fbdc42cd1333b1ec525f55c69c8effa5 ledger-state.json

but it returns nothing. Am I making any mistake in firing command ?

try not using pipeline, so it is two separate command, if you want to execute in-line, then either remove the redirection
cardano-cli query ledger-state --testnet-magic 1097911063 | grep -A30 cb416392997a88c272733182fbdc42cd1333b1ec525f55c69c8effa5

or use ; instead of | - this way you keep the ledger state for further grep; note the ledger state file size is more then 500 MB…

cardano-cli query ledger-state --testnet-magic 1097911063 > ledger-state.json; grep -A30 cb416392997a88c272733182fbdc42cd1333b1ec525f55c69c8effa5 ledger-state.json

1 Like

Thank you Now, I can see the details from the command.

1 Like