Skip to main content
Glama

Binance MCP Server

getNFTWithdrawHistory.ts2.58 kB
// src/tools/binance-nft/nft-api/getNFTWithdrawHistory.ts import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { nftClient } from "../../../config/binanceClient.js"; import { z } from "zod"; export function registerBinanceGetNFTWithdrawHistory(server: McpServer) { server.tool( "BinanceGetNFTWithdrawHistory", "Retrieves NFT withdraw history, including network, transaction ID, contract address, token ID, withdrawal fee, fee asset, and timestamps.", { startTime: z.number().int().optional().describe("Start time in milliseconds"), endTime: z.number().int().optional().describe("End time in milliseconds"), limit: z .number() .int() .max(50, "Limit cannot be greater than 50") .default(50) .describe("Number of records to return, default 50, max 50"), page: z.number().int().default(1).describe("Page number, default is 1"), recvWindow: z.number().int().optional().describe("Optional time window for request validity") }, async (params) => { try { const response = await nftClient.restAPI.getNFTWithdrawHistory({ ...(params.startTime && { startTime: params.startTime }), ...(params.endTime && { endTime: params.endTime }), ...(params.limit && { limit: params.limit }), ...(params.page && { page: params.page }), ...(params.recvWindow && { recvWindow: params.recvWindow }) }); const data = await response.data(); return { content: [ { type: "text", text: `Successfully retrieved NFT withdraw history, including network, transaction ID, contract address. Response: ${JSON.stringify( data )}` } ] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [ { type: "text", text: `Failed to retrieve NFT withdraw history: ${errorMessage}` } ], isError: true }; } } ); }

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/TermiX-official/binance-mcp'

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