# TRDEFI > Non-custodial stablecoin infrastructure: payments, treasury liquidity and on-chain market making. > Funds stay in the owner's wallet; access is always a bounded, revocable allowance. ## Products - [TRDEFI App](https://app.trdefi.com): maker studio — turn a wallet balance into a market maker position across 17 networks (read /api/stats for the live split), set your own commission, exit in one transaction. - [TRDEFI Yield](https://yield.trdefi.com): institutional treasury liquidity — put idle stablecoin floats to work with no pool deposit, no lock-up and no counterparty. - [Company](https://trdefi.com): crypto payment infrastructure — self-custody wallets for individuals, payment links and automatic settlement for businesses. ## Measurement series (film) Twelve short films taken from the live catalogue, published with burned-in captions, a timed transcript per film and a machine-readable index. Every figure is verifiable against `GET /api/stats` and the written measurement. - [The series](https://yield.trdefi.com/measurements): twelve films shot 16:9, a 9:16 trailer and a 1:1 square intro - [Machine-readable index](https://yield.trdefi.com/films/episodes.json): `episodes[]` with `number`, `title`, `hook`, `url`, `duration`, `figure`, `poster`, `video_9x16`, `transcript`, `transcript_text` - [Transcripts](https://yield.trdefi.com/films/transcripts/) - [Square intro film](https://yield.trdefi.com/films/TRDEFI-Measurement-Square-Intro_15s_1080x1080.mp4): 15s silent loop, 1080x1080, the measurement series in one cut: `transcript-NN.md`, one per film - **EP01 The Ten** — 3,841 positions. 3,084 never traded a dollar. ([watch](https://yield.trdefi.com/films/video-16x9/EP01-the-ten_16x9.mp4) · [transcript](https://yield.trdefi.com/films/transcripts/transcript-01.md)) - **EP02 The Third Option** — A $1,000,000 treasury should not have to choose. ([watch](https://yield.trdefi.com/films/video-16x9/EP02-the-third-option_16x9.mp4) · [transcript](https://yield.trdefi.com/films/transcripts/transcript-02.md)) - **EP03 No Status Code** — HTTP says 402. MCP has no status code. ([watch](https://yield.trdefi.com/films/video-16x9/EP03-no-status-code_16x9.mp4) · [transcript](https://yield.trdefi.com/films/transcripts/transcript-03.md)) - **EP04 A Permit Is Not a Transaction** — You signed it off-chain. You paid no gas. ([watch](https://yield.trdefi.com/films/video-16x9/EP04-a-permit-is-not-a-transaction_16x9.mp4) · [transcript](https://yield.trdefi.com/films/transcripts/transcript-04.md)) - **EP05 What Idle Costs** — A million that sits still does not just earn nothing. ([watch](https://yield.trdefi.com/films/video-16x9/EP05-what-idle-costs_16x9.mp4) · [transcript](https://yield.trdefi.com/films/transcripts/transcript-05.md)) - **EP06 Dock + Revoke** — One transaction stops everything. ([watch](https://yield.trdefi.com/films/video-16x9/EP06-dock--revoke_16x9.mp4) · [transcript](https://yield.trdefi.com/films/transcripts/transcript-06.md)) - **EP07 One Balance, Three Strategies** — Not one of them holds the money. ([watch](https://yield.trdefi.com/films/video-16x9/EP07-one-balance-three-strategies_16x9.mp4) · [transcript](https://yield.trdefi.com/films/transcripts/transcript-07.md)) - **EP08 The Bleed** — You lost $23 without a single bad bet. ([watch](https://yield.trdefi.com/films/video-16x9/EP08-the-bleed_16x9.mp4) · [transcript](https://yield.trdefi.com/films/transcripts/transcript-08.md)) - **EP09 Vault to Vault** — An internal DEX inside your own Safe. ([watch](https://yield.trdefi.com/films/video-16x9/EP09-vault-to-vault_16x9.mp4) · [transcript](https://yield.trdefi.com/films/transcripts/transcript-09.md)) - **EP10 The Calculator** — What does a volatile deposit actually cost? ([watch](https://yield.trdefi.com/films/video-16x9/EP10-the-calculator_16x9.mp4) · [transcript](https://yield.trdefi.com/films/transcripts/transcript-10.md)) - **EP11 The Signature** — A permit is a signed message, not a transaction. ([watch](https://yield.trdefi.com/films/video-16x9/EP11-the-signature_16x9.mp4) · [transcript](https://yield.trdefi.com/films/transcripts/transcript-11.md)) - **EP12 The Curve** — The fee is the gap between two curves. ([watch](https://yield.trdefi.com/films/video-16x9/EP12-the-curve_16x9.mp4) · [transcript](https://yield.trdefi.com/films/transcripts/transcript-12.md)) ## API **Two rules, stated plainly for agents:** 1. **READING IS FREE. NO API KEY IS NEEDED.** Every `GET /api/*` endpoint is open to anyone: catalogue, positions, stats, quotes, badges. No signup, no key, no account. 2. **TO TRADE YOU PRESENT ONE OF TWO CREDENTIALS.** To initiate a trade — create a position or swap through the API — you either request an API key (issued after a short human review, at https://yield.trdefi.com/docs/api#access) or **pay per request with x402** — no account, no key to hold. Both only prepare unsigned transactions. The API **never signs and never broadcasts**. The write path returns *unsigned* transactions; the client's own wallet signs them from the client's own address. There is no signing grant, no delegated key, and no endpoint that accepts a private key or seed phrase. - Base URL: `https://yield.trdefi.com` - [**Request an API key**](https://yield.trdefi.com/docs/api#access): required to create or swap a position - [API reference](https://yield.trdefi.com/docs/api): the frozen base contract, authentication, rate limits, error codes, deprecation policy - [OpenAPI 3.1](https://yield.trdefi.com/openapi.json): the machine-readable contract - [Error codes](https://yield.trdefi.com/docs/api#errors): stable codes with retryability ### Endpoints — READ (no key, free, open to anyone) - `GET /api/stats` — catalogue totals, per-chain breakdown, top pairs by volume and by positions - `GET /api/chains` — live set of supported chains (do not hardcode) - `GET /api/strategies?pair=&chain=&q="e_ready=` - open liquidity positions (`quote_ready=true` returns only the rows `/api/quote` can simulate. Quote simulation works on **any pair** the position trades, not only stablecoins. A `422` is a real answer, not a refusal) - `GET /api/strategy-detail?hash=` — one position in detail - `GET /api/strategy-inventory?hash=` — what a position can actually be filled with, read from the Aqua registry: per-token strategy balance, wallet balance, allowance and a `fillable` / `partial` verdict. `hashes=` takes up to 50 comma-separated hashes, same chain or mixed. Answers a flat object carrying `requestId`, not the `{ data, meta }` wrapper - `GET /api/quote?hash=&chain=&amount=&from=` — indicative quote (nothing is signed). Simulated on-chain against the strategy right now. A maker can gate a strategy on the caller holding an access licence token, and with no `from` those answer `UNPROCESSABLE` with "Strategy is gated" rather than a price; pass your own address as `from` to be priced against the licence token it holds. This is the common case, not an edge case: sampling 12 positions on each of 17 networks, 146 quotes in total, 62 percent answered "Strategy is gated" and 17 percent returned a price. The split is strongly per-network - on Ethereum 58 of 60 sampled positions are gated, while on Arc, where the credential contract is not deployed at all, 8 of 13 positions priced. Read a gated answer as "this account is not credentialed", not as "the position is closed to everyone". The response also decodes the fee instructions from the signed order: `fees[]`, `maker_fee_bps`, `maker_fee_percent`, `maker_fee_receiver` and `fee_decoding` (decoded/none/unsupported). - `GET /api/badge?metric=` — shields.io endpoint payload for READMEs ### Endpoints — WRITE (API key **or** x402 payment) - `POST /v1/positions` — prepare a position. Returns the ordered set of **unsigned** transactions (allowance steps only where your live allowance is short, then the position itself) plus the fee breakdown. Nothing is broadcast. **Present an API key, or pay per request with x402: with no credential at all it answers `402 Payment Required` with the payment terms** (see below). - `POST /v1/swaps` — prepare a swap against a maker position already shipped. The swap is **simulated first**: if it cannot succeed the response says why and returns no transactions. Same prepare-only contract - unsigned transactions, your wallet signs. Networks: ethereum, base, arbitrum, optimism, polygon, arc. Pass `execution: "auto"` (default) to get a direct Aqua swap when the position is open, or a **1inch Fusion order** when the maker gated it; `execution: "direct"` never falls back, `execution: "fusion"` always prepares a Fusion order. - `POST /api/fusion/quote` — free, read-only 1inch Fusion quote for a token pair. Returns `amountOut`, the resolver fee and a `quoteId`. Use it for gated liquidity: the user/agent does not need an Aqua NFT; a 1inch resolver fills the order. Best-effort, not guaranteed. - `POST /api/fusion/prepare` — quote + build an EIP-712 Fusion order. Returns `typedData`, `order`, `extension`, `quoteId` and `orderHash`; nothing is signed or submitted. Sign `typedData` with `eth_signTypedData_v4` (drop the `EIP712Domain` entry from `types` if the wallet requires it). - `POST /api/fusion/submit` — forward the signed order (`order`, `signature`, `extension`, `quoteId`) to 1inch's relayer. The signature is the user's authorization; the server never signs. - `GET /v1/positions/` — track a position you prepared. Key required; you only see your own. (A position prepared by an x402 payment has no key and is not visible here.) Authentication — **either**: - **API key:** `Authorization: Bearer trd_live__`, plus an optional `Idempotency-Key` (the salt is derived from it, so a retry returns the same `strategyHash`). Server-side only. Scoped, origin-restricted, revocable. A key can prepare — it can never sign, broadcast or move value. - **x402 payment:** call with no credential and the route answers `402` with `x402Version: 2` and an `accepts[]` list — Base USDC (`eip155:8453`, settled by Coinbase's CDP facilitator) and Arc USDC (`eip155:5042`, settled by our own facilitator), flat per-request fee (0.02 USDC, separate from the 0.05% protocol fee). Pay with your own wallet and retry the same call with the encoded payment in a `PAYMENT-SIGNATURE` header (x402 v2; the deprecated v1 `X-PAYMENT` is still accepted); the reply carries `meta.payment` and a `PAYMENT-RESPONSE` header. No account, no key to hold. Tracking: `GET /v1/positions/` (key required) reports **only what we have observed on-chain** — `prepared` (nothing seen yet), `shipped` (it is in the live catalogue, so your wallet signed and broadcast it), `filled` (it has settled volume). We deliberately do not report `signed` (unobservable before broadcast) or `failed` (your own receipt is the authority). A key only ever sees the positions it prepared itself. ### MCP server (agent tools: read + Fusion) The read surface is also exposed as a remote **MCP server** at `https://yield.trdefi.com/mcp` (stateless, no session id): ten tools, all prefixed `trdefi_`: `trdefi_stats`, `trdefi_chains`, `trdefi_positions`, `trdefi_position_detail`, `trdefi_position_inventory`, `trdefi_quote`, `trdefi_badge`, plus the Fusion flow `trdefi_fusion_quote`, `trdefi_fusion_prepare`, `trdefi_fusion_submit`. These are the exact wire names - call them with the prefix. An agent can read the catalogue and prepare a gasless Fusion order without writing HTTP. Add it in **Replit Agent** with one click: https://replit.com/integrations?mcp=eyJkaXNwbGF5TmFtZSI6IlRSREVGSSBMaXF1aWRpdHkiLCJiYXNlVXJsIjoiaHR0cHM6Ly95aWVsZC50cmRlZmkuY29tL21jcCJ9 ### Fees Every newly created position carries a **0.05% protocol fee** embedded in the signed order data. It is the same for the web app and the API, it is reported in the `fee` object of every prepared position, and it cannot be removed by the integrator or by us. Reading data is free. ### Contract summary - Every response carries `X-Request-Id`. - Every reply advertises `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`, `RateLimit-Policy`. - Every error is `{ error: "message", code: "CODE", requestId, retryable, documentation }`. - Read responses are `{ data, meta }`; `meta.freshnessSeconds` says how old the roll-up is. - Path-versioned resources, a minimum 90-day deprecation notice, additive changes are not breaking. ## Verification - [Live statistics](https://yield.trdefi.com/stats.html): every figure maps to on-chain transactions - [Built on Circle](https://yield.trdefi.com/circle): each Circle capability documented against its transaction ## Listings Where this API is indexed, and what a third party has actually checked. Discovery is free everywhere; payment happens on the `402` of the route you call, never on the marketplace. | Surface | Link | Verified | |---|---|---| | **PayAPI Market** | https://payapi.market/api/trdefi-liquidity | `POST /v1/positions` - settled payment, 0.02 USDC on Base, block `52475755` | | **Payforapi** | https://payforapi.com/catalog/trdefi-liquidity-positions | Both prepare endpoints listed; 402 verified live, 0.02 USDC on Base and Arc. Cards in English and Russian. | | Coinbase x402 Bazaar | `GET /v2/x402/discovery/search?query=trdefi` | Both prepare endpoints indexed and return `402` | | MCP Registry | `io.github.TRDEFI/liquidity` | `status: active`, v1.0.0 | | Glama | https://glama.ai/mcp/connectors/io.github.TRDEFI/liquidity | listed | | M8ven | https://m8ven.ai/mcp/trdefi-mcp-server-wq7ly5 | listed | | mcpservers.org | https://mcpservers.org/servers/trdefi/mcp-server | listed | Agents can search the PayAPI marketplace over MCP at `https://payapi.market/mcp`: { "mcpServers": { "payapi": { "url": "https://payapi.market/mcp" } } } The same two paid routes are listed on Payforapi, whose machine-readable catalogue is at `https://payforapi.com/llms-full.txt` and `https://payforapi.com/md/catalog.md`. ## Optional - [Live metrics as badges](https://yield.trdefi.com/api/badge?metric=volume30): JSON for `img.shields.io/endpoint` - [Investor deck](https://yield.trdefi.com/presentation.html)