Integration Guide

Guide for integrating LiquidCore swaps into your product.

Overview

LiquidCore offers two integration paths: the LiquidCore Router (on-chain, single address, automatic pool discovery) and a REST API (pools list, quotes, pool stats). Use the router so you don't need to update code when new pools are added. Both are built for aggregators, wallets, trading UIs, and other DeFi products on Hyperliquid.

Integration Options

REST API Integration

For aggregators, price comparison tools, analytics platforms. Base URL: https://api.liqd.ag/liquidcore

Endpoint
Description

GET /liquidcore/pools

List all pools with token pairs and metadata

GET /liquidcore/quote

Get swap quotes (single or comma-separated amountIn)

GET /liquidcore/pool/:address

Get pool stats (reserves, volume, fees, APR, etc.)

See API Endpoints for full request/response details.

Use the LiquidCore Router for swaps. Single entry point, automatic pool discovery—no need to look up or store pool addresses. When new LiquidCore pools are added, the router is updated and your integration keeps working.

Router address: 0x625aC1D165c776121A52ff158e76e3544B4a0b8B

  1. Approve the router for tokenIn.

  2. Call swap(tokenIn, tokenOut, amountIn, minAmountOut) on the router.

The quote API returns this router as executionAddress and the calldata for the swap. Router interface (getPools, getPoolForPair, swap, estimateSwap): API Reference.

Alternative: direct pool swaps

You can call a pool contract directly: approve the pool for tokenIn, then call swap(tokenIn, tokenOut, amountIn, minAmountOut) on the pool address. Pool addresses and full pool interface: Overview, API Reference. This works but requires updating your code when new pools are added; the router avoids that.

Key Details

  • REST API returns human-readable amounts

  • All pools support bidirectional trading

  • Include minAmountOut for slippage protection

Pool addresses and token details: Overview.

Last updated