{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vybenetwork-com/json-schema/vybenetwork-com-swap-proxy-params-schema.json",
  "title": "SwapProxyParams",
  "description": "Request payload model for swap proxy params parameters used by this API endpoint.",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vybenetwork-com-solana-api-websocket-api-openapi.yml#/components/schemas/SwapProxyParams",
  "properties": {
    "accountAddress": {
      "$ref": "#/$defs/SolanaId"
    },
    "amount": {
      "description": "Amount to swap (in UI units)",
      "format": "double",
      "type": "number"
    },
    "autoCalculateSlippage": {
      "description": "Auto-calculate optimal slippage",
      "type": [
        "boolean",
        "null"
      ]
    },
    "closeInputAta": {
      "description": "When true, append closeAccount on input SPL ATA after a full-balance sell.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "closeWsolAta": {
      "description": "Ephemeral WSOL path on sell: create WSOL ATA, sync native, then close.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "createOutputAta": {
      "description": "Create output SPL ATA idempotently before swap (buy when wallet has no output ATA).",
      "type": [
        "boolean",
        "null"
      ]
    },
    "enrich": {
      "description": "When true, ix-builder attaches print-ready enrichment (simulation, fees, USD, retention %)\non POST /v4/trading/swap responses. Forwarded verbatim to ix-builder; ignored by aggregators.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "enumerateRoutes": {
      "description": "Build multiple route candidates (up to 10). Default on; set false to stop at first success.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "gasless": {
      "description": "Use Vybe fee payer for gas",
      "type": [
        "boolean",
        "null"
      ]
    },
    "inputBalanceExact": {
      "description": "Exact input balance from wallet token-balance (UI units); used with closeInputAta.",
      "type": [
        "string",
        "null"
      ]
    },
    "inputDecimals": {
      "description": "Input token decimals when paired with inputBalanceExact (optional; on-chain fetch otherwise).",
      "format": "int32",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "inputMintAddress": {
      "$ref": "#/$defs/SolanaId"
    },
    "inputMintDecimals": {
      "description": "Input mint decimals from client cache.",
      "format": "int32",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "inputMintPrice": {
      "description": "Client USD price for the input mint (skips backend price fetch when set).",
      "format": "double",
      "type": [
        "number",
        "null"
      ]
    },
    "liquidity": {
      "description": "Known USD pool liquidity from market discovery; forwarded to ix-builder as a hint for pinned swaps and route enrichment.\nAccepts legacy `marketScore` as an alias.",
      "format": "double",
      "type": [
        "number",
        "null"
      ]
    },
    "marketFetchMode": {
      "description": "Market discovery mode for Vybe router: \"full\" | \"trades\" | \"rpc\".",
      "type": [
        "string",
        "null"
      ]
    },
    "outputMintAddress": {
      "$ref": "#/$defs/SolanaId"
    },
    "outputMintDecimals": {
      "description": "Output mint decimals from client cache.",
      "format": "int32",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "outputMintPrice": {
      "description": "Client USD price for the output mint (skips backend price fetch when set).",
      "format": "double",
      "type": [
        "number",
        "null"
      ]
    },
    "partner": {
      "description": "Partner identifier for fee routing",
      "type": [
        "string",
        "null"
      ]
    },
    "poolAddress": {
      "allOf": [
        {
          "$ref": "#/$defs/SolanaId"
        }
      ],
      "description": "The target liquidity pool address used when executing this swap request.",
      "nullable": true
    },
    "postSwapNeeded": {
      "description": "Caller indicates a post-swap bridge leg is required after the main swap.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "preSwapNeeded": {
      "description": "Caller indicates a pre-swap bridge leg is required before the main swap.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "programAddress": {
      "allOf": [
        {
          "$ref": "#/$defs/SolanaId"
        }
      ],
      "nullable": true
    },
    "protocol": {
      "allOf": [
        {
          "$ref": "#/$defs/SwapProxyProtocol"
        }
      ],
      "description": "The swap protocol identifier used to route and execute this trade request.",
      "nullable": true
    },
    "quoteBridge": {
      "description": "Quote-bridge metadata for multi-hop routes (ix-builder).",
      "nullable": true
    },
    "router": {
      "$ref": "#/$defs/SwapProxyRouter"
    },
    "simulate": {
      "description": "Simulate transaction without building",
      "type": [
        "boolean",
        "null"
      ]
    },
    "slippage": {
      "description": "Slippage tolerance in percentage (default: 0.5)",
      "format": "double",
      "type": [
        "number",
        "null"
      ]
    },
    "solPrice": {
      "description": "Client USD SOL price when neither leg is SOL/WSOL (fee/rent USD).",
      "format": "double",
      "type": [
        "number",
        "null"
      ]
    },
    "source": {
      "description": "Discovery source for pinned pool (`trades`, `markets`, `rpc`, …).",
      "type": [
        "string",
        "null"
      ]
    },
    "swapFee": {
      "description": "Service fee percentage (e.g., 1 for 1%)",
      "format": "double",
      "type": [
        "number",
        "null"
      ]
    }
  },
  "required": [
    "accountAddress",
    "amount",
    "inputMintAddress",
    "outputMintAddress"
  ],
  "type": "object",
  "$defs": {
    "SolanaId": {
      "description": "Typed Solana public key identifier used across request parameters and response fields.",
      "format": "pubkey",
      "type": "string"
    },
    "SwapProxyProtocol": {
      "description": "Enumeration of supported swap proxy protocol values used by this API model.",
      "enum": [
        "PUMPFUN",
        "PUMPSWAP",
        "RAYDIUMAMMV4",
        "RAYDIUMCPMM",
        "RAYDIUMCLMM",
        "RAYDIUMLAUNCHLAB",
        "METEORADBC",
        "METEORADAMM2",
        "METEORADLMM",
        "SANCTUM"
      ],
      "type": "string"
    },
    "SwapProxyRouter": {
      "description": "Enumeration of supported swap proxy router values used by this API model.",
      "enum": [
        "titan",
        "jupiter",
        "vybe"
      ],
      "type": "string"
    }
  }
}