Skip to content

API reference

There are two versions. They are different execution models, not a rewrite of the same one, and both are supported.

v1 — order bookv2 — RFQ
StatusStable. Use this unless you've been told otherwise.Alpha. Allowlisted partners only.
Base URLhttps://api.textilecredit.com/v1https://api.textilecredit.com/v2
LiquidityResting orders you match againstFirm quotes solicited from market makers on demand
PriceWhatever the book holds when you callQuoted for your exact size, held for a few seconds
Partial fillsYes — you can take part of the bookNo. A quote is for the whole amount or there is no quote
LatencyOne requestOne request that blocks while makers answer (sub-second)
Exact-outputVia limit ordersNative — ask for a buyAmount directly

Both are non-custodial. Neither version signs anything, touches your keys, or holds funds. Every write endpoint hands you an unsigned transaction or an EIP-712 payload; your wallet stays yours.

Which one do I want?

Use v1 if you want to see liquidity before committing, take part of it, rest an order at your own price, or you just want the version that is stable.

Use v2 if you want a single firm price for an exact size with no book to reason about — you ask, makers answer, you get one executable quote or a clear "no quote". It suits payment-style flows where a partial fill is not useful.

If you're not sure, start with v1. v2 access is granted per partner; without it every /v2 call returns 403.

Shared conventions

These hold on both versions.

  • Amounts are strings in atomic units, base-10, no decimals — "1000000" is 1 USDT. Rates are RAY-scaled (1e27) strings. JSON numbers can't hold a uint256 losslessly, so we don't use them.
  • Addresses are standard EVM addresses. Lowercase is fine; we normalize.
  • Timestamps are ISO-8601 UTC.
  • Every response carries an X-Request-Id header. Quote it when you report a problem.
  • Errors share one envelope and one set of codes — see v1 errors, which v2 also uses, plus the v2-specific notes.

Machine-readable specs

Both are generated from the same source the server runs, so they don't drift.

Getting a key

Ask the Textile team (contact us). You get a test key and a live key. The same key works on both versions — v2 additionally requires your partner record to be allowlisted for the alpha.