Appearance
API reference
There are two versions. They are different execution models, not a rewrite of the same one, and both are supported.
| v1 — order book | v2 — RFQ | |
|---|---|---|
| Status | Stable. Use this unless you've been told otherwise. | Alpha. Allowlisted partners only. |
| Base URL | https://api.textilecredit.com/v1 | https://api.textilecredit.com/v2 |
| Liquidity | Resting orders you match against | Firm quotes solicited from market makers on demand |
| Price | Whatever the book holds when you call | Quoted for your exact size, held for a few seconds |
| Partial fills | Yes — you can take part of the book | No. A quote is for the whole amount or there is no quote |
| Latency | One request | One request that blocks while makers answer (sub-second) |
| Exact-output | Via limit orders | Native — 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-Idheader. 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
- v1 —
openapi.json, Postman collection - v2 —
openapi-v2.json
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.