Moralis MCP Server

Official
by MoralisWeb3

getPairPrice

Retrieve the price of a token pair on Uniswap V2-based exchanges. Specify token addresses, exchange details, and block or date for precise price data.

Instructions

Get the price of a given token pair. Only Uniswap V2 based exchanges supported at the moment.

Input Schema

NameRequiredDescriptionDefault
exchangeNoThe factory name or address of the token exchange
to_blockNoThe block number to get the reserves from
to_dateNoGet the price up to this date (format in seconds or datestring accepted by momentjs) * Provide the param 'to_block' or 'to_date' * If 'to_date' and 'to_block' are provided, 'to_block' will be used.
token0_addressNoThe token0 address
token1_addressNoThe token1 address

Input Schema (JSON Schema)

{ "properties": { "exchange": { "description": "The factory name or address of the token exchange", "type": "string" }, "to_block": { "description": "The block number to get the reserves from", "type": "string" }, "to_date": { "description": "Get the price up to this date (format in seconds or datestring accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", "type": "string" }, "token0_address": { "description": "The token0 address", "type": "string" }, "token1_address": { "description": "The token1 address", "type": "string" } }, "type": "object" }

You must be authenticated.

Other Tools from Moralis MCP Server

Related Tools

ID: paxjr6tzn8