# Router intake

Everything a router's intake form asks of a bridge, in the order the form asks it: the routes, the configuration, how to quote, and how to read a transfer's status. It is for DEX aggregators and bridge routers adding Maxy as a route.

## 1. Routes

`GET /pairs` lists every pair with its route, the settler it runs on, its order size and its confirmations. `orderSize` per pair is the route's minimum and your key's own cap (`maxUsd`); the answer is cached for 60 seconds by you only (`Cache-Control: private`). `anyToken` lists the two-leg routes that take any token on a chain by address.

| Route | Legs | What it is |
| --- | --- | --- |
| `evm-btc-escrow`, `evm-btc-gasless` | 1 | A settler chain's own coin, or USDC, to BTC |
| `btc-evm` (paid by a settler) | 1 | BTC to ETH, USDC, USDT, BNB, AVAX or USDG on a settler chain |
| `sol-btc`, `btc-sol` (a settler coin) | 1 | Solana's settler both ways |
| `evm-btc-bridge`, `btc-evm` through a bridge, `btc-sol` through a Solana swap | 2 | Any other token, Tron and Sui, any Solana coin |
| `cross-evm`, `chain-swap`, `sol-swap` (`coinToCoin`) | 1 | Coin to coin with no BTC: EVM to EVM, EVM or Sui to and from Solana, two Solana coins |

Every route works for every key. A router that is a bridge itself, and wants no route looping back into it, quotes the single-settler pairs: one settler escrow (`evm-btc-escrow`, `evm-btc-gasless`, `sol-btc`) or a direct BTC sale a settler pays (`btc-evm`, `btc-sol` in a settler coin), which call no bridge. The two-leg routes and coin to coin carry a bridge or swap leg of Maxy's own, picked among Mayan, deBridge, Across, LI.FI and others; Tron and Sui legs are LI.FI's, and those pairs are offered while that leg answers (`GET /pairs` lists them under `unavailable` meanwhile). Maxy sends LI.FI its integrator name, `maxy`, so LI.FI records these calls as Maxy's.

## 2. Configuration

`GET /config` answers the rest of the form in one call, with no key:

| Field | What it holds |
| --- | --- |
| `chains[]` | Per chain: `settler`, `verifier`, `timelock`, `proxyAdmin`, `governance`, `upgradeDelaySeconds`, `designatedFiller` (the address an order on that chain names as the one solver that may commit; the zero address leaves it to any solver that posts the bond) |
| `eip712Domain` | The intent's signing domain: name and version; `chainId` and `verifyingContract` are the chain and its settler |
| `abis` | Each ABI's address on maxy.co and its SHA-256 |
| `buys` | `minSats`, `bondBps`, `proofWindowBlocks`, the confirmation tiers by size |
| `partnerFee` | `maxBps`, the routes it runs on, the parameters |
| `quoteTtlSeconds` | How long a quote stands |
| `solana` | The settlement program and its Bitcoin node |

## 3. Quoting

`GET /quote` with `fromAddress` and `toAddress` answers the order and its steps. For a router contract that opens the escrow itself, pass the contract as `fromAddress` and the user as `refundRecipient`: `GET /quote?…&fromAddress=<contract>&refundRecipient=<user>`. Without `refundRecipient` the settler refunds the contract. The quote then asks for the contract's EIP-1271 signature (step `intent`, `signatureKind: eip1271`), and `POST /orders` answers one call for the contract to make, `openBuyEscrowFor` with that `refundRecipient`, so every refund goes to the user. [Opening an escrow from a contract](https://maxy.co/docs/opening-an-escrow-from-a-contract) has the contract side.

## 4. Transfer status

`GET /status` and `GET /orders/{id}` carry `substatus`, with fixed meanings, and `receiving`, the transaction that delivers what the user asked for:

| `substatus` | Means | Your state |
| --- | --- | --- |
| `WAITING_FOR_COMMIT` | The order is open; nothing has moved to the user yet | PENDING |
| `BITCOIN_SENT` | The Bitcoin is broadcast, not yet confirmed | PENDING |
| `CONFIRMED` | What the user asked for has arrived | DONE |
| `REFUND_AVAILABLE` | Ended without a fill; the escrow can be taken back | FAILED |
| `REFUNDED` | The user's coins went back | REFUNDED |
| `FAILED` | Ended with nothing to take back; `failureReason` says why | FAILED |

`receiving` is `{ chain, txHash, asset, amount }`: on a buy, the Bitcoin payment; on a two-leg sell, the bridge's destination transaction. `receiving.amount` is filled from the first read, before anything is sent: the sats the quote fixed on a buy, the payout the settler locked on a sale (on a bridged sale, what the bridge delivered). `txHash` arrives with the transaction. Report a buy as final when `btcConfirmations` reaches 1, as [Router flow](https://maxy.co/docs/router-flow) explains. Webhooks carry the same two fields.

## 5. Change notice

The API only gains fields and routes. A breaking change is announced at least 90 days ahead on [Changelog](https://maxy.co/docs/changelog), and an answer from an address that is retiring carries `Deprecation`, `Sunset` and `Link` headers naming its successor: [The old address](https://maxy.co/docs/sdk-hosts#the-old-address) gives its dates.

---
Source: https://maxy.co/docs/router-intake (Maxy Docs › Maxy for your app › Use cases)
