Skip to main content
POST
/
limit_order_quote
Get a limit order quote
curl --request POST \
  --url https://trade-api.gateway.uniswap.org/v1/limit_order_quote \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "swapper": "<string>",
  "amount": "<string>",
  "type": "EXACT_INPUT",
  "tokenIn": "<string>",
  "tokenOut": "<string>",
  "tokenInChainId": 1,
  "tokenOutChainId": 1,
  "limitPrice": "<string>",
  "orderDeadline": 123
}
'
{
  "requestId": "<string>",
  "quote": {
    "encodedOrder": "<string>",
    "orderId": "<string>",
    "orderInfo": {
      "chainId": 1,
      "nonce": "<string>",
      "reactor": "<string>",
      "swapper": "<string>",
      "deadline": 123,
      "exclusiveFiller": "<string>",
      "exclusivityOverrideBps": "<string>",
      "input": {
        "startAmount": "<string>",
        "endAmount": "<string>",
        "token": "<string>"
      },
      "outputs": [
        {
          "startAmount": "<string>",
          "endAmount": "<string>",
          "token": "<string>",
          "recipient": "<string>"
        }
      ],
      "additionalValidationContract": "0x0000000000000000000000000000000000000000",
      "additionalValidationData": "0x",
      "decayStartTime": 123,
      "decayEndTime": 123
    },
    "portionBips": 123,
    "portionAmount": "<string>",
    "portionRecipient": "<string>",
    "quoteId": "<string>",
    "slippageTolerance": 123,
    "classicGasUseEstimateUSD": "<string>",
    "aggregatedOutputs": [
      {
        "token": "<string>",
        "amount": "<string>",
        "recipient": "<string>",
        "bps": 123,
        "minAmount": "<string>"
      }
    ]
  },
  "routing": "LIMIT_ORDER",
  "permitData": {
    "domain": {},
    "values": {},
    "types": {}
  }
}

Authorizations

x-api-key
string
header
required

Body

application/json
swapper
string
required

The wallet address which will receive the token.

Pattern: ^(0x)?[0-9a-fA-F]{40}$
amount
string
required

The quantity of tokens denominated in the token's base units. (For example, for an ERC20 token one token is 1x10^18 base units. For one USDC token one token is 1x10^6 base units.) This value must be greater than 0.

Pattern: ^[0-9]+$
type
enum<string>
default:EXACT_INPUT
required

The handling of the amount field. EXACT_INPUT means the requester will send the specified amount of input tokens and get a quote with a variable quantity of output tokens. EXACT_OUTPUT means the requester will receive the specified amount of output tokens and get a quote with a variable quantity of input tokens.

Available options:
EXACT_INPUT,
EXACT_OUTPUT
tokenIn
string
required

The token which will be sent, specified by its token address. For a list of supported tokens, see the FAQ.

Pattern: ^(0x)?[0-9a-fA-F]{40}$
tokenOut
string
required

The token which will be received, specified by its token address. For a list of supported tokens, see the FAQ.

Pattern: ^(0x)?[0-9a-fA-F]{40}$
tokenInChainId
enum<number>
default:1
required

The unique ID of the blockchain. For a list of supported chains see the FAQ.

Available options:
1,
10,
56,
130,
137,
196,
324,
480,
1868,
8453,
10143,
42161,
42220,
43114,
81457,
7777777,
1301,
84532,
11155111,
143
tokenOutChainId
enum<number>
default:1
required

The unique ID of the blockchain. For a list of supported chains see the FAQ.

Available options:
1,
10,
56,
130,
137,
196,
324,
480,
1868,
8453,
10143,
42161,
42220,
43114,
81457,
7777777,
1301,
84532,
11155111,
143
limitPrice
string
orderDeadline
number

Response

Limit Order Quote request successful.

requestId
string
required

A unique ID for the request.

quote
object
required
routing
enum<string>
required
Available options:
LIMIT_ORDER
permitData
object
required

the permit2 message object for the customer to sign to permit spending by the permit2 contract.