Skip to content

For aggregators ​

Textile FX is an RFQ venue. Market makers and vaults quote stablecoin ↔ local-currency pairs (cNGN, IDRX, BRLA, TESOURO and others) that have little or no AMM liquidity. This page is for a DEX aggregator that wants to route into those quotes from its own router contract.

The flow has three steps. Poll the ladder to see what's on offer. Ask for a firm quote with your router as the taker. Then call the returned calldata from your router, inside your user's swap transaction.

1. Poll the price ladder ​

GET /v2/rfq/levels?chainId=56

No key needed. For every pair on the chain, in both directions, you get the smallest firm size we accept, the depth on offer, and up to nine indicative points:

json
{
  "data": {
    "chainId": 56,
    "asOf": "2026-10-09T12:00:00.000Z",
    "pairs": [
      {
        "sellToken": "0x55d398326f99059ff775485246999027b3197955",
        "buyToken": "0xa8aea66b361a8d53e8865c62d142167af28af058",
        "sellDecimals": 18,
        "buyDecimals": 6,
        "minSellAmount": "1000000000000000000",
        "maxSellAmount": "9800000000000000000000",
        "levels": [
          { "sellAmount": "1000000000000000000", "buyAmount": "1612000000" },
          { "sellAmount": "98000000000000000000", "buyAmount": "157900000000" }
        ]
      }
    ]
  }
}

Each point is an exact-input quote with our fee already in it. sellAmount is what leaves the taker and buyAmount is what it gets. Both columns go up together, so you can interpolate between any two neighbours. A pair with no quotable depth comes back with maxSellAmount: "0" and no levels.

Points come from the makers' published levels, the same numbers /rfq/preview gives. They aren't firm. We cache the ladder for about two seconds, so polling faster than that returns the same answer.

2. Request a firm quote for your router ​

POST /v2/rfq/request
Authorization: Bearer tx_live_...
json
{
  "chainId": 56,
  "sellToken": "0x55d398326f99059ff775485246999027b3197955",
  "buyToken": "0xa8aea66b361a8d53e8865c62d142167af28af058",
  "sellAmount": "100000000000000000000",
  "taker": "0xYourRouter"
}

taker has to be the contract that will call us on-chain, which is your router. The signed orders are exclusive to it. An order bound to the end user's wallet reverts when your router tries to fill it.

You need an aggregator key for this, carrying the rfq:aggregator scope. Regular keys check that the taker already holds the sell token, which a router never does at quote time. Aggregator keys skip that check and can hold up to 32 live quotes at once instead of 4. We issue them by hand; ask your Textile contact.

The call blocks while makers answer, up to the corridor's reply budget (750 ms by default). See Request a firm quote for the full response. The parts you need:

FieldUse
quote.takerPaysExactly what your router will pay, fee included.
quote.buyAmountWhat your router receives.
quote.spenderThe contract your router approves for takerPays.
transactions.swapto and data for your router to call. Always use this; it covers every order in a split quote.
quote.expiresAtYour accept cutoff. Don't broadcast after it.

3. Fill from your router ​

In the user's transaction, your router:

  1. holds at least takerPays of the sell token (from the user or from an earlier hop),
  2. approves quote.spender for takerPays,
  3. calls transactions.swap.to with transactions.swap.data,
  4. forwards the buy token it received to the user and checks your minOut.

The settlement contract pays the maker's side to msg.sender (your router) and pulls the taker's side from msg.sender with a plain transferFrom. There are no callbacks, no Permit2 on the taker side, and no EOA or tx.origin checks. spender is the settlement reactor for most quotes, or the vault order executor when a single vault order needs its idle funds recalled first. Read it from each quote rather than hardcoding one.

You don't have to report the transaction. We index fills on-chain, so /submit is optional for aggregators. If you skip a quote, let it expire. It still counts against your 32 slots until the signed orders' deadline.

Wallets ​

Your users can sign with anything your router supports. We only ever see the router. Safe, ERC-4337, MPC and custody wallets can't send the user's leg straight away, so a multi-hour approval would outlive the quote. Quote again when the user's transaction is actually ready to go.