币安比特币数据
STDIO用于获取币安比特币实时数据的工具
用于获取币安比特币实时数据的工具
This project provides a Model Context Protocol (MCP) tool for fetching Bitcoin price data from Binance. It allows large language models to access real-time and historical Bitcoin market data through a standardized interface.
# Clone the repository git clone https://github.com/yourusername/binance-mcp.git cd binance-mcp # Install dependencies pnpm install # Build the project pnpm build
To use this tool with an MCP-compatible LLM client:
# Start the MCP server pnpm start
Then connect your MCP-compatible LLM client to interact with the Binance data.
get_bitcoin_ticker - Get current Bitcoin ticker data
symbol
(optional, default: "BTCUSDT") - Trading pair symbolget_bitcoin_order_book - Get current best bid and ask prices
symbol
(optional, default: "BTCUSDT") - Trading pair symbolget_bitcoin_recent_trades - Get recent trades
symbol
(optional, default: "BTCUSDT") - Trading pair symbollimit
(optional, default: 10) - Number of trades to fetchget_bitcoin_price_history - Get historical kline/candlestick data
symbol
(optional, default: "BTCUSDT") - Trading pair symbolinterval
(optional, default: "1h") - Kline interval (1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M)limit
(optional, default: 24) - Number of candles to fetchget_realtime_bitcoin_price - Get real-time price updates
symbol
(optional, default: "btcusdt") - Trading pair symbol in lowercaseduration
(optional, default: 5, max: 30) - Duration in seconds to collect real-time dataOnce connected to an MCP-compatible LLM, you can use prompts like:
To make changes to the project:
src
directorypnpm build
to compile the TypeScript codepnpm start
This tool is provided for educational and informational purposes only. It is not financial advice.