1inch Swap API

The Swap API from 1inch — 8 operation(s) for swap.

Operations 8

GET /swap/v6.0/{chain}/healthcheck Swap API health check #
GET /swap/v6.0/{chain}/quote Get a swap quote #
GET /swap/v6.0/{chain}/swap Build a swap transaction #
GET /swap/v6.0/{chain}/approve/spender Get aggregator spender address #
GET /swap/v6.0/{chain}/approve/transaction Build an approve transaction #
GET /swap/v6.0/{chain}/approve/allowance Get current token allowance #
GET /swap/v6.0/{chain}/liquidity-sources List supported liquidity sources (protocols) #
GET /swap/v6.0/{chain}/tokens List supported tokens for swapping #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/one-inch-swap-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

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 Specification

one-inch-swap-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: 1inch Developer Portal Swap API
  description: '1inch exposes a suite of REST APIs through its Developer / Business

    portal (https://business.1inch.com/portal/documentation/overview).

    This OpenAPI document covers the most commonly used products surfaced

    in the 1inch apis.yml profile: Swap (classic aggregation), Orderbook

    (limit orders), Balance, Spot Price, Token, Portfolio, and Gas Price.

    All endpoints are versioned under their own subpath on

    `https://api.1inch.dev` and authenticate with a Bearer token issued

    from the developer portal.'
  version: 1.0.0
  contact:
    name: 1inch
    url: https://business.1inch.com/portal/documentation/overview
servers:
- url: https://api.1inch.dev
  description: 1inch Developer API gateway
security:
- BearerAuth: []
tags:
- name: Swap
paths:
  /swap/v6.0/{chain}/healthcheck:
    get:
      tags:
      - Swap
      summary: Swap API health check
      parameters:
      - $ref: '#/components/parameters/Chain'
      responses:
        '200':
          description: API healthy
      operationId: getSwapV60ByChainHealthcheck
      x-operation-id-source: derived
  /swap/v6.0/{chain}/quote:
    get:
      tags:
      - Swap
      summary: Get a swap quote
      description: Returns the best aggregated quote for a token swap on the given EVM chain.
      parameters:
      - $ref: '#/components/parameters/Chain'
      - in: query
        name: src
        required: true
        schema:
          type: string
        description: Source token address
      - in: query
        name: dst
        required: true
        schema:
          type: string
        description: Destination token address
      - in: query
        name: amount
        required: true
        schema:
          type: string
        description: Source amount in minor units (wei)
      - in: query
        name: includeTokensInfo
        schema:
          type: boolean
      - in: query
        name: includeProtocols
        schema:
          type: boolean
      - in: query
        name: includeGas
        schema:
          type: boolean
      responses:
        '200':
          description: Quote
      operationId: getSwapV60ByChainQuote
      x-operation-id-source: derived
  /swap/v6.0/{chain}/swap:
    get:
      tags:
      - Swap
      summary: Build a swap transaction
      parameters:
      - $ref: '#/components/parameters/Chain'
      - in: query
        name: src
        required: true
        schema:
          type: string
      - in: query
        name: dst
        required: true
        schema:
          type: string
      - in: query
        name: amount
        required: true
        schema:
          type: string
      - in: query
        name: from
        required: true
        schema:
          type: string
        description: Wallet address that will execute the swap
      - in: query
        name: slippage
        required: true
        schema:
          type: number
        description: Slippage tolerance in percent (e.g. 1 = 1%)
      - in: query
        name: disableEstimate
        schema:
          type: boolean
      - in: query
        name: allowPartialFill
        schema:
          type: boolean
      responses:
        '200':
          description: Swap transaction calldata
      operationId: getSwapV60ByChainSwap
      x-operation-id-source: derived
  /swap/v6.0/{chain}/approve/spender:
    get:
      tags:
      - Swap
      summary: Get aggregator spender address
      parameters:
      - $ref: '#/components/parameters/Chain'
      responses:
        '200':
          description: Spender address
      operationId: getSwapV60ByChainApproveSpender
      x-operation-id-source: derived
  /swap/v6.0/{chain}/approve/transaction:
    get:
      tags:
      - Swap
      summary: Build an approve transaction
      parameters:
      - $ref: '#/components/parameters/Chain'
      - in: query
        name: tokenAddress
        required: true
        schema:
          type: string
      - in: query
        name: amount
        schema:
          type: string
      responses:
        '200':
          description: Approve transaction calldata
      operationId: getSwapV60ByChainApproveTransaction
      x-operation-id-source: derived
  /swap/v6.0/{chain}/approve/allowance:
    get:
      tags:
      - Swap
      summary: Get current token allowance
      parameters:
      - $ref: '#/components/parameters/Chain'
      - in: query
        name: tokenAddress
        required: true
        schema:
          type: string
      - in: query
        name: walletAddress
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Allowance amount
      operationId: getSwapV60ByChainApproveAllowance
      x-operation-id-source: derived
  /swap/v6.0/{chain}/liquidity-sources:
    get:
      tags:
      - Swap
      summary: List supported liquidity sources (protocols)
      parameters:
      - $ref: '#/components/parameters/Chain'
      responses:
        '200':
          description: Liquidity sources
      operationId: getSwapV60ByChainLiquiditySources
      x-operation-id-source: derived
  /swap/v6.0/{chain}/tokens:
    get:
      tags:
      - Swap
      summary: List supported tokens for swapping
      parameters:
      - $ref: '#/components/parameters/Chain'
      responses:
        '200':
          description: Tokens
      operationId: getSwapV60ByChainTokens
      x-operation-id-source: derived
components:
  parameters:
    Chain:
      in: path
      name: chain
      required: true
      schema:
        type: integer
      description: EVM chain ID (e.g. 1 for Ethereum, 137 for Polygon)
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'API key issued from https://portal.1inch.dev passed as

        `Authorization: Bearer <token>`.

        '