Submit a signed gasless swap

Submit the EIP-712 signature(s) from GET /swap/gasless. Returns a depositId. Pass swapTx / swapTxns through from the quote unchanged. On direct EVM routes submit { swapTx, signature }signature is the EIP-712 signature of swapTx.typedData. On HyperCore-origin routes submit { swapTx, swapTxns, signaturesByStepId } with a signature for every step in swapTxns[].

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.

POST
/gasless/submit

Authorization

bearerAuth
AuthorizationBearer <token>

API key for authentication.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://across.to/api/gasless/submit" \  -H "Content-Type: application/json" \  -d '{    "swapTx": {      "ecosystem": "evm-gasless",      "chainId": 42161,      "to": "0x10D8b8DaA26d307489803e10477De69C0492B610",      "data": {        "type": "erc3009"      }    },    "signature": "0xabc..."  }'
{
  "depositId": "63138902050176194869835581561020090006750407517885256902905383053846970918917",
  "messageId": null,
  "id": "7fg9l-1780952860050-cde67e6bc61f"
}

{
  "type": "AcrossApiError",
  "code": "INVALID_PARAM",
  "status": 400,
  "message": "Invalid signature: unable to verify signature",
  "param": "signature",
  "id": "w8cbj-1780949503966-fe83ebbc58dd"
}

{
  "type": "AcrossApiError",
  "code": "FORBIDDEN_API_KEY",
  "status": 403,
  "message": "Sponsored gasless route not eligible for this API key"
}

{
  "type": "AcrossApiError",
  "code": "INTERNAL_SERVER_ERROR",
  "status": 500,
  "message": "Internal server error"
}