Skip to main content
The 1inch Fusion SDK provides a complete toolkit for interacting with Fusion Mode, enabling gasless, secure token swaps with MEV protection.

Package Installation

Install the SDK using your preferred package manager:
npm install @1inch/fusion-sdk@2

Peer Dependencies

The SDK has the following peer dependencies:
  • axios >= 1.0.0 (optional)
  • assert ^2.0.0 (optional)
The SDK also depends on:
  • ethers 6.16.0 (included as a direct dependency)
  • @1inch/limit-order-sdk 5.2.2 (included)

Supported Networks

The Fusion SDK supports the following blockchain networks:

Ethereum

Network ID: 1

BNB Chain

Network ID: 56

Polygon

Network ID: 137

Arbitrum

Network ID: 42161

Optimism

Network ID: 10

Avalanche

Network ID: 43114

zkSync

Network ID: 324

Base

Network ID: 8453

Basic Setup

Once installed, import the SDK and initialize it with your configuration:
import { FusionSDK, NetworkEnum } from '@1inch/fusion-sdk'

const sdk = new FusionSDK({
  url: 'https://api.1inch.dev/fusion',
  network: NetworkEnum.ETHEREUM,
  authKey: 'YOUR_DEV_PORTAL_API_TOKEN'
})

Configuration Parameters

The FusionSDK constructor accepts a configuration object with the following parameters:
ParameterTypeRequiredDescription
urlstringYesThe Fusion API endpoint URL
networkNetworkEnumYesThe blockchain network to use
authKeystringNoYour 1inch Dev Portal API token for authentication
blockchainProviderBlockchainProviderConnectorNoProvider for blockchain interactions (required for creating orders)
httpProviderHttpProviderConnectorNoCustom HTTP provider (defaults to axios)
Get your API token from the 1inch Developer Portal to access the Fusion API.

Next Steps

Quickstart

Create your first swap with Fusion Mode

SDK Reference

Explore all SDK methods and types

Build docs developers (and LLMs) love