4

402rates.com · Settlement Costs

by 402rates.com

GETBaseArbitrumPolygonXDC

$0.01

per call · USD Coin on Base

What a USDC transfer actually costs on Base, Polygon, Arbitrum, Ethereum and XDC, measured rather than assumed: gas units simulated per chain against live prices and fresh chain heads, plus the rollup L1 data fee where it applies. Every figure ships with its inputs and the block it was read at, so you can recompute it. Cheapest first; a chain that cannot be measured is excluded, never estimated.

Endpoint

GET https://api.402rates.com/v1/settlement/costs

14

Calls / 30d

3

Unique payers / 30d

Sep 8

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://api.402rates.com/v1/settlement/costs", {
  method: "GET",
});
const data = await res.json();
cURL
curl -X GET \
  "https://api.402rates.com/v1/settlement/costs?chains=base%2Cpolygon%2Carbitrum%2Cethereum%2Cxdc" \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "cheapest": {
    "caveats": [],
    "chain": "xdc",
    "compared_chains": [
      "xdc"
    ],
    "est_cost_usd": 0.0000188,
    "excluded_chains": [],
    "runner_up": null,
    "scope": "transaction_fee_total",
    "stability": {
      "historical_claim": false,
      "level": "unknown"
    }
  },
  "data": [
    {
      "chain": "xdc",
      "cost_basis": "complete",
      "cost_bps": [
        {
          "fee_bps": 0.00188,
          "notional_usd": 100
        },
        {
          "fee_bps": 0.000188,
          "notional_usd": 1000
        },
        {
          "fee_bps": 0.0000188,
          "notional_usd": 10000
        }
      ],
      "est_cost_usd": 0.0000188,
      "fee_components": {
        "execution_usd": 0.0000188,
        "l1_data_usd": null,
        "total_usd": 0.0000188
      },
      "fee_model": "single_layer",
      "gas_price_wei": "250000000",
      "gas_units": 46680,
      "gas_units_assumed": null,
      "gas_units_method": "eth_estimateGas",
      "gas_units_scenario": "transfer to an address with an existing USDC balance",
      "head_age_s": 3,
      "l1_data_fee_included": null,
      "transfer_amount_atomic": 1000000,
      "tx_type": "usdc_transfer"
    }
  ],
  "meta": {
    "attributions": [
      {
        "fallback_used": false,
        "fetched_at": "2026-08-30T22:14:03.011Z",
        "message": "Data provided by CoinGecko",
        "quote_asset": "usd",
        "source_id": "coingecko.simple.licensed.xdc",
        "url": "https://www.coingecko.com/en/api"
      }
    ],
    "capability": "compass.settlement.costs",
    "chains_requested": [
      "xdc"
    ],
    "chains_unavailable": [],
    "fee_completeness": "complete",
    "freshness": {
      "all_sources_within_policy": true,
      "cache_ttl_s": 119,
      "oldest_source_age_s": 1,
      "policy_max_age_s": 120,
      "valid_until": "2026-08-30T22:16:02.904Z"
    },
    "generated_at": "2026-08-30T22:14:03.117Z",
    "limitations": "a simulated transfer to an address that already holds the token; a first transfer to a fresh address costs more, and no bridge, mint or subscription cost is included",
    "request_id": "req_example1",
    "schema_version": "0.5.0",
    "sources": [
      {
        "block": 85797652,
        "fetched_at": "2026-08-30T22:14:02.904Z",
        "id": "xdc.rpc.gas_price",
        "kind": "onchain_read",
        "max_age_s": 120
      },
      {
        "fetched_at": "2026-08-30T22:14:02.904Z",
        "id": "xdc.rpc.gas_units",
        "kind": "onchain_simulation",
        "max_age_s": 120,
        "method": "eth_estimateGas"
      },
      {
        "attribution": "Data provided by CoinGecko",
        "fallback_used": false,
        "fetched_at": "2026-08-30T22:14:03.011Z",
        "id": "coingecko.simple.licensed.xdc",
        "kind": "public_api",
        "license_basis": "operator_attestation",
        "licensed": true,
        "max_age_s": 120,
        "quote_asset": "usd",
        "url": "https://www.coingecko.com/en/api"
      }
    ],
    "units": {
      "est_cost_usd": "usd",
      "fee_bps": "basis_points",
      "gas_price_wei": "wei",
      "transfer_amount_atomic": "usdc_atomic"
    },
    "version": "0.1.0"
  },
  "related": [
    "compass.rwa.yields",
    "compass.ping"
  ]
}

Payment details

Pay to0xf567cfe0fdb87a1d6ca330e3f30f0d3da0f7cb98
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, Arbitrum, Polygon, XDC
Schemesexact

Is this your API?

Pin it to the top of Onchain Data and the homepage with a featured placement.

Get featured →

More from 402rates.com & similar services