Skip to main content
Glama
matteoantoci

MCP Bitpanda Server

list_fiat_transactions

Retrieve and manage paginated fiat transaction records from Bitpanda, filtering by type and status. Use cursor-based pagination to fetch transactions efficiently.

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
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
statusNopending, processing, finished, canceled
typeNobuy, sell, deposit, withdrawal, transfer, refund

Implementation Reference

  • The handler function that executes the tool logic by querying the Bitpanda API for fiat transactions based on input parameters.
    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 schema defining the input parameters for the list_fiat_transactions tool (type, status, cursor, 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 export that registers the tool's metadata, schema, and handler reference.
    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, };
  • MCP server registration function that dynamically registers all tools, including list_fiat_transactions, by calling server.tool() on 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); } }); };
  • Import and inclusion of the list_fiat_transactions tool in the tools array used for registration.
    import { listFiatTransactionsTool } from './fiatTransactions.js'; // Import the listFiatTransactionsTool import { listCryptoWalletsTool } from './cryptoWallets.js'; // Import the listCryptoWalletsTool import { listCryptoTransactionsTool } from './cryptoTransactions.js'; // Import the listCryptoTransactionsTool import { listCommodityTransactionsTool } from './commodity.js'; // Import the listCommodityTransactionsTool import { assetInfoTool } from './assetInfo.js'; // Import the assetInfoTool // import { ohlcTool } from './ohlc.js'; // Import the ohlcTool // Placeholder type for tool definition, similar to mcp-indicators type BitpandaToolDefinition = { name: string; description: string; // Expecting the raw shape object for Zod validation inputSchemaShape: z.ZodRawShape; // eslint-disable-next-line @typescript-eslint/no-explicit-any handler: (input: any) => Promise<any>; }; // Define the list of tools (will be populated later by importing from individual files) 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

Other Tools

Related Tools

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