Skip to content

API reference

v2 RFQ is the API. You ask for a size, makers answer, and you get one executable quote or a clear no-quote. It is what the public Swap page runs on, and it is where every new integration belongs.

v2 Ramp is the fiat side. It moves local currency into a stablecoin and back out (today NGN ↔ cNGN) through a licensed provider, from your own UI. Same claim-token model as RFQ, no key needed. Use it when the user is starting from a bank account rather than a wallet balance.

v1 is deprecated. It stays served so existing integrations keep working, but it is closed to new ones. No new features, no new endpoints. Do not start a project on it.

One exception worth knowing: webhook endpoints are registered on /v1/webhooks for both versions. That registry is shared, not legacy. See v2 webhooks.

v2 RFQv1 (deprecated)
StatusCurrent. Build here.Closed to new integrations
Base URLhttps://api.textilecredit.com/v2https://api.textilecredit.com/v1
LiquidityFirm quotes solicited from makers on demandResting limit orders
PriceQuoted for your exact size, held for 60 secondsThe price you named, until a maker takes it
Partial fillsNone. Makers cover the whole amount or there is no quoteNone. An order fills whole or not at all
LatencyOne request that blocks while makers answer, sub-secondThe order waits until it fills or expires
Exact-outputNative. Ask for a buyAmountVia the amounts you named on the order

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.

Shared conventions

  • Amounts are strings in atomic units, base-10, no decimals. "1000000" is 1 USDT. Rates are RAY-scaled (1e27) strings. JSON numbers cannot hold a uint256 losslessly, so we do not use them. The one exception is the Ramp API, which is a fiat surface and takes human decimals: "50000" is fifty thousand naira.
  • 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 v2 errors and v1 errors.

Machine-readable specs

Both are generated from the same source the server runs, so they do not 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.