Get transaction fee preview
Changed onCalculates the estimated fees for executing a transaction via Pay with Safe. The fee model applied is selected internally per-chain and is transparent to the caller.
Request
- The document declares no server URL.
- Auth: none declared
Path parameters
Chain ID where the Safe is deployed
Safe contract address (0x prefixed hex string)
Request body
Example request
{
"gasToken": "0x0000000000000000000000000000000000000000",
"numberSignatures": 2,
"nonce": "42",
"fiatCode": "EUR"
}Response
Fee preview with transaction data plus, depending on the fee model applied for the chain, either a relay cost or a fee breakdown
Example response
{
"txData": {
"chainId": "1",
"safeAddress": "0x...",
"safeTxGas": "150000",
"baseGas": "48564",
"gasPrice": "195000000000000",
"gasToken": "0x0000000000000000000000000000000000000000",
"refundReceiver": "0x0000000000000000000000000000000000000000",
"numberSignatures": 2
},
"relayCost": {
"fiatCode": "USD",
"fiatValue": "0.0025"
},
"feeBreakdown": {
"txValueUsd": 1000,
"tierBps": 5,
"gtfFeeUsd": 0.5,
"relayCostUsd": 38.22,
"totalUsd": 38.72,
"numberSignatures": 2,
"valuationDetails": [
{
"symbol": "USDC",
"amount": "1000"
}
]
}
}Changes
- breaking
the response property
became optional for the status - breaking
the
response's property type changed fromobjectto no type for status - breaking
removed the required property
from the response with the status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added to the
response propertyallOflist for the response status
- breaking
- breaking
added the new required request property
- info
added the new optional request property
- breaking