目录 / coinex_mcp_server
coinex_mcp_server
# CoinEx MCP Server A Model Context Protocol (MCP) server that enables AI agents to interact seamlessly with the CoinEx cryptocurrency exchange. This server provides comprehensive access to market data, trading operations, and account management through a standardized MCP interface. ## Key Features - **Market Data Access**: Retrieve real-time tickers, order books, K-lines, and recent trades for both spot and futures markets - **Futures Analytics**: Access funding rates, premium indices, basis history, position tiers, and liquidation data - **Account Management**: Query account balances and manage trading positions - **Order Operations**: Place, cancel, and track orders with full history access - **Flexible Deployment**: Supports multiple transport protocols (stdio, HTTP, SSE) for various integration scenarios ## Quick Start ### Installation via http (Recommended) just add this url `https://mcp.coinex.com/mcp` to your mcp configuration in agent. for example, use this command to add it to your claude code: ``` claude mcp add --transport http coinex-mcp-server https://mcp.coinex.com/mcp ``` ### Installation via uvx (Support get balance / place order by API key) Configure your MCP client (e.g., Claude Desktop) with the following JSON: ```json { "mcpServers": { "coinex": { "command": "uvx", "args": ["coinex-mcp-server"], "env": { "COINEX_ACCESS_ID": "your_access_id_here", "COINEX_SECRET_KEY": "your_secret_key_here" } } } } ``` ### HTTP Mode Deployment by source code * install `pip install coinex-mcp-server` * start the server in HTTP mode: ```bash python -m coinex_mcp_server.main --transport http --host 127.0.0.1 --port 8000 --path /mcp --enable-http-auth ``` Pass credentials via HTTP headers: - `X-CoinEx-Access-Id: <your_access_id>` - `X-CoinEx-Secret-Key: <your_secret_key>` ## Usage Examples - **Get Market Tickers**: `list_markets(market_type="spot")` or `get_tickers(symbol="BTCUSDT")` - **Query Order Book**: `get_orderbook(symbol="BTCUSDT", limit=20)` - **Check Account Balance**: `get_account_balance()` - **Place Order**: `place_order(symbol="BTCUSDT", side="buy", type="limit", amount="0.01", price="50000")` ## Security Notes ⚠️ **Important**: - Never expose HTTP authentication in public services - Deploy with HTTPS/TLS in production environments
接入信息
- 传输形态
- http
- 鉴权方式
- 鉴权未知
- 端点
https://coinex_mcp_server--helix-song.run.tools
{
"mcpServers": {
"coinex_mcp_server": {
"url": "https://coinex_mcp_server--helix-song.run.tools"
}
}
}
能力清单
| 工具 | 说明 |
|---|---|
| get_ticker | Get trading pair's recent price, 24h price and volume information (spot). Parameters: - base: Optional, base currency like "BTC", "ETH". When not provided, returns top 5 entries. - quote: Optional, quote currency, default "USDT". Returns: {code, message, data}; when base is not provided, only returns top 5 items. |
| get_orderbook | Get order book (depth) information (supports spot/futures). Parameters: - base: Required, base currency. Example: "BTC", "ETH". - quote: Optional, quote currency, default "USDT". - limit: Optional, number of price levels to return, default 20; valid values: [5, 10, 20, 50]. - market_type: Optional, market type, default "spot"; valid values: "spot" | "futures". - interval: Optional, merge granularity, default "0"; valid values include "0", "0.00000001", ..., "1", "10", "100", "1000" (according to official documentation). Returns: {code, message, data}. |
| get_kline | Get K-line data (supports spot/futures). Parameters: - base: Required, base currency. Example: "BTC", "ETH". - quote: Optional, quote currency, default "USDT". - period: Optional, K-line period, default "1hour"; - Spot/futures common period whitelist: "1min","5min","15min","30min","1hour","4hour","1day","1week". - limit: Optional, number of records, default 100. - market_type: Optional, market type, default "spot"; options: "spot" | "futures". Error: When period is not in whitelist, returns {code:-1, message:"Unsupported time period"}. Returns: {code, message, data}. |
| list_markets | List market status (spot/futures). Parameters: - market_type: Optional, default "spot"; options: "spot" | "futures". - base: Optional, base currency to filter. - quote: Optional, quote currency, default "USDT". Returns: {code, message, data} (list). |
| get_deals | Get recent trades (deals). Parameters: - base: Required, base currency. - quote: Optional, quote currency, default "USDT". - market_type: Optional, default "spot"; options: "spot" | "futures". - limit: Optional, return quantity, default 100, max 1000 (per official documentation). Returns: {code, message, data} (list). |
| get_index_price | Get market index price (spot/futures). Supports batch; returns top N entries when base not provided. Parameters: - market_type: Optional, default "spot"; options: "spot" | "futures". - base: Optional, base currency; returns multi-market index when not provided. - quote: Optional, quote currency, default "USDT". - top_n: Optional, only effective when base not provided; default 5. Returns: {code, message, data}. |
| get_funding_rate | Get current funding rate (futures only). Parameters: - base: Required, futures base currency, e.g. "BTC", "ETH". - quote: Optional, quote currency, default "USDT". Returns: {code, message, data}. |
| get_funding_rate_history | Get funding rate history (futures only). Parameters: - base: Required, futures base currency. - quote: Optional, quote currency, default "USDT". - start_time: Optional, start timestamp (milliseconds). - end_time: Optional, end timestamp (milliseconds). - page: Optional, default 1. - limit: Optional, default 100. Returns: {code, message, data}. |
| get_premium_index_history | Get premium index history (futures only). Parameters: - base: Required, futures base currency. - quote: Optional, quote currency, default "USDT". - start_time: Optional, start timestamp (milliseconds). - end_time: Optional, end timestamp (milliseconds). - page: Optional, default 1. - limit: Optional, default 100. Returns: {code, message, data}. |
| get_basis_history | Get basis history (futures only). Parameters: - base: Required, futures base currency. - quote: Optional, quote currency, default "USDT". - start_time: Optional, start timestamp (milliseconds). - end_time: Optional, end timestamp (milliseconds). - page: Optional, placeholder parameter (currently unused by client). - limit: Optional, placeholder parameter (currently unused by client). Returns: {code, message, data}. |
| get_margin_tiers | Get margin tiers/ position levels (futures only). Parameters: - base: Required, futures base currency. - quote: Optional, quote currency, default "USDT". Returns: {code, message, data}. |
| get_liquidation_history | Get liquidation history (futures only). Parameters: - base: Required, futures base currency. - quote: Optional, quote currency, default "USDT". - start_time: Optional, start timestamp (milliseconds). - end_time: Optional, end timestamp (milliseconds). - page: Optional, page number, default 1. - limit: Optional, number of records, default 100. Returns: {code, message, data}. |
提交举报 / 纠错
侵权举报经核验成立后,我们会即时下线该条目并删除已存的内容副本。