{
  "openapi": "3.1.0",
  "info": {
    "title": "Quietwork Swap",
    "version": "1.3.0",
    "description": "Non-custodial token swap quotes and unsigned transaction building for agents and people (KyberSwap, Velora/ParaSwap, 0x Swap API, CoW Protocol, deBridge DLN, SideShift). Free to call: no API key, no x402 per-call price. Revenue is a disclosed 0.1% integrator fee inside each executed swap (same on every venue); venues may add their own fees (0x ~0.15% zeroExFee; deBridge protocol/flat/solver fees), all itemised in the quote. You sign in your own wallet; we never hold funds or keys. Built and operated with AI automation by Quietwork Labs. Not financial advice.",
    "contact": {
      "email": "quietworklabs@outlook.com"
    }
  },
  "servers": [
    {
      "url": "https://qw-swap.quietworklabs.workers.dev"
    }
  ],
  "x-guidance": "GET /api/quote for a same-chain KyberSwap quote, then POST /api/build with the same fields + sender for the unsigned tx. Gasless: /api/cow-quote then /api/cow-build (EIP-712), sign, POST /api/cow-order. Cross-chain EVM: /api/debridge-quote then /api/debridge-build. Non-EVM shifts: /api/xrate. The MCP server at /mcp exposes the same functions as tools.",
  "x-mcp": {
    "url": "https://qw-swap.quietworklabs.workers.dev/mcp",
    "transport": "streamable-http",
    "serverCard": "https://qw-swap.quietworklabs.workers.dev/.well-known/mcp/server-card.json"
  },
  "paths": {
    "/api/quote": {
      "get": {
        "operationId": "swap_quote",
        "summary": "Same-chain swap quote (KyberSwap)",
        "description": "Best-price same-chain quote; includes the disclosed 0.1% integrator fee.",
        "security": [],
        "parameters": [
          {
            "name": "chain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "ethereum",
                "base",
                "arbitrum",
                "optimism",
                "polygon",
                "bsc"
              ]
            }
          },
          {
            "name": "tokenIn",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "symbol (ETH, USDC, ...) or 0x address"
            }
          },
          {
            "name": "tokenOut",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "amount of tokenIn in token units, e.g. '0.05'"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON quote/status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/api/build": {
      "post": {
        "operationId": "swap_build_tx",
        "summary": "Build unsigned KyberSwap swap tx (+approval if needed)",
        "description": "Body: chain, tokenIn, tokenOut, amount, sender, optional recipient, slippageBps.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Same fields as the matching MCP tool inputSchema (see /mcp tools/list)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Unsigned transaction(s) / typed data / order id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/api/0x-quote": {
      "get": {
        "operationId": "zerox_quote",
        "summary": "Same-chain swap quote (0x Swap API)",
        "description": "Includes our 0.1% fee plus 0x's own ~0.15% platform fee (zeroExFee).",
        "security": [],
        "parameters": [
          {
            "name": "chain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "ethereum",
                "base",
                "arbitrum",
                "optimism",
                "polygon",
                "bsc"
              ]
            }
          },
          {
            "name": "tokenIn",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "symbol (ETH, USDC, ...) or 0x address"
            }
          },
          {
            "name": "tokenOut",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "amount of tokenIn in token units, e.g. '0.05'"
            }
          },
          {
            "name": "sender",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON quote/status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/api/0x-build": {
      "post": {
        "operationId": "zerox_build_tx",
        "summary": "Build unsigned 0x AllowanceHolder tx",
        "description": "Body: chain, tokenIn, tokenOut, amount, sender, optional slippageBps.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Same fields as the matching MCP tool inputSchema (see /mcp tools/list)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Unsigned transaction(s) / typed data / order id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/api/cow-quote": {
      "get": {
        "operationId": "cow_quote",
        "summary": "Gasless CoW Protocol market-order quote",
        "description": "ERC-20 sell tokens only; includes the same 0.1% fee as a CoW partner fee.",
        "security": [],
        "parameters": [
          {
            "name": "chain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "ethereum",
                "arbitrum",
                "base",
                "polygon",
                "bsc"
              ]
            }
          },
          {
            "name": "tokenIn",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "symbol (ETH, USDC, ...) or 0x address"
            }
          },
          {
            "name": "tokenOut",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "amount of tokenIn in token units, e.g. '0.05'"
            }
          },
          {
            "name": "sender",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON quote/status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/api/cow-build": {
      "post": {
        "operationId": "cow_build_order",
        "summary": "Build unsigned CoW order (EIP-712 typed data)",
        "description": "Body: chain, tokenIn, tokenOut, amount, sender, optional recipient, slippageBps.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Same fields as the matching MCP tool inputSchema (see /mcp tools/list)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Unsigned transaction(s) / typed data / order id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/api/cow-order": {
      "post": {
        "operationId": "cow_post_order",
        "summary": "Submit a signed CoW order",
        "description": "Body: chain, order (from cow-build, unchanged), signature, sender, optional quoteId.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Same fields as the matching MCP tool inputSchema (see /mcp tools/list)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Unsigned transaction(s) / typed data / order id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/api/debridge-quote": {
      "get": {
        "operationId": "debridge_quote",
        "summary": "Cross-chain EVM quote (deBridge DLN)",
        "description": "Includes our 0.1% affiliate fee plus deBridge's own fees, itemised.",
        "security": [],
        "parameters": [
          {
            "name": "srcChain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "ethereum",
                "base",
                "arbitrum",
                "optimism",
                "polygon",
                "bsc"
              ]
            }
          },
          {
            "name": "dstChain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "ethereum",
                "base",
                "arbitrum",
                "optimism",
                "polygon",
                "bsc"
              ]
            }
          },
          {
            "name": "tokenIn",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tokenOut",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON quote/status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/api/debridge-build": {
      "post": {
        "operationId": "debridge_build_tx",
        "summary": "Build unsigned deBridge DLN order tx",
        "description": "Body: srcChain, dstChain, tokenIn, tokenOut, amount, sender, optional recipient.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Same fields as the matching MCP tool inputSchema (see /mcp tools/list)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Unsigned transaction(s) / typed data / order id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/api/xrate": {
      "get": {
        "operationId": "crosschain_rate",
        "summary": "Cross-asset rate via SideShift.ai",
        "description": "Same rate as sideshift.ai (affiliate).",
        "security": [],
        "parameters": [
          {
            "name": "depositCoin",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "depositNetwork",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "settleCoin",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "settleNetwork",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON quote/status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Health and fee configuration",
        "description": "Free.",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "JSON quote/status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    }
  }
}