---
updatedAt: 2025-09-09T22:47:31.000Z
agentTools:
  projectIndex: https://docs.brink.trade/llms.txt
---

# Limit Swap Exact Input

Get data for a limitSwapExactInput segment.

# OpenAPI definition

```json
{
  "info": {
    "title": "API",
    "version": "1.0.0"
  },
  "openapi": "3.0.0",
  "servers": [
    {
      "description": "Production server",
      "url": "https://api.brink.trade"
    }
  ],
  "paths": {
    "/segments/limitSwapExactInput/v1": {
      "get": {
        "summary": "Limit Swap Exact Input",
        "description": "Get data for a limitSwapExactInput segment.",
        "tags": [
          "Segments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/buyerQueryParam"
          },
          {
            "$ref": "#/components/parameters/chainIdQueryParam"
          },
          {
            "$ref": "#/components/parameters/gasPriceQueryParam"
          },
          {
            "$ref": "#/components/parameters/intentDataIncludeQueryParam"
          },
          {
            "$ref": "#/components/parameters/sourcesQueryParam"
          },
          {
            "$ref": "#/components/parameters/priceCurveAddressQueryParam"
          },
          {
            "$ref": "#/components/parameters/priceCurveParamsQueryParam"
          },
          {
            "$ref": "#/components/parameters/tokenInQueryParam"
          },
          {
            "$ref": "#/components/parameters/tokenInAmountQueryParam"
          },
          {
            "$ref": "#/components/parameters/tokenOutQueryParam"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "content": {
              "application/json": {
                "schema": {
                  "example": "{\"estimates\":{\"cost\":{\"gas\":\"-1\",\"ETH\":\"-30000000000\",\"USDC\":\"-1\",\"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2\":\"-125026491\",\"0x6b175474e89094c44da98b954eedeac495271d0f\":\"-309030303031\"},\"marketOutput\":{\"ETH\":\"239949148646083100672\",\"USDC\":\"2558228755\",\"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2\":\"1000000000000000000\",\"0x6b175474e89094c44da98b954eedeac495271d0f\":\"2471718603932166520832\"},\"limitOutput\":{\"ETH\":\"19415571680721\",\"USDC\":\"207\",\"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2\":\"1000000000000000000\",\"0x6b175474e89094c44da98b954eedeac495271d0f\":\"200000000000000\"}},\"routes\":[{\"to\":\"0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559\",\"data\":\"0x83bd37f90001c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200016b175474e89094c44da98b954eedeac495271d0f080de0b6b3a76400000985fdfc7e8cc53800000ccccc00017F137D1D8d20BA54004Ba358E9C229DA26FA3Fa90001A478c2975Ab1Ea89e8196811F51A7B7Ade33eB1100018EB8a3b98659Cce290402893d0123abb75E3ab28000000000301020300030101000102001eff00000000000000000000000000000000000000a478c2975ab1ea89e8196811f51a7b7ade33eb11c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000\",\"tokenIn\":{\"address\":\"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2\",\"standard\":0,\"idsMerkleRoot\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"id\":\"0\",\"disallowFlagged\":false},\"tokenOut\":{\"address\":\"0x6b175474e89094c44da98b954eedeac495271d0f\",\"standard\":0,\"idsMerkleRoot\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"id\":\"0\",\"disallowFlagged\":false},\"tokenInAmount\":\"1000000000000000000\",\"tokenOutAmount\":\"2471718603932166520832\",\"gas\":\"-1\",\"source\":\"odos\"}]}"
                }
              }
            }
          },
          "400": {
            "description": "Validation error"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    },
    "parameters": {
      "priceCurveAddressQueryParam": {
        "in": "query",
        "required": true,
        "name": "priceCurveAddress",
        "description": "Price curve address",
        "schema": {
          "type": "object"
        }
      },
      "priceCurveParamsQueryParam": {
        "in": "query",
        "required": true,
        "name": "priceCurveParams",
        "description": "Price curve params",
        "example": "0x1230000000000",
        "schema": {
          "type": "object"
        }
      },
      "intentDataIncludeQueryParam": {
        "in": "query",
        "name": "include",
        "description": "Resources to include in response:\n  * usd_value_atot` - USD value at time of transaction\n",
        "schema": {
          "$ref": "#/components/schemas/intentDataInclude"
        }
      },
      "gasPriceQueryParam": {
        "in": "query",
        "name": "gasPrice",
        "description": "gas Price of the operation",
        "example": "150",
        "schema": {
          "type": "number"
        }
      },
      "tokenInQueryParam": {
        "in": "query",
        "required": true,
        "name": "tokenIn",
        "description": "The input token address",
        "example": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
        "schema": {
          "type": "string"
        }
      },
      "tokenOutQueryParam": {
        "in": "query",
        "required": true,
        "name": "tokenOut",
        "description": "The output token address",
        "example": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
        "schema": {
          "type": "string"
        }
      },
      "tokenInAmountQueryParam": {
        "in": "query",
        "required": true,
        "name": "tokenInAmount",
        "description": "The input token amount",
        "example": "434251276100322",
        "schema": {
          "type": "string"
        }
      },
      "sourcesQueryParam": {
        "in": "query",
        "name": "sources",
        "description": "List of sources to use when fetching routes",
        "schema": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "enso",
              "odos"
            ]
          }
        }
      },
      "buyerQueryParam": {
        "in": "query",
        "name": "buyer",
        "description": "The buyer address to use to calculate routes. Required for routes include",
        "example": "0x47A3D46D7C41EAE1238DB631C7A97FB66A62D304",
        "schema": {
          "type": "string"
        }
      },
      "chainIdQueryParam": {
        "in": "query",
        "name": "chainId",
        "required": true,
        "description": "Chain Id to use",
        "schema": {
          "type": "integer",
          "enum": [
            1,
            10,
            137,
            8453,
            42161
          ]
        }
      }
    },
    "schemas": {
      "intentDataInclude": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/intentDataIncludeItem"
        }
      },
      "intentDataIncludeItem": {
        "type": "string",
        "enum": [
          "usd_value_atot"
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```