Moralis icon

Moralis

Interact with Moralis Web3 APIs for blockchain data, NFTs, tokens, and DeFi

DeFi → Get Pair Reserves

AI-generated

Overview

This node interacts with the Moralis Web3 API to retrieve liquidity pair reserves on a specified blockchain. It is useful for DeFi applications where users need to fetch real-time reserve data of token pairs from decentralized exchanges. For example, it can be used to monitor liquidity pools or analyze market depth on chains like Ethereum, Polygon, or BSC.

Use Case Examples

  1. Fetch liquidity pair reserves for a specific token address on the Ethereum blockchain to analyze pool liquidity.
  2. Retrieve reserves data on the Polygon chain to monitor DeFi pair status.

Properties

Name Meaning
Chain The blockchain network to query for pair reserves, such as Ethereum, BSC, Polygon, etc.
Additional Fields Optional parameters to customize the API request.

Output

JSON

  • operation - The operation performed, e.g., getPairReserves.
  • resource - The resource type, here it is 'defi'.
  • chain - The blockchain network queried.
  • timestamp - The timestamp when the data was fetched.
    - The JSON fields returned by the Moralis API containing the pair reserves data.

Dependencies

  • Requires an API key credential for Moralis Web3 API to authenticate requests.

Troubleshooting

  • Common issues include invalid or missing API key, resulting in authentication errors.
  • Incorrect or unsupported chain values may cause the API to return errors or no data.
  • If the token address is invalid or not found, the response may indicate no data found.
  • Network connectivity issues can cause request failures; ensure stable internet connection.

Links

Discussion