Skip to content

Estimate transaction cost

POST /api/quote

Estimate what a transaction will cost before submitting it. The body is the same shape as POST /api/submit-tx. Returns 201 with the estimated cost in USD and minBalanceRequired - the worst-case native cost plus the 8% funding service fee, as a base-10 integer string in the chain's smallest unit - suitable for passing to POST /api/submit-signed-tx. Nothing is queued or charged.

Authentication

Send your API key in the api-key header.

Request body (application/json)

{
  "to": "0xA7A833e6641D7901F30EaD6f27d4Ee2C9bb670a7",
  "callData": "0x",
  "chainId": 8453,
  "value": "1000000000000000"
}

Responses

Status Description
201 Cost estimate computed.
400 Invalid request. Plausible codes: VALIDATION_004 (schema validation failed), TRANSACTION_005 (invalid gas parameters), CHAIN_001 (unsupported chain), VALIDATION_001 (the transaction is invalid for the target chain).
401 Authentication failed. Plausible codes: AUTH_002 (invalid API key).
429 Rate limit exceeded for this API key. Plausible codes: RESOURCE_003.
500 Estimation failed. Plausible codes: TRANSACTION_004 (execution reverted during simulation; details carries the revert reason), CHAIN_003 (blockchain RPC error), SYSTEM_002.
201 response
{
  "success": true,
  "data": {
    "costUSD": 0.84,
    "minBalanceRequired": "1080000000000000"
  },
  "timestamp": "2026-07-29T12:34:56.789Z"
}
400 response
{
  "success": false,
  "error": {
    "code": "CHAIN_001",
    "message": "Unsupported blockchain network",
    "category": "CHAIN",
    "traceId": "6f2c1e0a-8b4d-4c1e-9f3a-2d5b7c8e9a01"
  },
  "timestamp": "2026-07-29T12:34:56.789Z"
}
401 response
{
  "success": false,
  "error": {
    "code": "AUTH_002",
    "message": "Invalid API key provided",
    "category": "AUTH",
    "traceId": "6f2c1e0a-8b4d-4c1e-9f3a-2d5b7c8e9a01"
  },
  "timestamp": "2026-07-29T12:34:56.789Z"
}
429 response
{
  "success": false,
  "error": {
    "code": "RESOURCE_003",
    "message": "Resource limit exceeded",
    "category": "RESOURCE",
    "traceId": "6f2c1e0a-8b4d-4c1e-9f3a-2d5b7c8e9a01"
  },
  "timestamp": "2026-07-29T12:34:56.789Z"
}
500 response
{
  "success": false,
  "error": {
    "code": "TRANSACTION_004",
    "message": "execution reverted: ERC20: transfer amount exceeds balance",
    "category": "TRANSACTION",
    "traceId": "6f2c1e0a-8b4d-4c1e-9f3a-2d5b7c8e9a01"
  },
  "timestamp": "2026-07-29T12:34:56.789Z"
}