Skip to content

Quote API Introduction

The LiquidMesh Quote API is one of the two core product lines of the LiquidMesh DEX APIs, alongside the Flash API.

What is Quote API

The Quote API provides a standard and flexible way to perform on-chain token swaps across multiple blockchains and DEXes.
It consists of two main endpoints:

  • Quote API: Returns the best available price, route, and other trade details without executing the swap.
  • Swap API: Generates the executable transaction data (call data) for performing the swap on-chain.

This design allows developers to separate the quoting process from the transaction execution process, enabling greater flexibility for integration and customization.

Advantages

  • Flexibility: Separate quote and swap stages allow you to customize routes, perform additional logic, or revalidate before execution.
  • Multi-chain: Supports Ethereum, BNB Smart Chain, Base, Solana, Sonic, and more.
  • Multi-DEX aggregation: Integrates with leading DEX protocols such as Uniswap, PancakeSwap, SushiSwap, Raydium, Orca, and more.
  • Optimized routing: Aggregates liquidity across multiple hops and sources for the best execution price.
  • Built-in fee parameter: Easily enable revenue-sharing models for wallets, aggregators, and other apps.

Core Endpoints

1.Quote API

  • Method: GET /v1/{networkId}/quote
  • Description: Retrieves the optimal trade route, price, gas estimate, and other metadata.
  • Use case: When you only need to display the quote or store it before execution.

2.Swap API

  • Method: POST /v1/{networkId}/swap
  • Description: Generates the raw transaction data to execute the swap via the LiquidMesh router contract.
  • Use case: When you are ready to execute a trade on-chain.

Relationship to Flash API

The Flash API is a separate product line. Unlike the Quote API, it combines quoting and swap generation into a single request via the Order API.
- Faster: Only one API call is needed. - Easier to use: Directly returns transaction data without a separate quote stage.

Supported Chains & DEXes

Refer to the Supported Chains document for the full list of supported networks and DEX integrations.