CasinoGames 发表于 2025-10-31 23:08:12

Search code, repositories, users, issues, pull requests... (2)



This MCP Server provides a robust interface for Binance trading operations, supporting both spot and USDⓈ-M futures trading.


中文说明




Configure and store Binance API credentials securely
Execute spot trading operations (LIMIT/MARKET orders)
Execute futures trading operations with advanced order types (STOP, TAKE_PROFIT, etc.)
Manage futures positions and leverage
Monitor account balances for both spot and futures
Track and manage open orders across markets
Access real-time funding rates
Cancel existing orders




Securely store your Binance API credentials:




Create LIMIT or MARKET orders:




Cancel an existing order:




Check your account balances:




List all open orders:




Create futures orders with advanced types:




Set leverage for a futures symbol:




Get all futures positions:




Get futures account information:




Get funding rate for a futures symbol:




Never commit your API keys to version control
Use environment variables or secure key storage
Restrict API key permissions to only required operations
Regularly rotate your API keys



Respect Binance API rate limits
Default rate limits for spot trading:

1200 requests per minute for order operations
100 requests per second for market data


Default rate limits for futures trading:

2400 requests per minute for order operations
200 requests per second for market data


Implement proper error handling for rate limit errors
Use exponential backoff for rate limit handling



Common error scenarios:


Invalid API credentials (ApiKeyError)
Insufficient balance or margin (InsufficientMarginError)
Invalid order parameters (OrderValidationError)
Invalid position mode (InvalidPositionModeError)
Rate limit exceeded
Network connectivity issues (BinanceClientError)


Example error handling:






Set up environment variables:


createfile in the root directory, and set your Binance API credentials:


BINANCE_API_KEY=your_api_key_here
BINANCE_API_SECRET=your_secret_key_here

Install dependencies:



Build the server:



For development with auto-rebuild:




Clone the repository
Install dependencies:



Configure your Binance API credentials in
Build and start the server:




The Inspector will provide a URL to access debugging tools in your browser.

页: [1]
查看完整版本: Search code, repositories, users, issues, pull requests... (2)