Hydrex

Hydrex SDK Docs

TypeScript SDK for the Hydrex concentrated-liquidity AMM on Base — swap tokens, manage positions, stake, and more.

Installation

$npm install @hydrexfi/hydrex-sdk
#or: yarn add @hydrexfi/hydrex-sdk

Quick Start

Build a swap in minutes.

typescriptFull guide →
import {
  Token,
  Pool,
  Route,
  Trade,
  TradeType,
  SwapRouter,
  ChainId,
  WNATIVE,
  Percent,
  CurrencyAmount,
} from '@hydrexfi/hydrex-sdk';

const USDC = new Token(ChainId.Base, '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', 6, 'USDC');
const WETH = WNATIVE[ChainId.Base];

const route = new Route([pool], USDC, WETH);
const trade = Trade.createUncheckedTrade({
  route,
  inputAmount: CurrencyAmount.fromRawAmount(USDC, '1000000'), // 1 USDC
  outputAmount: CurrencyAmount.fromRawAmount(WETH, estimatedOut),
  tradeType: TradeType.EXACT_INPUT,
});

const { calldata, value } = SwapRouter.swapCallParameters(trade, {
  slippageTolerance: new Percent(50, 10_000),
  recipient: '0xYourWallet',
  deadline: Math.floor(Date.now() / 1000) + 1200,
});

Supported Networks

NetworkChain IDStatus
Base8453Mainnet
Base Sepolia84532Testnet

Hydrex

Hydrex is an Omni-Liquidity MetaDEX built on Base for Base, designed to bring new users onchain.

Paragraph

© 2026 Hydrex. All rights reserved.