TRDEFI Catalogue API
Read-only roll-ups of the live liquidity catalogue.
Read-only roll-ups of the live liquidity catalogue.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/trdefi-com:trdefi-com-catalogue-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: TRDEFI Liquidity Catalogue API
version: 1.2.0
summary: Read the live non-custodial liquidity catalogue, quote it, and prepare unsigned positions for your own wallet to sign.
description: 'Public, read-first API over the open liquidity catalogue that TRDEFI normalises, plus a **prepare-only write path** for integrators holding a key.
**Non-custodial, strictly.** The API never signs and never broadcasts. `POST /v1/positions` returns *unsigned* transactions that your own wallet signs from your own address. No endpoint accepts a private key or a signing grant.
**Contract.** Every response carries `X-Request-Id`. Every endpoint advertises `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset` and `RateLimit-Policy`, on success and on failure. Every error is the same envelope: `{ error: { code, message, requestId, retryable, documentation } }`.
**Money.** Amounts are returned as USD numbers for read models. On-chain amounts are strings in base units with an explicit `decimals`.
**Fees.** Every newly created position carries a 0.05% protocol fee embedded in the signed order data. It is reported in the `fee` object of every prepared position and cannot be removed by the integrator or by us.
**Keys.** Reading needs no key. Preparing needs `Authorization: Bearer trd_live__`, held server-side only. Request one at https://yield.trdefi.com/docs/api#access.
**Stability.** See the deprecation policy at https://yield.trdefi.com/docs/api — path-versioned resources, a published calendar, and a minimum 90-day notice window.'
contact:
name: TRDEFI
url: https://trdefi.com
email: info@trdefi.com
license:
name: All rights reserved
url: https://trdefi.com
x-guidance: 'Start with GET /api/strategies (public, no key). Filter to what you can use,
then GET /api/quote?hash=...&chain=...&amount=... to price a swap against that
position on-chain. Read models return USD numbers; on-chain amounts are
strings in base units and always carry an explicit decimals field.
Writing is prepare-only and costs money. POST /v1/positions opens a maker
position; POST /v1/swaps prepares a taker swap against an existing one.
Both return UNSIGNED transactions for your own wallet to sign - the API never
signs, never broadcasts and never holds a key.
Paid routes answer 402 with the x402 terms when no credential is presented.
Pay with your own wallet and retry with the base64 payload in the
PAYMENT-SIGNATURE header (0.02 USD), or present an API key instead, which
costs nothing.
Before paying for a swap, call it: a strategy that is gated, or an amount the
maker cannot fill, returns a reason and NO transactions rather than a
transaction that is certain to revert.'
servers:
- url: https://yield.trdefi.com
description: Production
security: []
tags:
- name: catalogue
description: Read-only roll-ups of the live liquidity catalogue.
paths:
/api/stats:
get:
tags:
- catalogue
operationId: getStats
summary: Catalogue totals, per-chain and top-pair roll-ups
description: Served from pre-aggregated views. The roll-up is refreshed on a schedule, so `meta.freshnessSeconds` tells you how old the underlying figure is. Individual responses are cached for 60 seconds (`meta.cached`) Values in this schema are placeholders - read the live numbers from the endpoint itself. Every figure here goes stale within hours.
responses:
'200':
description: Roll-up
headers:
X-Request-Id:
$ref: '#/components/headers/RequestId'
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
RateLimit-Policy:
$ref: '#/components/headers/RateLimitPolicy'
content:
application/json:
schema:
$ref: '#/components/schemas/StatsResponse'
example:
data:
source: open liquidity strategies (normalized by TRDEFI)
totals:
strategies: 0
makers: 0
pairs: 0
volume_1d_usd: 0
volume_7d_usd: 0
volume_30d_usd: 0
last_activity: '1970-01-01T00:00:00Z'
rollup_updated_at: '1970-01-01T00:00:00Z'
chains:
- chain: Ethereum
count: 3426
volume_30d_usd: 203020000
last_activity: '2026-09-22T00:00:00.000Z'
top_pairs_by_volume: []
top_pairs_by_positions: []
meta:
requestId: <hex string, echoed per request>
generatedAt: '2026-11-15T09:00:00.000Z'
apiVersion: v1
freshnessSeconds: 10800
cached: false
'429':
$ref: '#/components/responses/RateLimited'
'503':
$ref: '#/components/responses/UpstreamUnavailable'
security: []
/api/chains:
get:
tags:
- catalogue
operationId: listChains
summary: Supported chains and their catalogue counts
description: 'Treat this as a live catalog: do not hardcode chain identifiers or symbol→address mappings.'
responses:
'200':
description: Chains
headers:
X-Request-Id:
$ref: '#/components/headers/RequestId'
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
content:
application/json:
schema:
type: object
additionalProperties: true
'429':
$ref: '#/components/responses/RateLimited'
security: []
/api/strategies:
get:
tags:
- catalogue
operationId: listStrategies
summary: List open liquidity positions
parameters:
- name: resource
in: query
schema:
type: string
enum:
- list
- chains
- stats
- detail
- search
description: Sub-resource selector. Defaults to `list`.
- name: q
in: query
schema:
type: string
description: Free-text search over pair and chain (used when `resource=search`).
- name: pair
in: query
schema:
type: string
description: Exact pair filter, e.g. `USDC/EURC`.
- name: chain
in: query
schema:
type: string
description: Chain key filter, e.g. `base`.
responses:
'200':
description: Positions
headers:
X-Request-Id:
$ref: '#/components/headers/RequestId'
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
content:
application/json:
schema:
type: object
additionalProperties: true
'405':
$ref: '#/components/responses/MethodNotAllowed'
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/Internal'
security: []
/api/strategy-detail:
get:
tags:
- catalogue
operationId: getStrategyDetail
summary: One position in detail
parameters:
- name: hash
in: query
required: true
schema:
type: string
description: Strategy hash.
responses:
'200':
description: Position
content:
application/json:
schema:
type: object
additionalProperties: true
'429':
$ref: '#/components/responses/RateLimited'
security: []
/api/strategy-inventory:
get:
tags:
- catalogue
operationId: getStrategyInventory
summary: What a position can actually be filled with
description: 'Read from the Aqua registry: per-token strategy balance, wallet balance, allowance and a `fillable` / `partial` verdict. Pass `hash` for one position, or `hashes` for up to 50 comma-separated hashes (same chain or mixed). No key required.'
parameters:
- name: hash
in: query
required: false
schema:
type: string
description: One strategy hash (0x + 64 hex). Supply this or `hashes`.
- name: hashes
in: query
required: false
schema:
type: string
description: Comma-separated strategy hashes, up to 50. Supply this or `hash`.
responses:
'200':
description: One position (flat object) or a batch of them
headers:
X-Request-Id:
$ref: '#/components/headers/RequestId'
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
RateLimit-Policy:
$ref: '#/components/headers/RateLimitPolicy'
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/StrategyInventory'
- $ref: '#/components/schemas/StrategyInventoryBatch'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/RateLimited'
security: []
components:
responses:
Internal:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
RateLimited:
description: Rate limit exceeded. `Retry-After` is always present.
headers:
Retry-After:
schema:
type: integer
X-Request-Id:
$ref: '#/components/headers/RequestId'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: RATE_LIMITED
message: Rate limit exceeded for stats
requestId: …
retryable: true
documentation: https://yield.trdefi.com/docs/api/errors#rate_limited
MethodNotAllowed:
description: Wrong HTTP method
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
UpstreamUnavailable:
description: Our data source is temporarily unavailable. Retry shortly.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
BadRequest:
description: Malformed or missing parameters
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
NotFound:
description: No such position — or it belongs to a different key. The two are deliberately indistinguishable.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
Meta:
type: object
required:
- requestId
- generatedAt
- apiVersion
properties:
requestId:
type: string
generatedAt:
type: string
format: date-time
apiVersion:
type: string
example: v1
freshnessSeconds:
type:
- integer
- 'null'
description: How old the underlying roll-up is, in seconds. Null when not derived.
cached:
type: boolean
description: True when this response was served from our short-lived cache.
StrategyInventory:
type: object
description: 'One position as the Aqua registry sees it. Note: this endpoint answers a flat object with a top-level `requestId`, not the `{ data, meta }` wrapper the rest of the read surface uses.'
required:
- strategy_hash
- chain
- chain_id
- pair
- catalogue_status
- fillable
- partial
- tokens
- requestId
properties:
strategy_hash:
type: string
description: 0x-prefixed 32-byte strategy hash.
chain:
type: string
example: Base
chain_id:
type: integer
example: 8453
pair:
type: string
example: WETH/ZRO
catalogue_status:
type: string
example: active
description: Where the position stands in our catalogue.
fillable:
type: boolean
description: True when the order bytes are stored and a taker can be priced against it.
partial:
type: boolean
description: True when only part of the declared balance is actually available.
tokens:
type: array
items:
type: object
required:
- address
- strategyBalance
- walletBalance
- allowance
- funded
properties:
address:
type: string
strategyBalance:
type: string
description: Base units, as a string.
walletBalance:
type: string
description: Base units, as a string.
allowance:
type: string
description: Base units, as a string.
funded:
type: boolean
additionalProperties: true
requestId:
type: string
additionalProperties: true
StrategyInventoryBatch:
type: object
required:
- count
- results
- requestId
properties:
count:
type: integer
results:
type: array
items:
$ref: '#/components/schemas/StrategyInventory'
requestId:
type: string
additionalProperties: true
Error:
type: object
required:
- error
- code
- requestId
- retryable
properties:
error:
type: string
description: Human-readable message. May change without notice.
code:
type: string
description: Stable, machine-mappable. Branch on this, never on the message.
example: RATE_LIMITED
requestId:
type: string
retryable:
type: boolean
description: True when the same request may be retried after a backoff.
documentation:
type: string
format: uri
description: A link to the definition of this code.
issues:
type: array
description: Structured, client-fixable problems (allowance, balance, chain).
items:
type: object
properties:
type:
type: string
example: INSUFFICIENT_ALLOWANCE
expected:
type: string
actual:
type: string
spender:
type: string
StatsResponse:
type: object
required:
- data
- meta
properties:
data:
type: object
properties:
source:
type: string
totals:
type: object
properties:
strategies:
type: integer
makers:
type: integer
pairs:
type: integer
chains:
type: integer
volume_1d_usd:
type: number
volume_7d_usd:
type: number
volume_30d_usd:
type: number
last_activity:
type:
- string
- 'null'
format: date-time
rollup_updated_at:
type:
- string
- 'null'
format: date-time
chains:
type: array
items:
type: object
additionalProperties: true
top_pairs_by_volume:
type: array
items:
type: object
additionalProperties: true
top_pairs_by_positions:
type: array
items:
type: object
additionalProperties: true
meta:
$ref: '#/components/schemas/Meta'
headers:
RateLimitPolicy:
description: Bucket name, window and limit, e.g. `stats;w=60;limit=120`.
schema:
type: string
RequestId:
description: Unique id for this request. Quote it in support tickets.
schema:
type: string
example: <hex string, echoed per request>
RateLimitLimit:
description: Requests allowed in the current window for this bucket.
schema:
type: integer
example: 120
RateLimitRemaining:
description: Requests remaining in the current window.
schema:
type: integer
example: 119
RateLimitReset:
description: Seconds until the window resets.
schema:
type: integer
example: 42
securitySchemes:
x402:
type: apiKey
in: header
name: PAYMENT-SIGNATURE
description: 'Pay per request instead of holding a key: retry with the base64 x402 payment payload. `PAYMENT-SIGNATURE` is the x402 v2 header; the deprecated v1 `X-PAYMENT` is still accepted. With no credential at all, the prepare endpoints answer a **402** carrying the payment terms in the `PAYMENT-REQUIRED` header and a `bazaar` discovery extension. A settled call returns its receipt in the `PAYMENT-RESPONSE` header.'
bearerAuth:
type: http
scheme: bearer
bearerFormat: trd_live_<keyId>_<secret>
description: An API key issued after review. Held **server-side only** — a key in client-side code is treated as compromised. It can prepare unsigned transactions and read the positions it prepared. It can never sign, broadcast or move value. Request one at https://yield.trdefi.com/docs/api#access