crypto · crypto · evm · base · ethereum · rpc · transaction · gas · estimate · simulation · fee · read-only

Base transaction gas estimate

Estimate gas for one Base mainnet transaction context at a resolved block, add a bounded caller-selected buffer, and preserve RPC rejection evidence without signing or broadcasting.

$0.004 USDCBasex402 v2POST
Pay $0.004 USDC and run in your browserView free result sample

Endpoint

https://apiacre.com/v1/crypto/base-gas-estimate

Send the JSON body below. An unpaid request returns HTTP 402 with a PAYMENT-REQUIRED header; an x402-compatible buyer signs the requirement and retries with PAYMENT-SIGNATURE.

Pay $0.004 USDC and run in your browser

Official Coinbase agent path

Coinbase Agentic Wallet can satisfy this x402 request in one command. Running it may pay automatically, so --max-amount is fixed to $0.004 USDC in atomic units. Copying the command does not install, authenticate, sign, or pay; review the request and use a separate low-value wallet before running it.

npx --yes awal@latest x402 pay https://apiacre.com/v1/crypto/base-gas-estimate \
  -X POST \
  -d '{"from_address":"0x1111111111111111111111111111111111111111","to":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","value_wei":"0","call_data":"0x70a082310000000000000000000000001111111111111111111111111111111111111111","block_tag":"safe","buffer_percent":20}' \
  --max-amount 4000 \
  --json

Coinbase pay-for-service documentation · Buyer setup and wallet safety

Alternative third-party AgentCash commands

Run check first without payment. Its fetch command may automatically pay up to the exact listed price.

npx --yes agentcash@latest check https://apiacre.com/v1/crypto/base-gas-estimate
npx --yes agentcash@latest fetch https://apiacre.com/v1/crypto/base-gas-estimate \
  --method POST \
  --header 'content-type: application/json' \
  --body '{"from_address":"0x1111111111111111111111111111111111111111","to":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","value_wei":"0","call_data":"0x70a082310000000000000000000000001111111111111111111111111111111111111111","block_tag":"safe","buffer_percent":20}' \
  --payment-protocol x402 \
  --payment-network base \
  --max-amount 0.004

AgentCash CLI documentation

Input example

{
  "from_address": "0x1111111111111111111111111111111111111111",
  "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "value_wei": "0",
  "call_data": "0x70a082310000000000000000000000001111111111111111111111111111111111111111",
  "block_tag": "safe",
  "buffer_percent": 20
}

Response shape

View free static sample JSON

{
  "request_id": "018f1f54-7f38-7ba2-8dc3-5f90272d9f1a",
  "service": "crypto.base-gas-estimate",
  "version": "1",
  "data": {
    "network": "eip155:8453",
    "status": "estimated",
    "estimationAccepted": true,
    "transaction": {
      "from": "0x1111111111111111111111111111111111111111",
      "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "valueWei": "0",
      "dataBytes": 36,
      "dataSha256": "2da90680426443e99a57371fef89ebdb0cba7f941eda4e27491a3bd2069ef775",
      "selector": "0x70a08231"
    },
    "block": {
      "requestedTag": "safe",
      "number": 34567890,
      "hash": "0x1111111111111111111111111111111111111111111111111111111111111111",
      "timestamp": "2026-08-10T16:00:00+00:00",
      "gasLimit": 120000000,
      "baseFeePerGasWei": "500000"
    },
    "estimate": {
      "gas": 24640,
      "gasHex": "0x6040",
      "bufferPercent": 20,
      "suggestedGasLimit": 29568,
      "suggestedGasLimitHex": "0x7380",
      "bufferCapped": false,
      "baseFeeComponentWei": "12320000000",
      "suggestedBaseFeeComponentWei": "14784000000"
    },
    "rpcError": null,
    "networkRequestsMade": 2,
    "rpcCallsMade": 2,
    "readOnly": true,
    "transactionBroadcast": false,
    "warnings": [],
    "limitations": [
      "The estimate is state-dependent and does not guarantee later execution.",
      "Base-fee components exclude priority fees, L1 data fees, and other fee components.",
      "Only one existing destination is estimated; contract deployment is not supported."
    ],
    "source": "https://docs.base.org/base-chain/api-reference/ethereum-json-rpc-api/eth_estimateGas",
    "disclaimer": "Read-only Base mainnet gas estimation only. No transaction is created, signed, submitted, or broadcast."
  },
  "meta": {
    "duration_ms": 42,
    "cached": false,
    "sources": [],
    "warnings": [],
    "next_actions": []
  }
}

Try the payment challenge

curl -i -X POST 'https://apiacre.com/v1/crypto/base-gas-estimate' \
  -H 'content-type: application/json' \
  --data '{"from_address":"0x1111111111111111111111111111111111111111","to":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","value_wei":"0","call_data":"0x70a082310000000000000000000000001111111111111111111111111111111111111111","block_tag":"safe","buffer_percent":20}'