<p>I've found the solution:</p>
<pre><code>query currentEpochProtocolParams {
  cardano {
    currentEpoch {
      number
      protocolParams {
        a0
        coinsPerUtxoWord
        collateralPercent
        costModels
        decentralisationParam
        eMax
        extraEntropy
        keyDeposit
        maxBlockBodySize
        maxBlockExMem
        maxBlockExSteps
        maxBlockHeaderSize
        maxCollateralInputs
        maxTxExMem
        maxTxExSteps
        maxTxSize
        maxValSize
        minFeeA
        minFeeB
        minPoolCost
        minUTxOValue
        nOpt
        poolDeposit
        priceMem
        priceStep
        protocolVersion
        rho
        tau
      }
    }
  }
}
</code></pre>

CC BY-SA 4.0
2022-02-17T14:44:21.493Z
2022-02-17T14:44:21.493Z
mahnunchik
<p>How can I get protocol parameters <em>only for the latest epoch</em> using GraphQL?</p>
<p>I can get protocol parameters with cardano-cli:</p>
<pre><code>cardano-cli query protocol-parameters \
  --testnet-magic 1097911063 \
  --out-file $HOME/cardano/protocol.json
</code></pre>
<p>I can get protocol parameters for multiple epochs with help of this query</p>
<p><a href="https://github.com/input-output-hk/cardano-graphql/blob/master/packages/api-cardano-db-hasura/src/example_queries/epochs/epochProtocolParams.graphql" rel="nofollow noreferrer">https://github.com/input-output-hk/cardano-graphql/blob/master/packages/api-cardano-db-hasura/src/example_queries/epochs/epochProtocolParams.graphql</a></p>

<cardano-graphql><shelley>
How to get protocol parameters **only for latest epoch** with GraphQL?
# How to get protocol parameters **only for latest epoch** with GraphQL?

(Asked by: username_0 on 2022-02-17)

How can I get protocol parameters only for the latest epoch using GraphQL?
I can get protocol parameters with cardano-cli:
cardano-cli query protocol-parameters \
  --testnet-magic 1097911063 \
  --out-file $HOME/cardano/protocol.json

I can get protocol parameters for multiple epochs with help of this query
https://github.com/input-output-hk/cardano-graphql/blob/master/packages/api-cardano-db-hasura/src/example_queries/epochs/epochProtocolParams.graphql

**Tags:** cardano-graphql, shelley

---

## 1 answers

### Answer by username_0 on 2022-02-17. Score: 1

I've found the solution:
query currentEpochProtocolParams {
  cardano {
    currentEpoch {
      number
      protocolParams {
        a0
        coinsPerUtxoWord
        collateralPercent
        costModels
        decentralisationParam
        eMax
        extraEntropy
        keyDeposit
        maxBlockBodySize
        maxBlockExMem
        maxBlockExSteps
        maxBlockHeaderSize
        maxCollateralInputs
        maxTxExMem
        maxTxExSteps
        maxTxSize
        maxValSize
        minFeeA
        minFeeB
        minPoolCost
        minUTxOValue
        nOpt
        poolDeposit
        priceMem
        priceStep
        protocolVersion
        rho
        tau
      }
    }
  }
}


---

