Skip to main content
POST
/
v1
/
w3s
/
transactions
/
transfer
/
estimateFee
Estimate fee for a transfer transaction
curl --request POST \
  --url https://api.circle.com/v1/w3s/transactions/transfer/estimateFee \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-User-Token: <x-user-token>' \
  --data '{
  "amounts": [
    "6.62607015"
  ],
  "destinationAddress": "0xca9142d0b9804ef5e239d3bc1c7aa0d1c74e7350",
  "nftTokenIds": [
    "2"
  ],
  "sourceAddress": "0x1bf9ad0cc2ad298c69a2995aa806ee832788218c",
  "tokenId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tokenAddress": "<string>",
  "blockchain": "MATIC-AMOY",
  "walletId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11"
}'
{
  "data": {
    "high": {
      "gasLimit": "21000",
      "gasPrice": "<string>",
      "maxFee": "5.935224468",
      "priorityFee": "1.022783914",
      "baseFee": "1.022783914",
      "networkFee": "0.0001246397138",
      "networkFeeRaw": "0.0001246397138"
    },
    "low": {
      "gasLimit": "21000",
      "gasPrice": "<string>",
      "maxFee": "5.935224468",
      "priorityFee": "1.022783914",
      "baseFee": "1.022783914",
      "networkFee": "0.0001246397138",
      "networkFeeRaw": "0.0001246397138"
    },
    "medium": {
      "gasLimit": "21000",
      "gasPrice": "<string>",
      "maxFee": "5.935224468",
      "priorityFee": "1.022783914",
      "baseFee": "1.022783914",
      "networkFee": "0.0001246397138",
      "networkFeeRaw": "0.0001246397138"
    },
    "callGasLimit": "69222",
    "verificationGasLimit": "56863",
    "preVerificationGas": "44112"
  }
}

Authorizations

Authorization
string
header
required

Circle's API Keys are formatted in the following structure "PREFIX:ID:SECRET". All three parts are requred to make a successful request.

Headers

X-User-Token
string
required

Unique system generated JWT session token for specific user.

X-Request-Id
string

Developer-provided parameter used to identify this request. Useful when communicating with Circle Support.

Example:

"2adba88e-9d63-44bc-b975-9b6ae3440dde"

Body

application/json

Estimate transaction fee request

amounts
string[]
required

Transfer amounts in decimal number format, at least one element is required for transfer. For ERC721 token transfer, the amounts field is required to be ["1"] (array with "1" as the only element).

Minimum length: 1
Example:
["6.62607015"]
destinationAddress
string
required

Blockchain generated unique identifier, associated with wallet (account), smart contract or other blockchain objects.

Example:

"0xca9142d0b9804ef5e239d3bc1c7aa0d1c74e7350"

nftTokenIds
string[]

List of NFT token IDs corresponding with the NFTs to transfer. Batch transfers are supported only for ERC-1155 tokens. The length of NFT token IDs must match the length of amounts.

The NFT token ID.

sourceAddress
string

Source address of the transaction. Required along with blockchain if walletId is not provided. The sourceAddress and walletId fields are mutually exclusive.

Example:

"0x1bf9ad0cc2ad298c69a2995aa806ee832788218c"

tokenId
string<uuid>

System generated identifier of the token. Excluded with tokenAddress and tokenBlockchain.

tokenAddress
string

Blockchain address of the transferred token. Empty for native tokens. Excluded with tokenId.

blockchain
enum<string>

Blockchain of the transferred token. Required if tokenId is not provided. The blockchain and tokenId fields are mutually exclusive.

Available options:
ETH,
ETH-SEPOLIA,
AVAX,
AVAX-FUJI,
MATIC,
MATIC-AMOY,
SOL,
SOL-DEVNET,
ARB,
ARB-SEPOLIA,
UNI,
UNI-SEPOLIA,
BASE,
BASE-SEPOLIA,
OP,
OP-SEPOLIA,
APTOS,
APTOS-TESTNET
Example:

"MATIC-AMOY"

walletId
string<uuid>

Unique system generated identifier of the wallet. Required when sourceAddress and blockchain are not provided. Mutually exclusive with sourceAddress and blockchain. For contract deploys this wallet ID will be used as the source.

Example:

"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11"

Response

Transaction fee estimated

data
object
required