mirrored listing x402 solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpeip155:8453eip155:42793

Build an unsigned swap transaction for the best route

Build an unsigned swap transaction for the best route. Builds an unsigned transaction for the selected route. Compare it with a fresh quote, validate every returned transaction field, obtain explicit signing approval, and broadcast it through the selected chain's RPC. The compatibility parameters permit and usePermit2 are ignored. For an ERC-20 source, approve the router in tx.to for at least srcAmount before executing the returned transaction.

Do you run 3route.agents.bakingbad.dev? This listing was mirrored from Coinbase's public Bazaar. Claim it in 30 seconds — no account required — and it becomes verified, permanently overriding the mirrored copy.

Claim this listing
1000 (raw units)
price
7
calls / 30d
1
unique payers
2026-08-21
updated

Provider

3route.agents.bakingbad.dev · discovered, not yet claimed by its owner

Payment (x402 accepts[])

[
  {
    "scheme": "exact",
    "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
    "payTo": "AZ59bSccJmQu8Ljic1c5zxhjZitVbbutUYjBNwKLqfyD",
    "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "amount": "1000",
    "maxTimeoutSeconds": 300
  },
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "payTo": "0x5D89060682fcE50eCaa7600aF6A5645Bd2b107Eb",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "1000",
    "maxTimeoutSeconds": 300
  },
  {
    "scheme": "batch-settlement",
    "network": "eip155:8453",
    "payTo": "0x5D89060682fcE50eCaa7600aF6A5645Bd2b107Eb",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "1000",
    "maxTimeoutSeconds": 300
  },
  {
    "scheme": "exact",
    "network": "eip155:42793",
    "payTo": "0x5D89060682fcE50eCaa7600aF6A5645Bd2b107Eb",
    "asset": "0x796Ea11Fa2dD751eD01b53C372fFDB4AAa8f00F9",
    "amount": "1000",
    "maxTimeoutSeconds": 300
  }
]

Output schema

{
  "bazaar": {
    "info": {
      "input": {
        "method": "GET",
        "pathParams": {
          "chainId": "42793"
        },
        "queryParams": {
          "amount": "1000000000000000000",
          "dst": "0x2222222222222222222222222222222222222222",
          "fee": 0,
          "from": "0x1111111111111111111111111111111111111111",
          "gasPrice": "1000000000",
          "includeBlockNumber": false,
          "includeProtocols": false,
          "includeTokensInfo": false,
          "isExactOutput": false,
          "receiver": "0x1111111111111111111111111111111111111111",
          "referrer": "0x1111111111111111111111111111111111111111",
          "slippage": 1,
          "src": "0x0000000000000000000000000000000000000000"
        },
        "type": "http"
      },
      "output": {
        "example": {
          "dstAmount": "950000",
          "dstAmountMin": "940500",
          "gas": 210000,
          "srcAmount": "1000000000000000000",
          "tx": {
            "data": "0x1234",
            "from": "0x1111111111111111111111111111111111111111",
            "gas": "210000",
            "gasPrice": "1000000000",
            "to": "0x2222222222222222222222222222222222222222",
            "value": "1000000000000000000"
          }
        },
        "type": "json"
      }
    },
    "routeTemplate": "/api/v6.1/:chainId/swap",
    "schema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "properties": {
        "input": {
          "additionalProperties": false,
          "properties": {
            "method": {
              "enum": [
                "GET"
              ],
              "type": "string"
            },
            "pathParams": {
              "additionalProperties": false,
              "properties": {
                "chainId": {
                  "enum": [
                    "4663",
                    "42793",
                    "128064"
                  ],
                  "example": "4663",
                  "pattern": "^[0-9]+$",
                  "type": "string"
                }
              },
              "required": [
                "chainId"
              ],
              "type": "object"
            },
            "queryParams": {
              "additionalProperties": false,
              "properties": {
                "amount": {
                  "example": "1000000000000000000",
                  "pattern": "^[0-9]+$",
                  "type": "string"
                },
                "dst": {
                  "example": "0x2222222222222222222222222222222222222222",
                  "pattern": "^0x[0-9a-fA-F]{40}$",
                  "type": "string"
                },
                "excludedProtocols": {
                  "type": "string"
                },
                "fee": {
                  "default": 0,
                  "maximum": 3,
                  "minimum": 0,
                  "type": "number"
                },
                "from": {
                  "example": "0x1111111111111111111111111111111111111111",
                  "pattern": "^0x[0-9a-fA-F]{40}$",
                  "type": "string"
                },
                "gasPrice": {
                  "example": "1000000000",
                  "pattern": "^[0-9]+$",
                  "type": "string"
                },
                "includeBlockNumber": {
                  "default": false,
                  "type": "boolean"
                },
                "includeProtocols": {
                  "default": false,
                  "type": "boolean"
                },
                "includeTokensInfo": {
                  "default": false,
                  "type": "boolean"
                },
                "isExactOutput": {
                  "default": false,
                  "type": "boolean"
                },
                "protocols": {
                  "type": "string"
                },
                "receiver": {
                  "example": "0x1111111111111111111111111111111111111111",
                  "pattern": "^0x[0-9a-fA-F]{40}$",
                  "type": "string"
                },
                "referrer": {
                  "example": "0x1111111111111111111111111111111111111111",
                  "pattern": "^0x[0-9a-fA-F]{40}$",
                  "type": "string"
                },
                "slippage": {
                  "default": 1,
                  "example": 1,
                  "maximum": 50,
                  "minimum": 0,
                  "type": "number"
                },
                "src": {
                  "example": "0x0000000000000000000000000000000000000000",
                  "pattern": "^0x[0-9a-fA-F]{40}$",
                  "type": "string"
                }
              },
              "required": [
                "src",
                "dst",
                "amount",
                "from"
              ],
              "type": "object"
            },
            "type": {
              "const": "http",
              "type": "string"
            }
          },
          "required": [
            "type",
            "method"
          ],
          "type": "object"
        },
        "output": {
          "properties": {
            "example": {
              "type": "object"
            },
            "type": {
              "type": "string"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        }
      },
      "required": [
        "input"
      ],
      "type": "object"
    }
  },
  "erc20ApprovalGasSponsoring": {
    "info": {
      "description": "The facilitator broadcasts a pre-signed ERC-20 approve() transaction to grant Permit2 allowance.",
      "version": "1"
    },
    "schema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "properties": {
        "amount": {
          "description": "The amount approved (uint256). Always MaxUint256.",
          "pattern": "^[0-9]+$",
          "type": "string"
        },
        "asset": {
          "description": "The address of the ERC-20 token contract.",
          "pattern": "^0x[a-fA-F0-9]{40}$",
          "type": "string"
        },
        "from": {
          "description": "The address of the sender (token owner).",
          "pattern": "^0x[a-fA-F0-9]{40}$",
          "type": "string"
        },
        "signedTransaction": {
          "description": "The RLP-encoded signed EIP-1559 transaction as a hex string.",
          "pattern": "^0x[a-fA-F0-9]+$",
          "type": "string"
        },
        "spender": {
          "description": "The address of the spender (Canonical Permit2).",
          "pattern": "^0x[a-fA-F0-9]{40}$",
          "type": "string"
        },
        "version": {
          "description": "Schema version identifier.",
          "pattern": "^[0-9]+(\\.[0-9]+)*$",
          "type": "string"
        }
      },
      "required": [
        "from",
        "asset",
        "spender",
        "amount",
        "signedTransaction",
        "version"
      ],
      "type": "object"
    }
  }
}

Use it

curl

curl "https://3route.agents.bakingbad.dev/api/v6.1/:chainId/swap"
# -> 402 Payment Required, accepts[] lists how to pay
# retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid

JavaScript

const res = await fetch("https://3route.agents.bakingbad.dev/api/v6.1/:chainId/swap");
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://3route.agents.bakingbad.dev/api/v6.1/:chainId/swap")
if res.status_code == 402:
    accepts = res.json()["accepts"]
    # pay one of accepts[] via an x402 client, then retry with the payment header

Machine-readable

Everything on this page is also available as clean JSON at /resources/1231.json, and this resource appears in /discovery/resources and /discovery/search.