TRDEFI Fusion API

Free, read-only pricing through 1inch Fusion for positions a maker gated behind a credential. `prepare` builds an EIP-712 order and `submit` forwards an already-signed one. The API never signs; the signature is the user’s own authorization.

GitHub OpenAPI

Operations 3

POST /api/fusion/quote Free 1inch Fusion quote for a token pair #
POST /api/fusion/prepare Quote plus an EIP-712 Fusion order — nothing is signed or submitted #
POST /api/fusion/submit Forward an already-signed Fusion order to the 1inch relayer #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/trdefi-com:trdefi-com-fusion-api"
All apis
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.

Get an API 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 Specification

trdefi-com-fusion-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TRDEFI Liquidity Fusion 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: fusion
  description: Free, read-only pricing through 1inch Fusion for positions a maker gated behind a credential. `prepare` builds an EIP-712 order and `submit` forwards an already-signed one. The API never signs; the signature is the user’s own authorization.
paths:
  /api/fusion/quote:
    post:
      tags:
      - fusion
      operationId: fusionQuote
      summary: Free 1inch Fusion quote for a token pair
      description: 'Read-only and keyless. Use it for gated liquidity: the caller does not need an Aqua access token because a 1inch resolver fills the order. Best-effort, not a guarantee. Returns `amountOut`, the resolver fee and a `quoteId`.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - chain
              - fromToken
              - toToken
              - amount
              - wallet
              properties:
                chain:
                  type: string
                  example: base
                  description: Network key, as returned by /api/chains.
                fromToken:
                  type: string
                  description: ERC-20 address the caller sells.
                toToken:
                  type: string
                  description: ERC-20 address the caller buys.
                amount:
                  type: string
                  description: Sell amount in base units, as a decimal string.
                wallet:
                  type: string
                  description: Address that would sign and trade. The resolver fills for this wallet, so it needs no Aqua credential.
                preset:
                  type: string
                  description: Optional Fusion auction preset. Omit to let the API recommend one.
              additionalProperties: false
      responses:
        '200':
          description: Quote
          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:
                type: object
                required:
                - data
                - meta
                properties:
                  data:
                    type: object
                    required:
                    - chain
                    - chainId
                    - quoteId
                    - amountIn
                    - amountOut
                    properties:
                      chain:
                        type: string
                      chainId:
                        type: integer
                      quoteId:
                        type: string
                        description: Pass this to /api/fusion/prepare or /api/fusion/submit.
                      fromToken:
                        type: string
                      toToken:
                        type: string
                      amountIn:
                        type: string
                        description: Base units, as a string.
                      amountOut:
                        type: string
                        description: Base units, as a string.
                      recommendedPreset:
                        type: string
                      suggested:
                        type: boolean
                      fee:
                        type: object
                        additionalProperties: true
                      integratorFee:
                        type: integer
                        description: Integrator fee in basis points.
                      integratorFeeShare:
                        type: integer
                      integratorFeeReceiver:
                        type: string
                      settlementAddress:
                        type: string
                      presets:
                        type: object
                        additionalProperties: true
                      raw:
                        type: object
                        additionalProperties: true
                        description: The upstream 1inch answer, unchanged.
                    additionalProperties: true
                  meta:
                    $ref: '#/components/schemas/Meta'
        '400':
          $ref: '#/components/responses/BadRequest'
        '422':
          $ref: '#/components/responses/Unprocessable'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/UpstreamUnavailable'
      security: []
  /api/fusion/prepare:
    post:
      tags:
      - fusion
      operationId: fusionPrepare
      summary: Quote plus an EIP-712 Fusion order — nothing is signed or submitted
      description: Returns `typedData`, `order`, `extension`, `quoteId` and `orderHash`. Sign `typedData` with `eth_signTypedData_v4` in your own wallet (drop the `EIP712Domain` entry from `types` if the wallet requires it), then forward it to /api/fusion/submit. The server never signs and never holds a key.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - chain
              - fromToken
              - toToken
              - amount
              - wallet
              properties:
                chain:
                  type: string
                  example: base
                  description: Network key, as returned by /api/chains.
                fromToken:
                  type: string
                  description: ERC-20 address the caller sells.
                toToken:
                  type: string
                  description: ERC-20 address the caller buys.
                amount:
                  type: string
                  description: Sell amount in base units, as a decimal string.
                wallet:
                  type: string
                  description: Address that would sign and trade. The resolver fills for this wallet, so it needs no Aqua credential.
                preset:
                  type: string
                  description: Optional Fusion auction preset. Omit to let the API recommend one.
              additionalProperties: false
      responses:
        '200':
          description: Prepared order
          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:
                type: object
                required:
                - data
                - meta
                properties:
                  data:
                    type: object
                    required:
                    - chain
                    - chainId
                    - wallet
                    - amountIn
                    - amountOut
                    - quoteId
                    - orderHash
                    - typedData
                    - order
                    - submitPath
                    properties:
                      chain:
                        type: string
                      chainId:
                        type: integer
                      wallet:
                        type: string
                      fromToken:
                        type: string
                      toToken:
                        type: string
                      amountIn:
                        type: string
                      amountOut:
                        type: string
                      quoteId:
                        type: string
                      preset:
                        type: string
                      quote:
                        type: object
                        additionalProperties: true
                      orderHash:
                        type: string
                      extension:
                        type: string
                        description: Hex string; pass it back unchanged on submit.
                      typedData:
                        type: object
                        required:
                        - primaryType
                        - types
                        - domain
                        - message
                        properties:
                          primaryType:
                            type: string
                          types:
                            type: object
                            additionalProperties: true
                          domain:
                            type: object
                            additionalProperties: true
                          message:
                            type: object
                            additionalProperties: true
                        additionalProperties: true
                      order:
                        $ref: '#/components/schemas/FusionOrder'
                      submitPath:
                        type: string
                        example: /api/fusion/submit
                      status:
                        type: string
                    additionalProperties: true
                  meta:
                    $ref: '#/components/schemas/Meta'
        '400':
          $ref: '#/components/responses/BadRequest'
        '422':
          $ref: '#/components/responses/Unprocessable'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/UpstreamUnavailable'
      security: []
  /api/fusion/submit:
    post:
      tags:
      - fusion
      operationId: fusionSubmit
      summary: Forward an already-signed Fusion order to the 1inch relayer
      description: The signature is the caller’s authorization; this endpoint never signs and never holds a key. It only forwards the order. `extension` defaults to `0x`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - chain
              - order
              - signature
              properties:
                chain:
                  type: string
                  example: base
                order:
                  $ref: '#/components/schemas/FusionOrder'
                signature:
                  type: string
                  description: 0x-prefixed hex signature from the caller’s wallet.
                extension:
                  type: string
                  default: 0x
                quoteId:
                  type: string
              additionalProperties: false
      responses:
        '200':
          description: The relayer answer
          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:
                type: object
                required:
                - data
                - meta
                properties:
                  data:
                    type: object
                    additionalProperties: true
                  meta:
                    $ref: '#/components/schemas/Meta'
        '400':
          $ref: '#/components/responses/BadRequest'
        '422':
          $ref: '#/components/responses/Unprocessable'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/UpstreamUnavailable'
      security: []
components:
  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.
    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
    FusionOrder:
      type: object
      required:
      - salt
      - maker
      - makerAsset
      - takerAsset
      - makingAmount
      - takingAmount
      description: The Fusion order as 1inch expects it. Amounts are decimal strings in base units.
      properties:
        salt:
          type: string
        maker:
          type: string
          description: Address that signs the order.
        makerAsset:
          type: string
          description: ERC-20 the maker sells.
        takerAsset:
          type: string
          description: ERC-20 the maker buys.
        makingAmount:
          type: string
          description: Sell amount, base units, as a string.
        takingAmount:
          type: string
          description: Buy amount, base units, as a string.
        receiver:
          type: string
        makerTraits:
          type: string
      additionalProperties: true
  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
  responses:
    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
    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'
    Unprocessable:
      description: The intent is well-formed but cannot be prepared — for example an expired preparation, a pair that is not live, or a strategy that is not attached to the verified router. Client-fixable problems carry a structured `issues[]`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  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