get_transaction
Retrieve detailed information about a specific cryptocurrency transaction using its ID. This tool provides transaction details including amounts, with optional currency conversion and wallet context for multi-wallet sessions.
Instructions
Get details of a specific transaction by ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| transaction_id | Yes | Transaction ID to retrieve | |
| display_currency | No | Display currency for amount conversion (e.g. KRW, EUR). Defaults to server setting. | |
| wallet_id | No | Target wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet. |
Implementation Reference
- The handler function 'registerGetTransaction' defines the 'get_transaction' tool, sets up its input schema, and implements the logic by calling the API client to fetch transaction details.
export function registerGetTransaction(server: McpServer, apiClient: ApiClient, walletContext?: WalletContext): void { server.tool( 'get_transaction', withWalletPrefix('Get details of a specific transaction by ID.', walletContext?.walletName), { transaction_id: z.string().describe('Transaction ID to retrieve'), display_currency: z.string().optional().describe('Display currency for amount conversion (e.g. KRW, EUR). Defaults to server setting.'), wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.'), }, async (args) => { const params = new URLSearchParams(); if (args.display_currency) params.set('display_currency', args.display_currency); if (args.wallet_id) params.set('walletId', args.wallet_id); const qs = params.toString(); const result = await apiClient.get(`/v1/transactions/${args.transaction_id}${qs ? '?' + qs : ''}`); return toToolResult(result); }, ); }