Skip to main content
POST
/
v1
/
estimate
Estimate fees and expiration block heights for a transfer
curl --request POST \
  --url https://gateway-api-testnet.circle.com/v1/estimate \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "spec": {
      "version": 1,
      "sourceDomain": 0,
      "destinationDomain": 4,
      "sourceContract": "0x1234567890123456789012345678901234567890123456789012345678901234",
      "destinationContract": "0x1234567890123456789012345678901234567890123456789012345678901234",
      "sourceToken": "0x1234567890123456789012345678901234567890123456789012345678901234",
      "destinationToken": "0x1234567890123456789012345678901234567890123456789012345678901234",
      "sourceDepositor": "0x1234567890123456789012345678901234567890123456789012345678901234",
      "destinationRecipient": "0x1234567890123456789012345678901234567890123456789012345678901234",
      "sourceSigner": "0x1234567890123456789012345678901234567890123456789012345678901234",
      "destinationCaller": "0x1234567890123456789012345678901234567890123456789012345678901234",
      "value": "1000000000000000000",
      "salt": "0x1234567890123456789012345678901234567890123456789012345678901234",
      "hookData": "0x1a2b3c4d"
    },
    "maxBlockHeight": "1000000000000000000",
    "maxFee": "1000000000000000000"
  }
]
'
{
  "body": [
    {
      "burnIntent": {
        "maxBlockHeight": "1000000000000000000",
        "maxFee": "1000000000000000000",
        "spec": {
          "version": 1,
          "sourceDomain": 0,
          "destinationDomain": 4,
          "sourceContract": "0x1234567890123456789012345678901234567890",
          "destinationContract": "0x1234567890123456789012345678901234567890",
          "sourceToken": "0x1234567890123456789012345678901234567890",
          "destinationToken": "0x1234567890123456789012345678901234567890",
          "sourceDepositor": "0x1234567890123456789012345678901234567890",
          "destinationRecipient": "0x1234567890123456789012345678901234567890",
          "sourceSigner": "0x1234567890123456789012345678901234567890",
          "destinationCaller": "0x1234567890123456789012345678901234567890",
          "value": "1000000000000000000",
          "salt": "0x1234567890123456789012345678901234567890123456789012345678901234",
          "hookData": "0x1a2b3c4d"
        },
        "recipientSetupOptions": {
          "includeRecipientSetup": true,
          "recipientOwnerAddress": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
        }
      }
    }
  ],
  "fees": {
    "total": "1.178",
    "token": "USDC",
    "perIntent": [
      {
        "transferSpecHash": "0x1234567890123456789012345678901234567890123456789012345678901234",
        "domain": 0,
        "baseFee": "2",
        "transferFee": "0.125"
      }
    ],
    "forwardingFee": "0.210000"
  }
}

Query Parameters

maxAttestationSize
integer

Maximum allowed size (in bytes) for the encoded attestation.

Required range: x >= 1
enableForwarder
boolean
default:false

Whether to enable the forwarding service for estimating the fees.

Body

application/json
Minimum array length: 1

A burn intent for estimation purposes without signatures. Optional maxBlockHeight and maxFee for cost estimation.

spec
object
required
maxBlockHeight
string

The maximum block height at which this burn is valid (optional for estimation).

Example:

"1000000000000000000"

maxFee
string

The maximum fee the user is willing to pay (optional for estimation).

Example:

"1000000000000000000"

recipientSetupOptions
object

Options for automatic Associated Token Account (ATA) creation on Solana. When the destination chain is Solana, the destinationRecipient must be an initialized USDC token account. If the recipient does not already have one, the Forwarding Service can create the ATA as part of the mint transaction. Omit this field if the recipient already has a USDC token account.

Response

Successfully calculated the estimated fees and expiration block heights

Response containing estimated burn intents with calculated fees and expiration block heights.

body
object[]
required

Array of burn intents or burn intent sets with calculated fees and expiration block heights.

fees
object
required

Information on the estimated fees to be charged.