Skip to main content
Glama

Binance MCP Server

vipLoanRepay.ts1.93 kB
// src/tools/binance-vip-loan/trade-api/vipLoanRepay.ts import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { vipLoanClient } from "../../../config/binanceClient.js"; import { z } from "zod"; export function registerBinanceVipLoanRepay(server: McpServer) { server.tool( "BinanceVipLoanRepay", "Allow VIP users to repay a specified amount of their active loan, partially or fully. It updates the remaining principal and interest, and provides the repayment status.", { orderId: z.number().int().describe("Order ID of the loan request"), amount: z.number().describe("Amount to be processed (decimal allowed)"), recvWindow: z.number().int().optional().describe("Optional time window for request validity") }, async (params) => { try { const response = await vipLoanClient.restAPI.vipLoanRepay({ orderId: params.orderId, amount: params.amount, ...(params.recvWindow && { recvWindow: params.recvWindow }) }); const data = await response.data(); return { content: [ { type: "text", text: `Successfully repay the active loan. Response: ${JSON.stringify(data)}` } ] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [ { type: "text", text: `Failed to repay the active loan. ${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