Skip to content

Textile FX API — v2 · RFQ

Alpha

v2 is in alpha and gated per partner. Endpoints, field names and error codes can still change; we'll tell you before they do. Everything on v1 stays supported — v2 is a second execution model, not a replacement.

v1 matches you against a resting order book. v2 does the opposite: it asks market makers to price your trade, right now, and hands you back a single firm quote you can execute — or a clear "nobody quoted".

POST /v2/rfq/request       → we solicit makers and block for up to ~750ms
                             ← a firm quote (signed order + calldata), or no_quote
      you sign + broadcast transactions.swap with your own wallet
POST /v2/rfq/{id}/submit   → tell us the tx hash
GET  /v2/rfq/{id}          → status, and the settled amounts once it fills

Still non-custodial. We never sign, never hold funds, never touch your keys.

What's different from v1

  • All-or-nothing. A quote covers your whole amount. There is no partial fill — if makers can't do the full size, you get no_quote rather than a smaller trade.
  • The price is held, briefly. A firm quote is a real signed order with a hard expiry, typically a few seconds. Execute inside that window or request a new one. Nothing auto-refreshes.
  • Exact-output is native. Ask for a buyAmount and makers price the sell side, instead of resting a limit order and waiting.
  • The quote is bound to one wallet. Only the taker you name can fill it. Nobody can front-run or steal your quote, and you cannot hand it to a different wallet.
  • You get one answer. No book to walk, no depth to reason about.

Base URL

https://api.textilecredit.com/v2

Local development runs at http://localhost:10000/v2.

Corridors and availability

v2 only serves pairs that have an RFQ corridor enabled, and each corridor has a mode:

ModeWhat it means for you
BOOKNot solicitable. POST /v2/rfq/request returns 400; use v1.
RFQ_BETADual-run — v2 solicitation works and the v1 book stays live.
RFQPure RFQ. v2 is the venue; Textile's own ladder is retired here.

Corridors are enabled by us, per pair and per chain, and modes change without a deploy. If you get a 400 saying there's no RFQ corridor for a pair, that pair isn't in the alpha yet.

Timing

These are corridor settings, not constants, but the pilot values are:

DefaultMeaning
Reply budget750 msHow long we wait for makers before answering you
Quote TTL5 sThe cap on how long a firm quote may live
Preferred wait250 msHead start given to your preferred wallets before opening to the rest

POST /v2/rfq/request blocks for up to the reply budget. Budget your client timeout well above it — a couple of seconds is comfortable.

Concurrency

You may hold 4 outstanding RFQs at a time. A quote occupies a slot for as long as it is executable — a solicitation is a free option on a maker's inventory, so the cap covers the option's whole life, not just the request. A slot frees when the swap fills, or when the signed order's deadline passes. Over the cap you get 429 rate_limited.

Machine-readable spec

openapi-v2.json is generated from the same source the server runs, so it never drifts from the implementation. It's also served live at GET /v2/openapi.json, no credential needed.

No Postman collection yet: the one interesting call blocks on live maker replies, so a canned request would mostly demonstrate a no-quote.

Next