SDK

OpenOcean SDK Overview

The OpenOcean SDK provides a type-safe, modular interface for integrating DEX aggregation into your applications.

GitHub: openocean-api

Key Features

  • Multi-chain support — Connect to 40+ chains including Ethereum, BSC, Polygon, Avalanche, and more
  • Best price routing — Access OpenOcean's intelligent routing engine for optimal swap rates
  • Wallet integration — Built-in support for MetaMask, TrustWallet, Coin98, and other popular wallets
  • Type-safe API — Full TypeScript support with comprehensive type definitions
  • Modular design — Use only the features you need: API calls, swap execution, or wallet management

SDK Modules

The SDK exposes three main modules:

api

REST API wrapper for quotes, token lists, gas prices, and balances.

swapSdk

Transaction building and execution: connect wallet, approve tokens, and swap.

config

Chain and wallet configurations, including supported networks and wallet providers.

Typical Workflow

  1. Choose a chain (e.g., BSC, Ethereum, Polygon)
  2. Connect your wallet
  3. Select the token pair
  4. Input the amount you want to trade
  5. Get a quote and execute the swap

Next Steps