RathRath Finance
API Reference

Get Gasless Quote

Get the best quote with a pre-built EIP-712 Permit2 object for a gasless swap.

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?|

Destination wallet address that should receive the final output tokens.

feeBps?|

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

Formatint32
Range0 <= value
allowMultiBridge?|

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.

includeProvider?array<>

Optional allowlist of provider keys to use during gasless route planning.

excludeProvider?array<>

Optional denylist of provider keys to exclude during gasless route planning.

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&acquisitionMode=0"
{
  "code": 0,
  "data": [
    {
      "calldataTemplate": {
        "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": {
        "amount": "string",
        "amountOut": "string",
        "amountOutUsd": 0,
        "amountUsd": 0,
        "expiry": 0,
        "fees": {
          "integratorFee": "string",
          "integratorFeeUsd": 0.1,
          "routeFee": "string",
          "routeFeeUsd": 0.1
        },
        "fromToken": {
          "address": "string",
          "chain": 0,
          "decimals": 0,
          "icon": "string",
          "name": "string",
          "priceUsd": 0,
          "symbol": "string"
        },
        "gasFee": {
          "gasFee": "string",
          "gasFeeUsd": 0.1,
          "gasLimit": "string",
          "gasToken": {
            "address": "string",
            "chain": 0,
            "decimals": 0,
            "icon": "string",
            "name": "string",
            "symbol": "string"
          },
          "gasPrice": "string"
        },
        "integratorId": "string",
        "minAmountOut": "string",
        "minAmountOutUsd": 0,
        "path": [
          {
            "amount": "string",
            "amountOut": "string",
            "fromToken": "string",
            "provider": {
              "icon": "string",
              "name": "string",
              "type": "string"
            },
            "toToken": "string",
            "type": "string"
          }
        ],
        "providers": [
          {
            "icon": "string",
            "name": "string",
            "type": "string"
          }
        ],
        "quoteId": "string",
        "receiver": "string",
        "sender": "string",
        "slippage": 0,
        "toToken": {
          "address": "string",
          "chain": 0,
          "decimals": 0,
          "icon": "string",
          "name": "string",
          "priceUsd": 0,
          "symbol": "string"
        },
        "estimatedTimeMs": 0,
        "routeKind": "string"
      },
      "quoteId": "string"
    }
  ],
  "message": "string"
}
Empty
Empty