Skip to main content

Get DEX token pair reserves

GEThttps://deep-index.moralis.io/api/v2/:pair_address/reserves

Get the liquidity reserves for a given pair address. Only Uniswap V2 based exchanges supported at the moment.

PATH PARAMS
pair_addressstringrequired
The liquidity pair address
QUERY PARAMS
chainstring
The chain to query
to_blockstring
The block number to get the reserves from
to_datestring

Get the reserves up to this date (any format that is accepted by momentjs)

  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used.
Responses
API KEY
import Moralis  from 'moralis';
import { EvmChain } from '@moralisweb3/evm-utils';

try {
const chain = EvmChain.ETHEREUM;

// Pair Token address
const pairAddress = '0x1234567890123456789012345678901234567890';

await Moralis.start({
apiKey: 'YOUR_API_KEY',
// ...and any other configuration
});

const response = await Moralis.EvmApi.defi.getPairReserves({
pairAddress,
chain,
});

console.log(response?.result);
} catch (e) {
console.error(e);
}

Response Example
Empty