Moralis MCP Server

Official
by MoralisWeb3

getSwapsByPairAddress

Retrieve all swap-related transactions (buy, sell, add/remove liquidity) for a specific token pair address, with optional block range, date filters, and pagination support.

Instructions

Get all swap related transactions (buy, sell, add liquidity & remove liquidity)

Input Schema

NameRequiredDescriptionDefault
addressNoThe pair address token-transactions are to be retrieved for.
cursorNoThe cursor returned in the previous response (used for getting the next page).
fromBlockNoThe minimum block number from which to get the token transactions * Provide the param 'fromBlock' or 'fromDate' * If 'fromDate' and 'fromBlock' are provided, 'fromBlock' will be used.
fromDateNoThe start date from which to get the token transactions (format in seconds or datestring accepted by momentjs) * Provide the param 'fromBlock' or 'fromDate' * If 'fromDate' and 'fromBlock' are provided, 'fromBlock' will be used.
limitNoThe desired page size of the result.
toBlockNoThe block number to get the token transactions from
toDateNoThe end date from which to get the token transactions (format in seconds or datestring accepted by momentjs) * Provide the param 'toBlock' or 'toDate' * If 'toDate' and 'toBlock' are provided, 'toBlock' will be used.
transactionTypesNoArray of transaction types. Allowed values are 'buy', 'sell', 'addLiquidity', 'removeLiquidity'.

Input Schema (JSON Schema)

{ "properties": { "address": { "description": "The pair address token-transactions are to be retrieved for.", "type": "string" }, "cursor": { "description": "The cursor returned in the previous response (used for getting the next page).", "type": "string" }, "fromBlock": { "description": "The minimum block number from which to get the token transactions\n* Provide the param 'fromBlock' or 'fromDate'\n* If 'fromDate' and 'fromBlock' are provided, 'fromBlock' will be used.\n", "type": "integer" }, "fromDate": { "description": "The start date from which to get the token transactions (format in seconds or datestring accepted by momentjs)\n* Provide the param 'fromBlock' or 'fromDate'\n* If 'fromDate' and 'fromBlock' are provided, 'fromBlock' will be used.\n", "type": "string" }, "limit": { "description": "The desired page size of the result.", "type": "integer" }, "toBlock": { "description": "The block number to get the token transactions from", "type": "string" }, "toDate": { "description": "The end date from which to get the token transactions (format in seconds or datestring accepted by momentjs)\n* Provide the param 'toBlock' or 'toDate'\n* If 'toDate' and 'toBlock' are provided, 'toBlock' will be used.\n", "type": "string" }, "transactionTypes": { "description": "Array of transaction types. Allowed values are 'buy', 'sell', 'addLiquidity', 'removeLiquidity'.", "type": "string" } }, "type": "object" }

You must be authenticated.

Other Tools from Moralis MCP Server

Related Tools

ID: paxjr6tzn8