{
  "openapi": "3.1.0",
  "info": {
    "title": "NoKycCryptoSwap Public Swap & Bridge API",
    "version": "1.0.0",
    "description": "Zero-API-key, non-custodial crypto swap API for trading bots and AI agents. Supports 920+ cross-chain No-KYC pairs (BTC, USDT TRC20, TON, ETH, XRP, XMR -> SOL), 0.40% Solana DEX swaps (any SPL mint / Pump.fun CA), and fast EVM <-> Solana bridges.",
    "contact": {
      "email": "partners@nokyccryptoswap.com",
      "url": "https://nokyccryptoswap.com/developers.html"
    }
  },
  "servers": [
    {
      "url": "https://api.nokyccryptoswap.com",
      "description": "Global Cloudflare Edge Production API"
    }
  ],
  "paths": {
    "/v1/tokens": {
      "get": {
        "operationId": "searchTokens",
        "summary": "Search 920+ coins or any Solana Contract Address (CA)",
        "parameters": [
          { "name": "q", "in": "query", "required": true, "schema": { "type": "string" }, "example": "PENGU" },
          { "name": "group", "in": "query", "required": false, "schema": { "type": "string", "enum": ["all", "solana", "cross"] } }
        ],
        "responses": { "200": { "description": "Matching tokens with live metadata and prices" } }
      }
    },
    "/v1/quote": {
      "get": {
        "operationId": "getSwapQuote",
        "summary": "Get live quote across Solana DEX (0.40%), EVM Bridge (0.40%), or No-KYC Cross-Chain",
        "parameters": [
          { "name": "from", "in": "query", "required": true, "schema": { "type": "string" }, "example": "sol" },
          { "name": "to", "in": "query", "required": true, "schema": { "type": "string" }, "example": "usdc" },
          { "name": "amount", "in": "query", "required": true, "schema": { "type": "number" }, "example": 1 },
          { "name": "slippageBps", "in": "query", "required": false, "schema": { "type": "integer", "default": 50 } }
        ],
        "responses": { "200": { "description": "Live swap quote and auto-detected execution engine" } }
      }
    },
    "/v1/swap/solana": {
      "post": {
        "operationId": "buildSolanaSwapTx",
        "summary": "Build unsigned Solana VersionedTransaction (base64) at 0.40% fee",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["inputMint", "outputMint", "amount", "userPublicKey"],
                "properties": {
                  "inputMint": { "type": "string", "example": "sol" },
                  "outputMint": { "type": "string", "example": "usdc" },
                  "amount": { "type": "number", "example": 1.5 },
                  "userPublicKey": { "type": "string" },
                  "slippageBps": { "type": "integer", "default": 50 }
                }
              }
            }
          }
        },
        "responses": { "200": { "description": "Unsigned base64 swapTransaction ready for local wallet signing" } }
      }
    },
    "/v1/swap/nokyc": {
      "post": {
        "operationId": "createNoKycSwap",
        "summary": "Create instant non-custodial cross-chain No-KYC swap order & deposit address",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["from", "to", "amount", "recipientAddress"],
                "properties": {
                  "from": { "type": "string", "example": "btc" },
                  "to": { "type": "string", "example": "sol" },
                  "amount": { "type": "number", "example": 0.05 },
                  "recipientAddress": { "type": "string" },
                  "refundAddress": { "type": "string" }
                }
              }
            }
          }
        },
        "responses": { "200": { "description": "One-time deposit address, orderId, and statusUrl" } }
      }
    },
    "/v1/swap/bridge": {
      "post": {
        "operationId": "buildBridgeTx",
        "summary": "Build unsigned EVM <-> Solana fast bridge transaction (~30s, 0.40% fee)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["srcChainId", "dstChainId", "amount", "senderAddress", "recipientAddress"],
                "properties": {
                  "srcChainId": { "type": "integer", "example": 8453 },
                  "dstChainId": { "type": "integer", "example": 7565164 },
                  "srcToken": { "type": "string", "example": "0x0000000000000000000000000000000000000000" },
                  "dstToken": { "type": "string", "example": "11111111111111111111111111111111" },
                  "amount": { "type": "number", "example": 0.25 },
                  "senderAddress": { "type": "string" },
                  "recipientAddress": { "type": "string" }
                }
              }
            }
          }
        },
        "responses": { "200": { "description": "Unsigned bridge tx ready for local wallet signing" } }
      }
    },
    "/v1/status/{orderId}": {
      "get": {
        "operationId": "checkSwapStatus",
        "summary": "Check live status of a No-KYC cross-chain swap order",
        "parameters": [
          { "name": "orderId", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Live order status and payout transaction hash" } }
      }
    }
  }
}
