@aicoin/aicoin-mcp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +140 -0
- package/build/index.js +2284 -0
- package/package.json +47 -0
package/README.md
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# @aicoin/mcp
|
|
2
|
+
|
|
3
|
+
Unified AiCoin MCP Server — crypto market data + trading in one package.
|
|
4
|
+
|
|
5
|
+
Merges `@aicoin/opendata-mcp` (market data via AiCoin API) and `@aicoin/trade-mcp` (trading via CCXT) into **41 tools**.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"mcpServers": {
|
|
12
|
+
"aicoin": {
|
|
13
|
+
"command": "npx",
|
|
14
|
+
"args": ["-y", "@aicoin/mcp"],
|
|
15
|
+
"env": {
|
|
16
|
+
"AICOIN_ACCESS_KEY_ID": "<your opendata key>",
|
|
17
|
+
"AICOIN_ACCESS_SECRET": "<your opendata secret>",
|
|
18
|
+
"DEFAULT_EXCHANGE": "binance",
|
|
19
|
+
"BINANCE_API_KEY": "<your key>",
|
|
20
|
+
"BINANCE_SECRET": "<your secret>",
|
|
21
|
+
"USE_PROXY": "false"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Environment Variables
|
|
29
|
+
|
|
30
|
+
| Variable | Required | Description |
|
|
31
|
+
|----------|----------|-------------|
|
|
32
|
+
| `AICOIN_ACCESS_KEY_ID` | No | AiCoin OpenData API key (free tier built-in) |
|
|
33
|
+
| `AICOIN_ACCESS_SECRET` | No | AiCoin OpenData API secret |
|
|
34
|
+
| `DEFAULT_EXCHANGE` | No | Default exchange for trading (default: binance) |
|
|
35
|
+
| `{EXCHANGE}_API_KEY` | For trading | Exchange API key |
|
|
36
|
+
| `{EXCHANGE}_SECRET` | For trading | Exchange API secret |
|
|
37
|
+
| `{EXCHANGE}_PASSPHRASE` | OKX/Bitget | Exchange passphrase |
|
|
38
|
+
| `USE_PROXY` | No | Enable proxy (true/false) |
|
|
39
|
+
| `PROXY_URL` | No | Proxy URL (http/https/socks5) |
|
|
40
|
+
|
|
41
|
+
Supported exchanges: `binance`, `binanceusdm`, `binancecoinm`, `okx`, `bybit`, `bitget`, `gate`, `huobi`, `hyperliquid`
|
|
42
|
+
|
|
43
|
+
## Tools (41)
|
|
44
|
+
|
|
45
|
+
### Trade (11) — CCXT-based exchange trading
|
|
46
|
+
|
|
47
|
+
| # | Tool | Description |
|
|
48
|
+
|---|------|-------------|
|
|
49
|
+
| 1 | `exchange_info` | List exchanges, query trading pairs. Actions: `exchanges`, `markets` |
|
|
50
|
+
| 2 | `exchange_ticker` | Real-time ticker (single or batch) |
|
|
51
|
+
| 3 | `exchange_market_data` | Order book, trades, OHLCV. Actions: `orderbook`, `trades`, `ohlcv` |
|
|
52
|
+
| 4 | `exchange_funding` | Funding rates. Actions: `current`, `history` |
|
|
53
|
+
| 5 | `account_status` | Account balance & positions. Actions: `balance`, `positions` |
|
|
54
|
+
| 6 | `account_orders` | Order queries. Actions: `open`, `closed`, `by_id`, `my_trades` |
|
|
55
|
+
| 7 | `account_history` | Account history. Actions: `ledger`, `deposits`, `withdrawals` |
|
|
56
|
+
| 8 | `create_order` | Place market/limit orders |
|
|
57
|
+
| 9 | `cancel_order` | Cancel single or all orders |
|
|
58
|
+
| 10 | `set_trading_config` | Set leverage & margin mode. Actions: `leverage`, `margin_mode` |
|
|
59
|
+
| 11 | `transfer` | Transfer funds between accounts |
|
|
60
|
+
|
|
61
|
+
### Coins (5) — AiCoin coin data
|
|
62
|
+
|
|
63
|
+
| # | Tool | Description |
|
|
64
|
+
|---|------|-------------|
|
|
65
|
+
| 12 | `coin_info` | Coin data. Actions: `list`, `ticker`, `config`, `ai_analysis` |
|
|
66
|
+
| 13 | `coin_funding_rate` | Funding rate history (regular or volume-weighted) |
|
|
67
|
+
| 14 | `coin_liquidation` | Liquidation data. Actions: `map`, `history`, `estimated` |
|
|
68
|
+
| 15 | `coin_open_interest` | Aggregated OI history (stablecoin or coin-margined) |
|
|
69
|
+
| 16 | `coin_futures_data` | Futures depth & trades. Actions: `historical_depth`, `super_depth`, `trade_data` |
|
|
70
|
+
|
|
71
|
+
### Contents (2) — News & flash
|
|
72
|
+
|
|
73
|
+
| # | Tool | Description |
|
|
74
|
+
|---|------|-------------|
|
|
75
|
+
| 17 | `news` | News articles. Actions: `list`, `detail`, `rss` |
|
|
76
|
+
| 18 | `flash` | Flash news. Actions: `newsflash`, `list`, `exchange_listing` |
|
|
77
|
+
|
|
78
|
+
### Markets (6) — Market & index data
|
|
79
|
+
|
|
80
|
+
| # | Tool | Description |
|
|
81
|
+
|---|------|-------------|
|
|
82
|
+
| 19 | `market_info` | Exchange/market data. Actions: `exchanges`, `ticker`, `hot_coins`, `futures_interest` |
|
|
83
|
+
| 20 | `kline` | K-line data. Actions: `data`, `indicator`, `trading_pair` |
|
|
84
|
+
| 21 | `index_data` | Index data. Actions: `price`, `info`, `list` |
|
|
85
|
+
| 22 | `crypto_stock` | Crypto stocks. Actions: `quotes`, `top_gainer`, `company` |
|
|
86
|
+
| 23 | `coin_treasury` | Corporate holdings. Actions: `entities`, `history`, `accumulated`, `latest_entities`, `latest_history`, `summary` |
|
|
87
|
+
| 24 | `depth` | Order book depth. Actions: `latest`, `full`, `grouped` |
|
|
88
|
+
|
|
89
|
+
### Features (5) — Signals & analytics
|
|
90
|
+
|
|
91
|
+
| # | Tool | Description |
|
|
92
|
+
|---|------|-------------|
|
|
93
|
+
| 25 | `market_overview` | Market overview. Actions: `nav`, `ls_ratio`, `liquidation`, `grayscale_trust`, `gray_scale`, `stock_market` |
|
|
94
|
+
| 26 | `order_flow` | Order flow. Actions: `big_orders`, `agg_trades` |
|
|
95
|
+
| 27 | `trading_pair` | Trading pairs. Actions: `ticker`, `by_market`, `list` |
|
|
96
|
+
| 28 | `signal_data` | Signal data. Actions: `strategy`, `alert`, `config`, `alert_list`, `change` |
|
|
97
|
+
| 29 | `signal_manage` | Manage alerts. Actions: `add`, `delete` |
|
|
98
|
+
|
|
99
|
+
### Hyperliquid (11) — HL-specific analytics
|
|
100
|
+
|
|
101
|
+
| # | Tool | Description |
|
|
102
|
+
|---|------|-------------|
|
|
103
|
+
| 30 | `hl_ticker` | HL tickers (single coin or batch) |
|
|
104
|
+
| 31 | `hl_whale` | Whale data. Actions: `positions`, `events`, `directions`, `history_ratio` |
|
|
105
|
+
| 32 | `hl_liquidation` | Liquidation data. Actions: `history`, `stats`, `stats_by_coin`, `top_positions` |
|
|
106
|
+
| 33 | `hl_open_interest` | OI data. Actions: `summary`, `top_coins`, `history` |
|
|
107
|
+
| 34 | `hl_taker` | Taker data. Actions: `delta`, `klines` |
|
|
108
|
+
| 35 | `hl_trader` | Trader analytics. Actions: `stats`, `best_trades`, `performance`, `completed_trades`, `accounts`, `statistics` |
|
|
109
|
+
| 36 | `hl_fills` | Trade fills. Actions: `by_address`, `by_oid`, `by_twapid`, `top_trades` |
|
|
110
|
+
| 37 | `hl_orders` | Orders. Actions: `latest`, `by_oid`, `filled`, `filled_by_oid`, `top_open`, `active_stats`, `twap_states` |
|
|
111
|
+
| 38 | `hl_position` | Position data. Actions: `current_history`, `completed_history`, `current_pnl`, `completed_pnl`, `current_executions`, `completed_executions` |
|
|
112
|
+
| 39 | `hl_portfolio` | Portfolio data. Actions: `portfolio`, `pnls`, `max_drawdown`, `net_flow` |
|
|
113
|
+
| 40 | `hl_advanced` | Advanced. Actions: `info`, `smart_find`, `discover` |
|
|
114
|
+
|
|
115
|
+
### Guide (1)
|
|
116
|
+
|
|
117
|
+
| # | Tool | Description |
|
|
118
|
+
|---|------|-------------|
|
|
119
|
+
| 41 | `guide` | Setup guides. Actions: `api_key`, `upgrade`, `trade_setup` |
|
|
120
|
+
|
|
121
|
+
## Testing
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
npm run build
|
|
125
|
+
node test-tools.mjs # Test all tools
|
|
126
|
+
node test-tools.mjs hl_ # Test Hyperliquid only
|
|
127
|
+
node test-tools.mjs coin # Test coin-related only
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Development
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
npm run dev # Watch mode
|
|
134
|
+
npm run build # Production build
|
|
135
|
+
npm start # Run server
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## License
|
|
139
|
+
|
|
140
|
+
MIT
|