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
Name | Required | Description | Default |
---|---|---|---|
exchange | No | The factory name or address of the token exchange | |
to_block | No | The block number to get the reserves from | |
to_date | No | Get 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_address | No | The token0 address | |
token1_address | No | The token1 address |