MegTrustDevelopers

Estimate network fees

Show the network fee before a payout or swap, in the network coin and USD, at three speeds.

GET /api/v1/fees?network=<id> returns the network's current fee at three levels, low, medium and high, and what each costs for a transfer, a token transfer and a swap.

  • Read-only. It moves nothing and is the same for every workspace.
  • Use the network id a wallet shows, for example eth-mainnet from a wallet's deposit_addresses.
  • Estimates, not a promise. The network sets the final fee when the transaction is broadcast. Read a fresh estimate just before each approval: fees move from block to block.
  • Cap what a payout pays. Pass a figure from here as max_fee on a payout, in the same coin. See Cap the network fee.
const result = await api.request("GET", "/api/v1/fees?network=eth-mainnet");
const { medium } = result.body.data;
200
{
  "data": {
    "network": "eth-mainnet",
    "network_name": "Ethereum",
    "coin": "ETH",
    "coin_usd": 2500,
    "rate_unit": "gwei",
    "low": {
      "rate": "1",
      "transfer": { "coin": "0.000021", "usd": 0.05 },
      "token_transfer": { "coin": "0.000065", "usd": 0.16 },
      "swap": { "coin": "0.0003", "usd": 0.75 }
    },
    "medium": {
      "rate": "2.5",
      "transfer": { "coin": "0.0000525", "usd": 0.13 },
      "token_transfer": { "coin": "0.0001625", "usd": 0.41 },
      "swap": { "coin": "0.00075", "usd": 1.88 }
    },
    "high": {
      "rate": "6",
      "transfer": { "coin": "0.000126", "usd": 0.32 },
      "token_transfer": { "coin": "0.00039", "usd": 0.98 },
      "swap": { "coin": "0.0018", "usd": 4.5 }
    },
    "units": { "unit": "gas", "transfer": 21000, "token_transfer": 65000, "swap": 300000 },
    "estimated_at": "2026-10-14T09:00:00.000Z"
  },
  "meta": {}
}

How the amounts are worked out

Each amount is the tier's rate multiplied by a standard job size, listed in data.units:

JobEVM networksBitcoin
transfer (the network coin)21,000 gas141 vbytes
token_transfer (for example USDC)65,000 gasnull
swap300,000 gasnull

swap is a safe upper estimate: a typical single-pool swap uses less, and the figure already includes an exact-amount token approval. token_transfer and swap are null on networks without tokens or swaps.

Coin amounts are exact decimal strings. usd is an indicative value rounded to 2 decimals, and is null when no price is available. Never show a null as zero.

Results

ResponseMeaningWhat to do
200The estimate.Show it; re-read before each approval.
400 validation_failednetwork is missing or is not a network this environment offers.Use a network id from a wallet.
422 network_not_supportedFee estimates are not available for this network.Don't show a fee estimate for it.
503 service_unavailableThe fee could not be read just now.Retry after Retry-After.

On this page