Skip to main content
Glama
matteoantoci

MCP Bitpanda Server

list_fiat_transactions

Retrieve and manage your fiat currency transaction history from Bitpanda, including buys, sells, deposits, and withdrawals with paginated results.

Instructions

Lists all user's fiat transactions from the Bitpanda API. Newest fiat transactions come first. Response is cursor paginated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNobuy, sell, deposit, withdrawal, transfer, refund
statusNopending, processing, finished, canceled
cursorNoId of the last known fiat transaction by the client. Only fiat transactions after this id are returned. Empty or missing cursor parameter will return fiat transactions from the start.
page_sizeNoSize of a page for the paginated response

Implementation Reference

  • The main handler function for the 'list_fiat_transactions' tool. It constructs API parameters from input, makes a GET request to the Bitpanda fiat transactions endpoint using axios, and returns the paginated response or throws an error.
    const listFiatTransactionsHandler = async (input: Input): Promise<Output> => { try { const apiKey = getBitpandaApiKey(); const url = `${BITPANDA_API_BASE_URL}/fiatwallets/transactions`; const params: any = {}; // Use any for now, refine later if needed if (input.type) { params.type = input.type; } if (input.status) { params.status = input.status; } if (input.cursor) { params.cursor = input.cursor; } if (input.page_size) { params.page_size = input.page_size; } const response = await axios.get<Output>(url, { headers: { 'X-Api-Key': apiKey, 'Content-Type': 'application/json', }, params, }); // Return the data received from the Bitpanda API return response.data; } catch (error: unknown) { console.error('Error fetching Bitpanda fiat transactions:', error); const message = error instanceof Error ? error.message : 'An unknown error occurred while fetching fiat transactions.'; // Re-throwing the error to be handled by the MCP server framework throw new Error(`Failed to fetch Bitpanda fiat transactions: ${message}`); } };
  • Zod-based input schema shape for validating the tool's parameters: type (transaction type), status, cursor (pagination), and page_size.
    const listFiatTransactionsInputSchemaShape = { type: z .enum(['buy', 'sell', 'deposit', 'withdrawal', 'transfer', 'refund']) .optional() .describe('buy, sell, deposit, withdrawal, transfer, refund'), status: z .enum(['pending', 'processing', 'finished', 'canceled']) .optional() .describe('pending, processing, finished, canceled'), cursor: z .string() .optional() .describe( 'Id of the last known fiat transaction by the client. Only fiat transactions after this id are returned. Empty or missing cursor parameter will return fiat transactions from the start.' ), page_size: z.number().int().positive().optional().describe('Size of a page for the paginated response'), };
  • Tool definition object exporting the name, description, input schema, and handler for registration.
    export const listFiatTransactionsTool: BitpandaToolDefinition = { name: 'list_fiat_transactions', description: "Lists all user's fiat transactions from the Bitpanda API. Newest fiat transactions come first. Response is cursor paginated.", inputSchemaShape: listFiatTransactionsInputSchemaShape, handler: listFiatTransactionsHandler, };
  • Array of all tool definitions, including listFiatTransactionsTool, used for batch registration.
    const bitpandaToolDefinitions: BitpandaToolDefinition[] = [ listTradesTool, // Add the listTradesTool to the array listAssetWalletsTool, // Add the listAssetWalletsTool to the array listFiatWalletsTool, // Add the listFiatWalletsTool to the array listFiatTransactionsTool, // Add the listFiatTransactionsTool to the array listCryptoWalletsTool, // Add the listCryptoWalletsTool to the array listCryptoTransactionsTool, // Add the listCryptoTransactionsTool to the array listCommodityTransactionsTool, // Add the listCommodityTransactionsTool to the array assetInfoTool, // Add the assetInfoTool to the array // ohlcTool, // Add the ohlcTool to the array // Other tools will be added here as they are implemented ];
  • Function that registers all Bitpanda tools (including list_fiat_transactions) to the MCP server instance by calling server.tool() for each.
    export const registerBitpandaTools = (server: McpServer): void => { bitpandaToolDefinitions.forEach((toolDef) => { try { // Pass the raw shape to the inputSchema parameter, assuming SDK handles z.object() server.tool(toolDef.name, toolDef.description, toolDef.inputSchemaShape, async (input) => { const result = await toolDef.handler(input); // Assuming the handler returns the data directly, wrap it in the MCP content format return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; }); console.log(`Registered Bitpanda tool: ${toolDef.name}`); } catch (error) { console.error(`Failed to register tool ${toolDef.name}:`, error); } }); };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/matteoantoci/mcp-bitpanda'

If you have feedback or need assistance with the MCP directory API, please join our Discord server