RathRath Finance
API Reference

Gasless Quote

Get best quote with pre-built EIP712 object for Permit2 signing.

GET
/gasless/quote

Query Parameters

fromToken*string

Input token identifier on the source chain. Required. Pass the chain-specific token address or mint address exactly as xPath stores it.

toToken*string

Output token identifier on the destination chain. Required. Pass the chain-specific token address or mint address exactly as xPath stores it.

amount*string

Input amount to quote, encoded as a base-10 integer string in the token's smallest unit.

fromChain*integer

Source chain for the gasless swap input token.

Formatint64
Range0 <= value
toChain*integer

Destination chain ID for the gasless swap output token.

Formatint64
Range0 <= value
sender*string

Wallet address authorizing the Permit2 signature and supplying the input token.

receiver*string

Destination wallet address that should receive the final output tokens.

feeBps?|

Integrator fee in basis points, where 100 = 1%. Optional.

Formatint32
Range0 <= value
allowMultiBridge?boolean

Enables multi-bridge route candidates during gasless quote planning. Optional.

rankingMode?string

Route ranking mode for gasless quote selection. Optional. Use the enum values defined by the API schema.

Value in"value_max" | "balanced" | "speed_max"
slippage?|

Maximum slippage tolerance for the gasless route, expressed as a percentage.

Formatdouble
acquisitionMode*integer

Input acquisition mode for the gasless flow. Required. Use the mode expected by the executor for Permit2-backed execution.

Formatint32
Range0 <= value
deadlineMinutes?|

Optional Permit2 signature deadline window in minutes.

Formatint64
Range0 <= value
meta?|

Optional opaque metadata string to associate with the gasless quote request.

Header Parameters

api-key*string

Required API key used for authenticated access and account-based rate limits. Missing or invalid keys return 401.

Response Body

application/json

curl -X GET "https://api.xpath.rath.fi/gasless/quote?fromToken=string&toToken=string&amount=string&fromChain=0&toChain=0&sender=string&receiver=string&acquisitionMode=0" \  -H "api-key: string"
{
  "code": 0,
  "data": {
    "calldataTemplate": {
      "callDataHash": "string",
      "executionPlan": {},
      "innerData": "string",
      "meta": "string",
      "to": "string",
      "value": "string"
    },
    "deadline": "string",
    "eip712": {
      "domain": {
        "chainId": 0,
        "name": "string",
        "verifyingContract": "string"
      },
      "message": {
        "deadline": "string",
        "nonce": "string",
        "permitted": {
          "amount": "string",
          "token": "string"
        },
        "spender": "string"
      },
      "primaryType": "string",
      "types": {
        "PermitTransferFrom": [
          {
            "name": "string",
            "type": "string"
          }
        ],
        "TokenPermissions": [
          {
            "name": "string",
            "type": "string"
          }
        ]
      }
    },
    "fee": {
      "feeAmount": "string",
      "feeRecipient": "string",
      "feeUsd": 0.1
    },
    "nonce": "string",
    "quote": {
      "acquisitionMode": 0,
      "aggregator": "string",
      "aggregatorId": "string",
      "amountIn": "string",
      "amountInAfterFee": "string",
      "amountOut": "string",
      "amountOutMin": "string",
      "bridgeCount": 0,
      "bridgeProviders": [
        "string"
      ],
      "costBreakdownUsd": {
        "bridgeFeeUsd": 0.1,
        "dexFeeUsd": 0.1,
        "gasUsd": 0.1,
        "netOutputUsd": 0.1,
        "outputUsd": 0.1
      },
      "from": "string",
      "fromChainId": 0,
      "fromToken": {
        "address": "string",
        "amount": "string"
      },
      "latencyBreakdownMs": {
        "bridgeP90Ms": 0.1,
        "dexP90Ms": 0.1,
        "totalP90Ms": 0.1
      },
      "receiver": "string",
      "routeKind": "sameChainSwap",
      "toChainId": 0,
      "toToken": {
        "address": "string",
        "amount": "string"
      }
    },
    "quoteId": "string"
  },
  "message": "string"
}
Empty
Empty