Get a gasless swap quote

Quote a gasless swap or transfer: the user authorizes it with a single EIP-712 signature (swapTx — an ERC-3009 or Permit2 permit) and a submitter broadcasts it on-chain, so the user pays no gas. Works for any Across-supported EVM route whose input token supports gasless authorization (e.g. USDC).

Gasless lets a user authorize a swap or transfer with a single signature and no gas. For a working example, see the Hyperliquid Withdrawals Guide.

GET
/swap/gasless

Authorization

bearerAuth
AuthorizationBearer <token>

API key for authentication.

In: header

Query Parameters

inputToken*string

Input token address on the origin chain. Must support gasless authorization (e.g. USDC via ERC-3009).

originChainId*integer

Origin chain id — any Across-supported EVM chain. 1337 selects HyperCore (Hyperliquid) origin withdrawals.

outputToken*string

Destination token address — the ERC-20 address on the destination chain (e.g. USDC on Base). 0x000…000 denotes the chain's native token (e.g. ETH on chain 1, HYPE on chain 999).

destinationChainId*integer

Destination chain id — any Across-supported EVM chain. (999 is HyperEVM, where same-token routes are passthrough.)

amount*string

Amount in the input token's smallest unit, as an integer string. With tradeType=exactInput, this is the exact amount taken from the user's origin balance.

tradeType*string

Trade execution strategy. exactInput is the default and only shape exercised in the canonical test suite.

Default"exactInput"
Value in"exactInput" | "exactOutput"
depositor*string

EVM address that signs the gasless authorization (and any lift steps). The server uses this as the EIP-712 signer when verifying signatures on submit. Must match the connected wallet.

recipient*string

Address that receives the output on the destination chain. EVM hex address.

refundOnOrigin?boolean

For routes that include a destination swap (bridgeableToAny or anyToAny), destination refunds are the default behavior unless refundOnOrigin=true is explicitly set when calling the Swap API. Across determines refund behavior based on the route type (when refundOnOrigin is NOT explicitly set):

  1. B2B or A2B routes:
  • refundOnOrigin defaults to true
  • Refunds occur on the origin chain
  • Destination refunds do not apply here
  1. B2A or A2A routes
  • refundOnOrigin defaults to false
  • Refunds occur on the destination chain

If an explicit refundOnOrigin value is provided, that value is always respected. If a refund occurs, the address that receives the refunded funds is determined using the following priority order: 1. refundAddress (if explicitly specified) 2. recipient (if specified) 3. depositor (fallback) This applies to both origin and destination refunds.

slippage?number

Slippage tolerance percentage can be set to auto (default) or a numerical value. Numerical value must be between 0 and 1 representing corresponding percentage. So if you want slippage to be 0.5% , you need to pass 0.005 as the value here). If slippage is auto, the Swap API will select the best slippage intelligently and move ahead with the crosschain swap. If slippage is set to a numerical value, for example 0.01 (1% slippage), it divides this value equally for each leg. This means 0.5% slippage for origin and 0.5% slippage for destination.

appFee?number

Enables integrators to collect a customizable fee in the output token, sent to a designated address on the destination chain. appFee is expressed in percentage with value ranging between 0 and 1. For example, 1% appFee would use 0.01 as a value here.

appFeeRecipient?string

EVM address that receives the app fee on the destination chain. Required if appFee > 0.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://across.to/api/swap/gasless?inputToken=0xaf88d065e77c8cC2239327C5EDb3A432268e5831&originChainId=42161&outputToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&destinationChainId=8453&amount=1000000&tradeType=exactInput&depositor=0xA4d353BBc130cbeF1811f27ac70989F9d568CeAB&recipient=0xA4d353BBc130cbeF1811f27ac70989F9d568CeAB"

{
  "depositId": "17583690609900675652552597580295147921193469959763873994384141350459846809617",
  "crossSwapType": "bridgeableToBridgeable",
  "amountType": "exactInput",
  "inputToken": {
    "decimals": 6,
    "symbol": "USDC",
    "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
    "name": "USD Coin",
    "chainId": 42161
  },
  "outputToken": {
    "decimals": 6,
    "symbol": "USDC",
    "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "name": "USD Coin",
    "chainId": 8453
  },
  "refundToken": {
    "decimals": 6,
    "symbol": "USDC",
    "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
    "name": "USD Coin",
    "chainId": 42161
  },
  "inputAmount": "1000000",
  "maxInputAmount": "1000000",
  "expectedOutputAmount": "1000000",
  "minOutputAmount": "1000000",
  "expectedFillTime": 2,
  "checks": {
    "allowance": {
      "token": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
      "spender": "0x0000000000000000000000000000000000000000",
      "actual": "0",
      "expected": "0"
    },
    "balance": {
      "token": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
      "actual": "9859704",
      "expected": "1000000"
    }
  },
  "steps": {
    "originSwap": null,
    "bridge": {
      "inputAmount": "1000000",
      "outputAmount": "1000000",
      "tokenIn": {
        "decimals": 6,
        "symbol": "USDC",
        "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
        "name": "USD Coin",
        "chainId": 42161
      },
      "tokenOut": {
        "decimals": 6,
        "symbol": "USDC",
        "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "name": "USD Coin",
        "chainId": 8453
      },
      "fees": {
        "amount": "0",
        "token": {
          "decimals": 6,
          "symbol": "USDC",
          "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
          "chainId": 42161
        },
        "pct": "0"
      },
      "provider": "across"
    },
    "destinationSwap": null
  },
  "fees": {
    "total": {
      "amount": "0",
      "amountUsd": "0.0",
      "token": {
        "decimals": 6,
        "symbol": "USDC",
        "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
        "chainId": 42161
      },
      "pct": "0"
    },
    "totalMax": {
      "amount": "0",
      "amountUsd": "0.0",
      "token": {
        "decimals": 6,
        "symbol": "USDC",
        "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
        "chainId": 42161
      },
      "pct": "0"
    },
    "originGas": {
      "amount": "0",
      "amountUsd": "0.0",
      "token": {
        "chainId": 42161,
        "address": "0x0000000000000000000000000000000000000000",
        "decimals": 18,
        "symbol": "ETH"
      }
    },
    "submission": null
  },
  "swapTx": {
    "ecosystem": "evm-gasless",
    "chainId": 42161,
    "to": "0x10D8b8DaA26d307489803e10477De69C0492B610",
    "data": {
      "type": "erc3009"
    }
  },
  "swapTxns": null,
  "quoteExpiryTimestamp": 1781268647,
  "id": "k6mf6-1781265149243-a6c306d24afe"
}

{
  "type": "AcrossApiError",
  "code": "AMOUNT_TOO_HIGH",
  "status": 400,
  "message": "Amount is higher than available liquidity. Max amount is 716928.917387 USDC.",
  "id": "vgcwv-1779284191168-cae95d247531"
}

{
  "type": "AcrossApiError",
  "code": "FORBIDDEN_API_KEY",
  "status": 403,
  "message": "Invalid or missing API key"
}
{
  "type": "AcrossApiError",
  "code": "INTERNAL_SERVER_ERROR",
  "status": 500,
  "message": "Internal server error"
}