dex_changes
Retrieve recent DEX trade data changes since a specified timestamp to monitor on-chain trading activity.
Instructions
Get recent changes to DEX trade data since a given timestamp. Cost: $0.003 per query. Source: On-chain DEX analytics.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| since | Yes | ISO 8601 timestamp to get changes since (e.g. 2026-03-01T00:00:00Z) | |
| limit | No | Maximum results (default 50) |
Implementation Reference
- src/tools/dex.ts:247-273 (handler)The handler function for the `dex_changes` tool, which fetches DEX change data from the API and formats the response.
async ({ since, limit }) => { const res = await apiGet<DexQueryResponse>("/api/v1/dex/changes", { since, limit: limit ?? 50, }); if (!res.ok) { return { content: [ { type: "text" as const, text: `API error (${res.status}): ${JSON.stringify(res.data)}`, }, ], isError: true, }; } const { count, data } = res.data; const warn = stalenessWarning(res); const summary = `${warn}Found ${count} DEX change(s) since ${since}.`; const json = JSON.stringify(data, null, 2); return { content: [{ type: "text" as const, text: `${summary}\n\n${json}` }], }; }, - src/tools/dex.ts:229-246 (schema)Schema definition for the `dex_changes` tool, specifying input parameters and tool metadata.
{ title: "DEX Changes", description: "Get recent changes to DEX trade data since a given timestamp. " + "Cost: $0.003 per query. Source: On-chain DEX analytics.", inputSchema: { since: z .string() .describe("ISO 8601 timestamp to get changes since (e.g. 2026-03-01T00:00:00Z)"), limit: z .number() .int() .min(1) .max(100) .optional() .describe("Maximum results (default 50)"), }, }, - src/tools/dex.ts:227-228 (registration)Registration of the `dex_changes` tool within the MCP server.
server.registerTool( "dex_changes",