RathRath Finance

Introduction

Learn what xPath is, how the routing flow works, and which endpoints to use first.

Introduction

xPath is Rath's unified routing API for swaps, bridges, and gasless execution.

Instead of stitching together separate quote engines, bridge providers, token catalogs, and execution builders, you integrate one API surface that plans the route and returns the data needed to execute it.

What You Can Build

Use xPath when you need to:

  • quote same-chain and cross-chain swaps
  • discover supported chains and token metadata
  • search tokens across supported networks
  • build transaction-ready calldata for selected routes
  • support Permit2-based gasless swap execution

How xPath Works

At a high level, xPath follows a simple flow:

  1. Discover the route with GET /quote
  2. Select the route that matches your UX or execution policy
  3. Build executable transaction data with POST /build-path or POST /build-path-by-id
  4. Track route and bridge health with GET /status

If you need a relayed flow, use the gasless endpoints:

  1. Request a Permit2 quote with GET /gasless/quote
  2. Have the user sign the returned payload
  3. Submit the signed swap with POST /gasless/submit-swap
  4. Poll final state with GET /gasless/status

On this page