YI
Payments · x402 · early usage

TRDEFI prepare request

TRDEFI prepare request

by yield.trdefi.com · discovered, not yet claimed by its owner · updated 2026-10-12

30d calls2
30d payers1
MethodPOST
Outputobject

Mirrored from Coinbase's public x402 Bazaar. The description is the provider's own text and has not been reviewed here; the payment requirements are copied as published.

What it does

TRDEFI prepare request

Tags: bazaar

Call contract

Method
POST
Input
HTTP request
Output
object
Last paid call
2026-10-12
Input example from Bazaar metadata
{
  "example": {
    "amount": "1000000",
    "chain": "base",
    "direction": "aToB",
    "strategyHash": "0x5928c6b6c24c08615ddde8b832e6f4b135550601e2bb903dba4123c1b8ff8f2c",
    "wallet": "0x0000000000000000000000000000000000000000"
  },
  "properties": {
    "amount": {
      "description": "REQUIRED. Input amount in token base units, as an integer string, e.g. \"1000000\" for 1 USDC. Must be greater than zero.",
      "type": "string"
    },
    "chain": {
      "description": "REQUIRED. Network the position is on. Note this list differs from /v1/positions, which ships on `base`, `arc` and `baseSepolia` only.",
      "enum": [
        "ethereum",
        "base",
        "arbitrum",
        "optimism",
        "polygon",
        "arc"
      ],
      "type": "string"
    },
    "direction": {
      "description": "Which way round the pair to swap. Omit to let the route infer it from `tokenIn`/`tokenOut`.",
      "enum": [
        "aToB",
        "bToA"
      ],
      "type": "string"
    },
    "strategyHash": {
      "description": "REQUIRED. 32-byte strategy hash of the position to swap against.",
      "pattern": "^0x[a-fA-F0-9]{64}$",
      "type": "string"
    },
    "tokenIn": {
      "description": "Optional. Token you are selling, as a symbol or address. Use it to disambiguate the direction.",
      "type": "string"
    },
    "tokenOut": {
      "description": "Optional. Token you are buying, as a symbol or address. Use it to disambiguate the direction.",
      "type": "string"
    },
    "wallet": {
      "description": "REQUIRED. Your own EVM address that will sign the swap.",
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "type": "string"
    }
  },
  "required": [
    "strategyHash",
    "chain",
    "amount",
    "wallet"
  ],
  "type": "object"
}
Output example
{
  "amountOut": "999000",
  "chain": "base",
  "note": "Sign with your own wallet. TRDEFI cannot sign or broadcast this.",
  "transactions": [
    {
      "data": "0x...",
      "to": "0x111111338c5091e8440b67b168bae16a668ac0de",
      "value": "0"
    }
  ]
}

Use with an agent

  1. Discover. Agents find this listing with GET https://bazaar.saylorinnovations.com/discovery/search?query=…, the MCP tool search_resources, or /discovery/resources.
  2. Inspect. Fetch /resources/57327.json for the price and payment options.
  3. Pay. Call GET https://yield.trdefi.com/v1/swaps. The provider answers 402 with its payment requirements. An x402 client signs one of the options below and retries with PAYMENT-SIGNATURE.
  4. Execute. The provider returns 200 with the data. Agent Bazaar is not in the request path and never sees your payment.

For humans

You don't need an account or an API key; you need a wallet holding a small amount of USDC on Base, eip155:5042, and an x402-capable client (see the examples below). Call the endpoint unpaid first to see exactly what it asks for.

Pricing & payment

Price
$0.02 / request
Protocol
x402 v2
Auth
No account or API key. Pay per request.
Networks
Base, eip155:5042
Demand
2 calls · 1 unique payers in 30d (public x402 Bazaar data)

x402 payment requirements

SchemeNetworkAssetAmountPay toTimeout
exactBase
eip155:8453
USDC$0.020x4C96dA02d7120BFb81594d0e924B237e0c74660d3600s
exacteip155:5042
eip155:5042
0x3600000000000000000000000000000000000000200000x4C96dA02d7120BFb81594d0e924B237e0c74660d3600s
accepts[] (raw JSON)
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "payTo": "0x4C96dA02d7120BFb81594d0e924B237e0c74660d",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "20000",
    "amountUsd": 0.02,
    "maxTimeoutSeconds": 3600
  },
  {
    "scheme": "exact",
    "network": "eip155:5042",
    "payTo": "0x4C96dA02d7120BFb81594d0e924B237e0c74660d",
    "asset": "0x3600000000000000000000000000000000000000",
    "amount": "20000",
    "maxTimeoutSeconds": 3600
  }
]

Schemas

Output schema (JSON Schema)
{
  "description": "One unsigned transaction that performs the swap.",
  "example": {
    "amountOut": "999000",
    "chain": "base",
    "note": "Sign with your own wallet. TRDEFI cannot sign or broadcast this.",
    "transactions": [
      {
        "data": "0x...",
        "to": "0x111111338c5091e8440b67b168bae16a668ac0de",
        "value": "0"
      }
    ]
  },
  "type": "object"
}
Example shape — generated from the schema, not a captured live response
{
  "amountOut": "999000",
  "chain": "base",
  "note": "Sign with your own wallet. TRDEFI cannot sign or broadcast this.",
  "transactions": [
    {
      "data": "0x...",
      "to": "0x111111338c5091e8440b67b168bae16a668ac0de",
      "value": "0"
    }
  ]
}

Examples

curl
curl "https://yield.trdefi.com/v1/swaps"
# -> 402 Payment Required, accepts[] lists how to pay
# retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://yield.trdefi.com/v1/swaps");
if (res.status === 402) {
  const { accepts } = await res.json();
  // pay one of accepts[] via an x402 client, then retry with the payment header
}
Python
import httpx
res = httpx.get("https://yield.trdefi.com/v1/swaps")
if res.status_code == 402:
    accepts = res.json()["accepts"]
    # pay one of accepts[] via an x402 client, then retry with the payment header

Details

Provider
yield.trdefi.com
Endpoint
https://yield.trdefi.com/v1/swaps
Machine-readable
/resources/57327.json