{
  "openapi": "3.0.3",
  "info": {
    "title": "Velora Market API",
    "version": "1.0.0",
    "description": "Velora Market API — direct aggregator pricing and Augustus calldata."
  },
  "servers": [
    {
      "url": "https://api.velora.xyz",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Market — how it works (prices → calldata → broadcast).",
    "url": "https://velora.xyz/docs/market/how-it-works"
  },
  "paths": {
    "/prices": {
      "get": {
        "summary": "Get a Market route for a token pair",
        "operationId": "marketPrices",
        "parameters": [
          {
            "name": "srcToken",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Address"
            },
            "example": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
            "description": "Source token address. A token symbol listed in /tokens can be used instead. Example uses ETH."
          },
          {
            "name": "srcDecimals",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "example": 18,
            "description": "Source token decimals. Can be omitted if a token symbol is used in srcToken."
          },
          {
            "name": "destToken",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Address"
            },
            "example": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "description": "Destination token address. A token symbol listed in /tokens can be used instead. Example uses USDC."
          },
          {
            "name": "destDecimals",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "example": 6,
            "description": "Destination token decimals. Can be omitted if a token symbol is used in destToken."
          },
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TokenAmount"
            },
            "example": "1000000000000000000",
            "description": "srcToken amount (SELL) or destToken amount (BUY), in WEI/raw units."
          },
          {
            "name": "side",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "SELL",
                "BUY"
              ],
              "default": "SELL"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ChainId"
            },
            "example": 1,
            "description": "EVM chain ID. Default: 1 (Mainnet). Market uses `network` for this parameter; Delta uses `chainId` — both are EVM chain IDs."
          },
          {
            "name": "otherExchangePrices",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "If true, the response includes price quotes from other exchanges in an `others` object."
          },
          {
            "name": "includeDEXS",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of DEXs to include."
          },
          {
            "name": "excludeDEXS",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of DEXs to exclude."
          },
          {
            "name": "excludeRFQ",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Exclude all RFQ liquidity from pricing."
          },
          {
            "name": "includeContractMethods",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of contract methods to include."
          },
          {
            "name": "excludeContractMethods",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of contract methods to exclude."
          },
          {
            "name": "userAddress",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Address"
            },
            "example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
            "description": "End-user wallet address."
          },
          {
            "name": "route",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Dash-separated list of tokens for the price route. Max 4 tokens."
          },
          {
            "name": "partner",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "anon"
            },
            "example": "my-app-name",
            "description": "Partner string. Defaults to `anon` which charges 1bps fee for all swaps."
          },
          {
            "name": "maxImpact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Bypass API price-impact check (default = 15%). Value in %."
          },
          {
            "name": "receiver",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Address"
            },
            "description": "Receiver wallet address. Omit when swapping from/to the same account."
          },
          {
            "name": "srcTokenTransferFee",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tax in basis points charged on srcToken transfers."
          },
          {
            "name": "destTokenTransferFee",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tax in basis points charged on destToken transfers."
          },
          {
            "name": "srcTokenDexTransferFee",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tax in BPS charged only on DEX swaps for srcToken."
          },
          {
            "name": "destTokenDexTransferFee",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tax in BPS charged only on DEX swaps for destToken."
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "5",
                "6.2"
              ],
              "default": "5"
            },
            "example": "6.2",
            "description": "Protocol version. Always pass `6.2` (Augustus v6.2, what these docs cover); when omitted the API falls back to the legacy v5 router."
          },
          {
            "name": "excludeContractMethodsWithoutFeeModel",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Exclude contract methods that don't support the fee model."
          },
          {
            "name": "ignoreBadUsdPrice",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Skip the USD-price availability check."
          }
        ],
        "responses": {
          "200": {
            "description": "Market route. Calldata-ready against Augustus v6.2 when `version=6.2`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketPricesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request. Documented examples: `InvalidInput`, `PricingError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unsupported chain or token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/swap": {
      "get": {
        "summary": "Get a Market route and ready-to-broadcast tx in one call",
        "operationId": "marketSwap",
        "description": "Combines GET /prices and POST /transactions into a single request: returns the optimal `priceRoute` plus ready-to-broadcast `txParams`. Convenient for streamlined execution. Trade-offs vs the two-step flow: lower rate limits, RFQ liquidity is excluded, allowances and balances are not checked, and `txParams` carries no `gas` field — estimate gas locally before broadcasting.",
        "parameters": [
          {
            "name": "srcToken",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Address"
            },
            "example": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
            "description": "Source token address. A token symbol listed in /tokens can be used instead. Example uses ETH."
          },
          {
            "name": "srcDecimals",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "example": 18,
            "description": "Source token decimals. Can be omitted if a token symbol is used in srcToken."
          },
          {
            "name": "destToken",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Address"
            },
            "example": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "description": "Destination token address. A token symbol listed in /tokens can be used instead. Example uses USDC."
          },
          {
            "name": "destDecimals",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "example": 6,
            "description": "Destination token decimals. Can be omitted if a token symbol is used in destToken."
          },
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TokenAmount"
            },
            "example": "1000000000000000000",
            "description": "srcToken amount (SELL) or destToken amount (BUY), in WEI/raw units."
          },
          {
            "name": "side",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "SELL",
                "BUY"
              ],
              "default": "SELL"
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ChainId"
            },
            "example": 1,
            "description": "EVM chain ID. Default: 1 (Mainnet). Market uses `network`; Delta uses `chainId`."
          },
          {
            "name": "slippage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000
            },
            "example": 100,
            "description": "Allowed slippage in basis points (0–10000). `100` = 1%."
          },
          {
            "name": "userAddress",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Address"
            },
            "example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
            "description": "Caller wallet address. Used as the transaction `from`. When using an intermediary contract, userAddress should correspond to msg.sender and receiver to the recipient."
          },
          {
            "name": "receiver",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Address"
            },
            "description": "Output recipient for Swap & Transfer. Omit when swapping from/to the same account."
          },
          {
            "name": "partner",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "anon"
            },
            "example": "my-app-name",
            "description": "Partner string. Defaults to `anon` which charges 1bps fee for all swaps."
          },
          {
            "name": "partnerAddress",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Address"
            },
            "description": "Partner fee / surplus recipient address."
          },
          {
            "name": "partnerFeeBps",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Partner fee in basis points."
          },
          {
            "name": "otherExchangePrices",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "If true, the response includes competitor price quotes in an `others` object."
          },
          {
            "name": "includeDEXS",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of DEXs to include."
          },
          {
            "name": "excludeDEXS",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of DEXs to exclude."
          },
          {
            "name": "includeContractMethods",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of contract methods to include."
          },
          {
            "name": "excludeContractMethods",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of contract methods to exclude."
          },
          {
            "name": "maxImpact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Bypass API price-impact check (default = 15%). Value in %."
          },
          {
            "name": "route",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Dash-separated list of tokens for the price route. Max 4 tokens."
          },
          {
            "name": "srcTokenTransferFee",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tax in basis points charged on srcToken transfers."
          },
          {
            "name": "destTokenTransferFee",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tax in basis points charged on destToken transfers."
          },
          {
            "name": "srcTokenDexTransferFee",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "DEX-specific tax in basis points charged on srcToken transfers."
          },
          {
            "name": "destTokenDexTransferFee",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "DEX-specific tax in basis points charged on destToken transfers."
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "5",
                "6.2"
              ],
              "default": "5"
            },
            "example": "6.2",
            "description": "Protocol version. Always pass `6.2` (Augustus v6.2, what these docs cover); when omitted the API falls back to the legacy v5 router."
          },
          {
            "name": "ignoreBadUsdPrice",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Skip the USD-price availability check."
          },
          {
            "name": "takeSurplus",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Collect positive slippage as surplus. Works with partnerAddress."
          },
          {
            "name": "isCapSurplus",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true
            },
            "description": "Cap collected surplus at 1%."
          },
          {
            "name": "isSurplusToUser",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Route positive slippage / surplus to the user instead of the partner."
          },
          {
            "name": "isDirectFeeTransfer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Transfer the partner fee directly rather than accruing it in the Fee Vault."
          }
        ],
        "responses": {
          "200": {
            "description": "Optimal route plus ready-to-broadcast tx params. Calldata targets Augustus v6.2 when `version=6.2`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketSwapResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request. Documented examples: `InvalidInput`, `PricingError`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unsupported chain or token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/transactions/{chainId}": {
      "post": {
        "summary": "Build calldata for a Market Swap",
        "operationId": "marketTransactions",
        "description": "Build ready-to-broadcast transaction parameters from the `priceRoute` returned by GET /prices, passed verbatim. Unless `ignoreChecks=true`, the API verifies balances and allowances and simulates the transaction before returning calldata, so the response includes a `gas` estimate.",
        "parameters": [
          {
            "name": "chainId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ChainId"
            },
            "description": "EVM chain ID. Matches `priceRoute.network`."
          },
          {
            "name": "gasPrice",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Gas price to use for the transaction, in WEI."
          },
          {
            "name": "ignoreChecks",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Skip on-chain balance, allowance, and transaction-failure checks. The response omits the `gas` field when enabled."
          },
          {
            "name": "ignoreGasEstimate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Skip the gas estimate. The response omits the `gas` field when enabled."
          },
          {
            "name": "onlyParams",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Return only the contract call parameters instead of a full transaction object."
          },
          {
            "name": "eip1559",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Return an EIP-1559 transaction with `maxFeePerGas` and `maxPriorityFeePerGas` in place of `gasPrice`."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarketTransactionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Augustus calldata + tx fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketTransactionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or stale priceRoute. Documented examples: `InvalidInput`, `StalePriceRoute`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Address": {
        "type": "string",
        "description": "EVM address (20 bytes, hex-encoded with `0x` prefix). Use the mixed-case placeholder `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` for native ETH.",
        "pattern": "^0x[a-fA-F0-9]{40}$",
        "example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
      },
      "ChainId": {
        "type": "integer",
        "description": "EVM chain ID. Supported values today include 1 (Mainnet), 10 (Optimism), 56 (BSC), 137 (Polygon), 8453 (Base), 42161 (Arbitrum), 43114 (Avalanche), 100 (Gnosis). The set is open — call GET /chains for the live list.",
        "example": 1
      },
      "TokenAmount": {
        "type": "string",
        "description": "Token amount in WEI / raw units (no decimal point). Serialized as a string to preserve precision for amounts that exceed JavaScript Number range.",
        "example": "1000000000000000000"
      },
      "ErrorCode": {
        "type": "string",
        "description": "Documented Velora error code (e.g. `PricingError`, `InvalidInput`, `UnsupportedChain`, `StalePriceRoute`, `InvalidSignature`). The set is open — handle codes you recognize and fall back to a generic error path for everything else. See /api-reference/troubleshooting for known codes.",
        "example": "PricingError"
      },
      "ErrorResponse": {
        "type": "object",
        "description": "Standard Velora error envelope.",
        "required": [
          "errorType"
        ],
        "properties": {
          "errorType": {
            "$ref": "#/components/schemas/ErrorCode"
          },
          "details": {
            "type": "string",
            "description": "Human-readable description of the failure."
          }
        },
        "example": {
          "errorType": "PricingError",
          "details": "Error getting price data"
        }
      },
      "MarketPriceRoute": {
        "type": "object",
        "description": "Market route block. Calldata-ready against Augustus v6.2 when `version=6.2`.",
        "properties": {
          "blockNumber": {
            "type": "integer"
          },
          "network": {
            "$ref": "#/components/schemas/ChainId"
          },
          "srcToken": {
            "$ref": "#/components/schemas/Address"
          },
          "srcDecimals": {
            "type": "integer"
          },
          "srcAmount": {
            "$ref": "#/components/schemas/TokenAmount"
          },
          "destToken": {
            "$ref": "#/components/schemas/Address"
          },
          "destDecimals": {
            "type": "integer"
          },
          "destAmount": {
            "$ref": "#/components/schemas/TokenAmount"
          },
          "bestRoute": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "gasCostUSD": {
            "type": "string"
          },
          "gasCost": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "SELL",
              "BUY"
            ]
          },
          "version": {
            "type": "string"
          },
          "contractAddress": {
            "$ref": "#/components/schemas/Address"
          },
          "tokenTransferProxy": {
            "$ref": "#/components/schemas/Address"
          },
          "contractMethod": {
            "type": "string"
          },
          "partnerFee": {
            "type": "number"
          },
          "srcUSD": {
            "type": "string"
          },
          "destUSD": {
            "type": "string"
          },
          "partner": {
            "type": "string"
          },
          "maxImpactReached": {
            "type": "boolean"
          },
          "hmac": {
            "type": "string"
          }
        }
      },
      "MarketPricesResponse": {
        "type": "object",
        "description": "GET /prices envelope.",
        "properties": {
          "priceRoute": {
            "$ref": "#/components/schemas/MarketPriceRoute"
          }
        }
      },
      "MarketTransactionRequest": {
        "type": "object",
        "required": [
          "srcToken",
          "destToken",
          "priceRoute",
          "userAddress"
        ],
        "properties": {
          "priceRoute": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MarketPriceRoute"
              }
            ],
            "description": "The `priceRoute` block returned by GET /prices, passed verbatim — do not recompute or re-encode."
          },
          "srcToken": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ],
            "description": "Source token address. A token symbol listed in /tokens can be used instead."
          },
          "srcDecimals": {
            "type": "integer",
            "description": "Source token decimals. Can be omitted if a token symbol is used in srcToken."
          },
          "destToken": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ],
            "description": "Destination token address. A token symbol listed in /tokens can be used instead."
          },
          "destDecimals": {
            "type": "integer",
            "description": "Destination token decimals. Can be omitted if a token symbol is used in destToken."
          },
          "srcAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TokenAmount"
              }
            ],
            "description": "Source amount in WEI/raw units. Required when `side=SELL`. On `side=BUY` it can be omitted if `slippage` is provided."
          },
          "destAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TokenAmount"
              }
            ],
            "description": "Destination amount in WEI/raw units. Required when `side=BUY`. On `side=SELL` it can be omitted if `slippage` is provided."
          },
          "slippage": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000,
            "description": "Allowed slippage in basis points (0–10000). `250` = 2.5%. Required when the non-fixed amount (destAmount on SELL, srcAmount on BUY) is omitted."
          },
          "userAddress": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ],
            "description": "Address of the transaction caller (msg.sender). When using an intermediary contract, userAddress should correspond to msg.sender and receiver to the recipient."
          },
          "txOrigin": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ],
            "description": "When msg.sender differs from the transaction sender, pass the sender here along with userAddress."
          },
          "receiver": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ],
            "description": "Recipient of the swap output, for Swap & Transfer. Omit when userAddress receives."
          },
          "partner": {
            "type": "string",
            "example": "my-app-name",
            "description": "Partner string. Used for analytics and fee attribution on your project's swaps."
          },
          "partnerAddress": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ],
            "description": "Address entitled to claim partner fees or surplus."
          },
          "partnerFeeBps": {
            "type": "string",
            "description": "Partner fee in basis points, used with partnerAddress. `200` = 2%."
          },
          "permit": {
            "type": "string",
            "description": "Signed permit payload (hex). Lets the swap skip the separate approve transaction."
          },
          "deadline": {
            "type": "integer",
            "description": "Unix timestamp (seconds) after which the transaction is no longer valid."
          },
          "isCapSurplus": {
            "type": "boolean",
            "default": true,
            "description": "Cap collected surplus at 1%."
          },
          "takeSurplus": {
            "type": "boolean",
            "default": false,
            "description": "Collect positive slippage as surplus. Works with partnerAddress."
          },
          "isSurplusToUser": {
            "type": "boolean",
            "default": false,
            "description": "Route positive slippage / surplus to the user instead of the partner."
          },
          "isDirectFeeTransfer": {
            "type": "boolean",
            "default": false,
            "description": "Transfer the partner fee directly rather than accruing it in the Fee Vault."
          }
        }
      },
      "MarketTransactionResponse": {
        "type": "object",
        "description": "Augustus calldata + tx envelope ready to broadcast.",
        "properties": {
          "from": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ],
            "description": "End-user wallet address (the `userAddress` from the request)."
          },
          "to": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ],
            "description": "The Augustus v6.2 router. Send the transaction here; it is also the ERC-20 spender to approve."
          },
          "value": {
            "type": "string",
            "example": "0",
            "description": "Native token amount in WEI to send with the transaction. `\"0\"` for ERC-20 sources."
          },
          "data": {
            "type": "string",
            "description": "Encoded swap calldata."
          },
          "gasPrice": {
            "type": "string",
            "example": "16000000000",
            "description": "Suggested gas price in WEI. Replaced by maxFeePerGas / maxPriorityFeePerGas when `eip1559=true`."
          },
          "maxFeePerGas": {
            "type": "string",
            "description": "EIP-1559 max fee per gas in WEI. Present when `eip1559=true`."
          },
          "maxPriorityFeePerGas": {
            "type": "string",
            "description": "EIP-1559 max priority fee per gas in WEI. Present when `eip1559=true`."
          },
          "gas": {
            "type": "string",
            "description": "Gas limit estimate from the API's transaction checks. Returned by POST /transactions unless `ignoreChecks` or `ignoreGasEstimate` is set; omitted by GET /swap, where you estimate locally before broadcasting."
          },
          "chainId": {
            "$ref": "#/components/schemas/ChainId"
          }
        }
      },
      "MarketSwapResponse": {
        "type": "object",
        "description": "GET /swap envelope — pricing (`priceRoute`) plus a ready-to-broadcast tx (`txParams`) in one call.",
        "properties": {
          "priceRoute": {
            "$ref": "#/components/schemas/MarketPriceRoute"
          },
          "txParams": {
            "$ref": "#/components/schemas/MarketTransactionResponse"
          }
        }
      }
    }
  }
}