queryLedgerState/protocolParameters

Query the current protocol parameters

Query the current Cardano protocol parameters including fees, limits, and governance settings.

Request

{
  "jsonrpc": "2.0",
  "method": "queryLedgerState/protocolParameters"
}

No parameters required.

Loading...

Response

{
  "jsonrpc": "2.0",
  "method": "queryLedgerState/protocolParameters",
  "result": {
    "minFeeCoefficient": 44,
    "minFeeConstant": { "ada": { "lovelace": 155381 } },
    "minUtxoDepositCoefficient": 4310,
    "maxBlockBodySize": { "bytes": 90112 },
    "maxBlockHeaderSize": { "bytes": 1100 },
    "maxTransactionSize": { "bytes": 16384 },
    "maxValueSize": { "bytes": 5000 },
    "stakeCredentialDeposit": { "ada": { "lovelace": 2000000 } },
    "stakePoolDeposit": { "ada": { "lovelace": 500000000 } },
    "stakePoolRetirementEpochBound": 18,
    "desiredNumberOfStakePools": 500,
    "stakePoolPledgeInfluence": "3/10",
    "monetaryExpansion": "3/1000",
    "treasuryExpansion": "1/5",
    "version": { "major": 10, "minor": 0 },
    "minStakePoolCost": { "ada": { "lovelace": 170000000 } },
    "collateralPercentage": 150,
    "maxCollateralInputs": 3,
    "plutusCostModels": { ... },
    "scriptExecutionPrices": {
      "memory": "577/10000",
      "cpu": "721/10000000"
    },
    "maxExecutionUnitsPerTransaction": {
      "memory": 14000000,
      "cpu": 10000000000
    },
    "maxExecutionUnitsPerBlock": {
      "memory": 62000000,
      "cpu": 20000000000
    }
  }
}

Key Parameters

Fee Calculation

ParameterDescription
minFeeCoefficientFee per byte (44 lovelace/byte)
minFeeConstantBase fee (~0.155 ADA)
collateralPercentageScript collateral requirement (150%)

Fee formula: fee = minFeeConstant + (minFeeCoefficient × txSize)

Transaction Limits

ParameterValueDescription
maxTransactionSize16,384 bytesMaximum transaction size
maxValueSize5,000 bytesMaximum output value size
maxCollateralInputs3Max collateral UTxOs

Script Execution

ParameterDescription
scriptExecutionPrices.memoryPrice per memory unit
scriptExecutionPrices.cpuPrice per CPU step
maxExecutionUnitsPerTransactionMax execution units per tx
maxExecutionUnitsPerBlockMax execution units per block

Staking

ParameterValueDescription
stakeCredentialDeposit2 ADADeposit to register stake key
stakePoolDeposit500 ADADeposit to register pool
desiredNumberOfStakePools500Target pool count (k parameter)

Code Examples

const response = await fetch('https://api.nacho.builders/v1/ogmios', {
method: 'POST',
headers: {
  'Content-Type': 'application/json',
  'apikey': process.env.NACHO_API_KEY
},
body: JSON.stringify({
  jsonrpc: '2.0',
  method: 'queryLedgerState/protocolParameters'
})
});

const { result } = await response.json();

// Calculate minimum fee for a transaction
function calculateMinFee(txSizeBytes) {
const coefficient = result.minFeeCoefficient;
const constant = result.minFeeConstant.ada.lovelace;
return constant + (coefficient * txSizeBytes);
}

console.log('Min fee for 300 byte tx:', calculateMinFee(300), 'lovelace');

Use Cases

  • Fee calculation - Calculate transaction fees before building
  • Script validation - Check execution unit limits
  • Wallet configuration - Get minimum UTxO values
  • Governance - Monitor protocol parameter changes

Full Ogmios API Reference

Was this page helpful?