get_pool_reserves
Retrieve liquidity reserves for a token across all DEX pools on Base to analyze arbitrage opportunities and price gaps.
Instructions
Get reserves/liquidity for a token across all known DEX pools on Base.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token_address | Yes | Token contract address on Base |
Implementation Reference
- src/index.ts:637-678 (handler)The handler function for the `get_pool_reserves` tool, which fetches pool liquidity information for a given token address.
// Tool 2: get_pool_reserves server.tool( "get_pool_reserves", "Get reserves/liquidity for a token across all known DEX pools on Base.", { token_address: z.string().describe("Token contract address on Base"), }, async ({ token_address }) => { try { const symbol = await getSymbol(token_address); const pools = await getAllPools(token_address); return { content: [ { type: "text" as const, text: JSON.stringify( { token: token_address, symbol, poolsFound: pools.length, pools, }, null, 2 ), }, ], }; } catch (e) { return { content: [ { type: "text" as const, text: `Error fetching pools: ${e instanceof Error ? e.message : String(e)}`, }, ], isError: true, }; } } );