madeonsol_wallet_tracker_trades
Retrieve historical swap and transfer events from tracked Solana wallets. Filter by wallet, action type, event type, and paginate results.
Instructions
Historical swap and transfer events for all your watched wallets. BASIC: truncated wallets, no tx_signature.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet | No | Filter to a specific wallet address | |
| action | No | Filter by action type | |
| event_type | No | Filter by event type: swap (token trade) or transfer (SOL moved) | |
| limit | No | Max results (1–200) | |
| before | No | Pagination cursor: block_time of the last event from previous page |
Implementation Reference
- src/index.ts:397-421 (handler)The tool handler for 'madeonsol_wallet_tracker_trades'. It registers via server.tool with a Zod schema for parameters (wallet, action, event_type, limit, before) and implements the async handler that constructs a URL to /api/v1/wallet-tracker/trades, attaches query params, fetches with API key auth, and returns JSON results. Gated behind authMode === 'madeonsol'.
server.tool( "madeonsol_wallet_tracker_trades", "Historical swap and transfer events for all your watched wallets. BASIC: truncated wallets, no tx_signature.", { wallet: z.string().optional().describe("Filter to a specific wallet address"), action: z.enum(["buy", "sell", "transfer_in", "transfer_out"]).optional().describe("Filter by action type"), event_type: z.enum(["swap", "transfer"]).optional().describe("Filter by event type: swap (token trade) or transfer (SOL moved)"), limit: z.number().min(1).max(200).default(50).describe("Max results (1–200)"), before: z.number().optional().describe("Pagination cursor: block_time of the last event from previous page"), }, { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, async ({ wallet, action, event_type, limit, before }) => { const params: Record<string, string | number> = { limit }; if (wallet) params.wallet = wallet; if (action) params.action = action; if (event_type) params.event_type = event_type; if (before !== undefined) params.before = before; const url = new URL(`${BASE_URL}/api/v1/wallet-tracker/trades`); for (const [k, v] of Object.entries(params)) url.searchParams.set(k, String(v)); const res = await fetch(url.toString(), { headers: { "Content-Type": "application/json", ...apiKeyHeaders() } }); const text = res.ok ? JSON.stringify(await res.json(), null, 2) : `Error ${res.status}: ${await res.text().catch(() => "")}`; return { content: [{ type: "text" as const, text }] }; } ); - src/index.ts:401-407 (schema)Input schema for madeonsol_wallet_tracker_trades using Zod: optional wallet (string), optional action (buy/sell/transfer_in/transfer_out), optional event_type (swap/transfer), limit (1-200, default 50), optional before (number pagination cursor).
{ wallet: z.string().optional().describe("Filter to a specific wallet address"), action: z.enum(["buy", "sell", "transfer_in", "transfer_out"]).optional().describe("Filter by action type"), event_type: z.enum(["swap", "transfer"]).optional().describe("Filter by event type: swap (token trade) or transfer (SOL moved)"), limit: z.number().min(1).max(200).default(50).describe("Max results (1–200)"), before: z.number().optional().describe("Pagination cursor: block_time of the last event from previous page"), }, - src/index.ts:398-421 (registration)Registration of the 'madeonsol_wallet_tracker_trades' tool via server.tool() within the Wallet Tracker tools section (line 343). Only registered if hasRestAuth (authMode === 'madeonsol') is true.
server.tool( "madeonsol_wallet_tracker_trades", "Historical swap and transfer events for all your watched wallets. BASIC: truncated wallets, no tx_signature.", { wallet: z.string().optional().describe("Filter to a specific wallet address"), action: z.enum(["buy", "sell", "transfer_in", "transfer_out"]).optional().describe("Filter by action type"), event_type: z.enum(["swap", "transfer"]).optional().describe("Filter by event type: swap (token trade) or transfer (SOL moved)"), limit: z.number().min(1).max(200).default(50).describe("Max results (1–200)"), before: z.number().optional().describe("Pagination cursor: block_time of the last event from previous page"), }, { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, async ({ wallet, action, event_type, limit, before }) => { const params: Record<string, string | number> = { limit }; if (wallet) params.wallet = wallet; if (action) params.action = action; if (event_type) params.event_type = event_type; if (before !== undefined) params.before = before; const url = new URL(`${BASE_URL}/api/v1/wallet-tracker/trades`); for (const [k, v] of Object.entries(params)) url.searchParams.set(k, String(v)); const res = await fetch(url.toString(), { headers: { "Content-Type": "application/json", ...apiKeyHeaders() } }); const text = res.ok ? JSON.stringify(await res.json(), null, 2) : `Error ${res.status}: ${await res.text().catch(() => "")}`; return { content: [{ type: "text" as const, text }] }; } ); - src/index.ts:346-358 (helper)The walletTrackerRequest helper function used by wallet tracker tools. It constructs an HTTP request to /api/v1/{path} with JSON content-type and Bearer auth headers.
async function walletTrackerRequest(method: string, path: string, body?: unknown): Promise<string> { const headers: Record<string, string> = { "Content-Type": "application/json", ...apiKeyHeaders() }; const res = await fetch(`${BASE_URL}/api/v1${path}`, { method, headers, ...(body ? { body: JSON.stringify(body) } : {}), }); if (!res.ok) { const text = await res.text().catch(() => ""); return `Error ${res.status}: ${text}`; } return JSON.stringify(await res.json(), null, 2); }