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
| Parameter | Description |
|---|---|
minFeeCoefficient | Fee per byte (44 lovelace/byte) |
minFeeConstant | Base fee (~0.155 ADA) |
collateralPercentage | Script collateral requirement (150%) |
Fee formula: fee = minFeeConstant + (minFeeCoefficient × txSize)
Transaction Limits
| Parameter | Value | Description |
|---|---|---|
maxTransactionSize | 16,384 bytes | Maximum transaction size |
maxValueSize | 5,000 bytes | Maximum output value size |
maxCollateralInputs | 3 | Max collateral UTxOs |
Script Execution
| Parameter | Description |
|---|---|
scriptExecutionPrices.memory | Price per memory unit |
scriptExecutionPrices.cpu | Price per CPU step |
maxExecutionUnitsPerTransaction | Max execution units per tx |
maxExecutionUnitsPerBlock | Max execution units per block |
Staking
| Parameter | Value | Description |
|---|---|---|
stakeCredentialDeposit | 2 ADA | Deposit to register stake key |
stakePoolDeposit | 500 ADA | Deposit to register pool |
desiredNumberOfStakePools | 500 | Target 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?