balance_history
View balance transaction history to track deposits, purchases, refunds, and other balance changes on the402.ai marketplace.
Instructions
View your balance transaction history on the402.ai. Shows deposits, purchases, refunds, and other balance changes. Requires API key.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Results per page (default: 20) | |
| offset | No | Pagination offset |
Implementation Reference
- src/tools/balance.ts:20-39 (handler)The handler logic for the 'balance_history' tool, which fetches transaction history from the the402.ai API using the client.authGet method.
server.tool( "balance_history", "View your balance transaction history on the402.ai. Shows deposits, purchases, refunds, and other balance changes. Requires API key.", { limit: z.number().optional().describe("Results per page (default: 20)"), offset: z.number().optional().describe("Pagination offset"), }, async ({ limit, offset }) => { const params: Record<string, string> = {}; if (limit !== undefined) params.limit = String(limit); if (offset !== undefined) params.offset = String(offset); const result = await client.authGet("/v1/balance/history", params); return { content: [ { type: "text" as const, text: JSON.stringify(result, null, 2) }, ], }; } );