Operations 2
Documentation
Documentation
https://docs.sushi.com/api/examples/swap
Documentation
https://docs.sushi.com/api/examples/quote
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/sushiswap-swap-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Sushi Swap API
version: 7.0.0
description: Documentation for interacting with the Sushi API
servers:
- description: Sushi API
url: https://api.sushi.com
- description: SwaggerHub API Auto Mocking
url: https://virtserver.swaggerhub.com/sushi-labs/sushi/7.0.0
tags:
- name: swap
description: All swap endpoints
paths:
/quote/v7/{chainId}:
get:
tags:
- swap
summary: generates a quote
operationId: quote
description: 'By passing in the appropriate options, you can generate a swap quote
'
parameters:
- $ref: '#/components/parameters/chainId'
- $ref: '#/components/parameters/referrer'
- $ref: '#/components/parameters/tokenIn'
- $ref: '#/components/parameters/tokenOut'
- $ref: '#/components/parameters/amount'
- $ref: '#/components/parameters/fee'
- $ref: '#/components/parameters/feeBy'
- $ref: '#/components/parameters/maxPriceImpact'
- $ref: '#/components/parameters/maxSlippage'
- $ref: '#/components/parameters/onlyDEX'
- $ref: '#/components/parameters/onlyPools'
- $ref: '#/components/parameters/excludeDEX'
- $ref: '#/components/parameters/excludePools'
- $ref: '#/components/parameters/excludeTokens'
- $ref: '#/components/parameters/visualize'
responses:
'200':
description: quote
content:
application/json:
schema:
type: object
example:
status: Success
tokens:
- address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'
symbol: ETH
name: Ether
decimals: 18
- address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
symbol: WETH
name: Wrapped Ether
decimals: 18
- address: '0x6B3595068778DD592e39A122f4f5a5cF09C90fE2'
symbol: SUSHI
name: SushiToken
decimals: 18
tokenFrom: 0
tokenTo: 2
swapPrice: 2837.6709246572527
priceImpact: -0.002204113661183449
amountIn: '10000000000000000'
assumedAmountOut: '28376709246572527616'
'422':
description: request parameters invalid
'500':
description: internal server error
'529':
description: server overloaded
/swap/v7/{chainId}:
get:
tags:
- swap
summary: generates a swap
operationId: swap
description: 'By passing in the appropriate options, you can generate a swap transaction
'
parameters:
- $ref: '#/components/parameters/chainId'
- $ref: '#/components/parameters/referrer'
- $ref: '#/components/parameters/tokenIn'
- $ref: '#/components/parameters/tokenOut'
- $ref: '#/components/parameters/sender'
- $ref: '#/components/parameters/recipient'
- $ref: '#/components/parameters/amount'
- $ref: '#/components/parameters/fee'
- $ref: '#/components/parameters/feeReceiver'
- $ref: '#/components/parameters/feeBy'
- $ref: '#/components/parameters/maxPriceImpact'
- $ref: '#/components/parameters/maxSlippage'
- $ref: '#/components/parameters/source'
- $ref: '#/components/parameters/onlyDEX'
- $ref: '#/components/parameters/onlyPools'
- $ref: '#/components/parameters/excludeDEX'
- $ref: '#/components/parameters/excludePools'
- $ref: '#/components/parameters/excludeTokens'
- $ref: '#/components/parameters/visualize'
- $ref: '#/components/parameters/simulate'
- $ref: '#/components/parameters/override'
- $ref: '#/components/parameters/validate'
responses:
'200':
description: route data
content:
application/json:
schema:
type: object
example:
status: Success
tokens:
- address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'
symbol: ETH
name: Ether
decimals: 18
- address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
symbol: WETH
name: Wrapped Ether
decimals: 18
- address: '0x6B3595068778DD592e39A122f4f5a5cF09C90fE2'
symbol: SUSHI
name: SushiToken
decimals: 18
tokenFrom: 0
tokenTo: 2
swapPrice: 2837.6709246572527
priceImpact: -0.002204113661183449
amountIn: '10000000000000000'
assumedAmountOut: '28376709246572527616'
tx:
from: 1238012972454248237435767387143779415173800484933
to: 983650862853667867234262850991893690166250310517
gas: '162561'
gasPrice: 682394289
data: '0x5f3bd1c8000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa960450000000000000000000000006b3595068778dd592e39a122f4f5a5cf09c90fe20000000000000000000000000000000000000000000000018969823f2df6281000000000000000000000000085cd07ea01423b1e937929b44e4ad8c40bbb5e7100000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001a4dd9c5f96000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000000000000000000000000000002386f26fc100000000000000000000000000006b3595068778dd592e39a122f4f5a5cf09c90fe200000000000000000000000000000000000000000000000189ce52b6a87f80000000000000000000000000000000000000000000000000018969823f2df62810000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa960450000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700301ffff0201CE84867c3c02B05dc570d0135103d3fB9CC19433C02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc204C02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc200CE84867c3c02B05dc570d0135103d3fB9CC194330085CD07Ea01423b1E937929B44E4Ad8c40BbB5E71000bb80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
value: '10000000000000000'
'422':
description: request parameters invalid
'500':
description: internal server error
'529':
description: server overloaded
components:
parameters:
onlyDEX:
in: query
name: onlyDEX
description: a list of DEX names separated by comma. If exists in the request then only pools from these DEXes are used in the response route. List of all supported DEXes can be obtained with /liquidity-provider request
required: false
schema:
type: string
tokenOut:
in: query
name: tokenOut
description: output token address
required: true
schema:
type: string
excludePools:
in: query
name: excludePools
description: a list of pools addresses separated by comma. If exists in the request then these pools are excluded in the response route
required: false
schema:
type: string
recipient:
in: query
name: recipient
description: recipient of tokens, defaults to sender
required: false
schema:
type: string
excludeTokens:
in: query
name: excludeTokens
description: a list of token addresses separated by comma. If exists in the request then pools with these tokens are excluded in the response route
required: false
schema:
type: string
feeReceiver:
in: query
name: feeReceiver
description: if fee > 0 then receiver of the fee
required: false
schema:
type: string
excludeDEX:
in: query
name: excludeDEX
description: a list of DEX names separated by comma. If exists in the request then pools from these DEXes are excluded in the response route. List of all supported DEXes can be obtained with /liquidity-provider request
required: false
schema:
type: string
fee:
in: query
name: fee
description: amount of the fee, for example 0.0025 (0.25%)
required: false
schema:
type: number
minimum: 0
maximum: 0.5
default: 0
visualize:
in: query
name: visualize
description: vizulaization
required: false
schema:
type: boolean
default: false
amount:
in: query
name: amount
description: input token amount
required: true
schema:
type: integer
format: int256
minimum: 1
maxSlippage:
in: query
name: maxSlippage
description: the max slippage for route execution, for example 0.005 (0.5%)
required: false
schema:
type: number
minimum: 0
default: 0.005
exclusiveMaximum: 1
simulate:
in: query
name: simulate
description: simulate
required: false
schema:
type: boolean
default: false
feeBy:
in: query
name: feeBy
description: if fee > 0 then which token to take fee from input or output
required: false
schema:
type: string
enum:
- input
- output
default: output
sender:
in: query
name: sender
description: sender of transaction
required: true
schema:
type: string
onlyPools:
in: query
name: onlyPools
description: a list of pools addresses separated by comma. If exists in the request then only these pools are used in the response route
required: false
schema:
type: string
tokenIn:
in: query
name: tokenIn
description: input token address
required: true
schema:
type: string
override:
in: query
name: override
description: uses state overrides to ensure simulation doesn't fail from sender not having balance and allowance
required: false
schema:
type: boolean
default: false
referrer:
in: query
name: referrer
description: referrer
required: false
schema:
type: string
default: none
maxPriceImpact:
in: query
name: maxPriceImpact
description: the max price impact for route planning. It's better to set it to a reasonable value, for example 1 (100%)
required: false
schema:
type: number
maximum: 1
default: 1
exclusiveMinimum: 0
chainId:
in: path
name: chainId
description: chainId
required: true
schema:
type: number
source:
in: query
name: source
description: the source of router liquidity
required: false
schema:
type: string
enum:
- sender
- self
default: sender
validate:
in: query
name: validate
description: validate sender has balance & allowance of token if simulation fails
required: false
schema:
type: boolean
default: false