fees

Get transaction fee preview

Changed on

Calculates 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.

post/v1/chains/{chainId}/fees/{safeAddress}/preview

Request

  • The document declares no server URL.
  • Auth: none declared

Path parameters

chainIdstring required
Example:1

Chain ID where the Safe is deployed

safeAddressstring required

Safe contract address (0x prefixed hex string)

Request body

tostring required
valuestring required
datastring required
operation0 | 1 required

Operation type: 0 for CALL, 1 for DELEGATE

gasTokenstring required

Gas token address (0x0...0 for native token)

numberSignaturesnumber required

Number of signatures required for execution

noncestring required

Safe nonce the transaction will use (uint256 string)

origin'SAFE_APP' | 'WALLET_CONNECT' | 'TX_BUILDER' | 'NATIVE'

Transaction origin. Defaults to NATIVE when omitted.

fiatCodestring

Fiat currency code for relay cost conversion (e.g. EUR, GBP). Defaults to USD.

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

maxFeeCapUsdnumber

Maximum fee cap in USD (buffered max fee). Present when the GTF fee flow applies.

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 from object to 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 property allOf list for the response status

    • breaking

      added the new required request property

    • info

      added the new optional request property