coinex_mcp_server
CoinEx MCP Server A Model Context Protocol (MCP) server that enables AI agents to interact seamlessly with the CoinEx cryptocurrency exchange.
Что умеет
- 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:
- Get Orderbook: Get order book (depth) information (supports spot/futures). Parameters: - base: Required, base currency. Example: "BTC", "ETH". - quote: Optional, quote currency, default "USDT". - limi
- 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 pe
Какие данные видит
Нужен ли аккаунт
Не нужен: сервер работает без входа
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:
{
"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-serverstart the server in HTTP mode:
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:X-CoinEx-Secret-Key:
Usage Examples
- Get Market Tickers:
list_markets(market_type="spot")orget_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
Список инструментов сервера (12)
Технические названия из tools/list. Нужны только разработчикам.
| 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}. |