💡 The Economics of AI Trading: Why Raw APIs Bleed Capital
Most AI trading agents connect to crypto exchanges using standard REST endpoints (CCXT, Binance FAPI, or Bybit V5). This burns massive token context on raw formatting boilerplate.
A standard 100-candle JSON array from an exchange dumps 13-digit Unix timestamps, quote/base volume strings, and trade counts. The agent's LLM context window gets clogged with unparsed strings, while having to compute RSI, EMA, and MACD inside its own context—burning tokens and hallucinating math.
The Token Benchmark (100 Candles, 5m Timeframe)
*Pricing based on standard OpenAI GPT-4o / Claude 3.5 Sonnet input token pricing ($2.50 / 1M).
💰 The Bottom Line
BitCLI queries cost $0.001 USD (Pay-As-You-Go).
By cutting ~1,900 tokens per call, BitCLI saves ~$0.0048 in model inference fees on every single request.
You pay micro-cents for curated market data to save full dollars on LLM compute.
⚡ The BCT-30 Candlestick Matrix
Instead of raw exchange JSON, BitCLI returns dense, mathematical BCT-30 (BitCLI Compact Candlesticks) matrices:
- Zero-Token Temporal Grids: No 13-digit Unix timestamps per row. Relative integer delta indices (
-N ... 0) reconstruct exact time deterministically from the @BCT base timestamp.
- Normalized Metrics: Volume (
v) and Cumulative Volume Delta (dv) are converted to thousands of USD (kUSD).
- Zero Math Hallucination: RSI, EMA, ATR, MACD, and Bollinger Bands are calculated in C++ on the server with 3,000 bars of historical warmup. The agent reads raw institutional truth.
📡 Dual Integration Architecture
1. Stateless Assistants (Cursor, Claude Desktop, ChatGPT)
- Endpoint:
POST https://mcp.bitcli.io/mcp
- Mode: The agent queries market data or executes risk calculations on prompt.
- Asynchronous Alerting: When setting a trigger via
alert_manager, the agent does not need to hang open or poll. The trigger is injected into the C++ memory core. When hit, BitCLI dispatches an instant push to the user's Telegram or Discord channel.
2. Autonomous Trading Agents (Python SDK)
- Endpoint:
wss://mcp.bitcli.io/stream
- Mode: Full duplex event stream with automatic reconnection and Replay API. Agents sleep in memory and wake up via sub-millisecond WebSocket frame pushes.
🛠️ The 6 Core MCP Tools
🚀 Quickstart: Connecting Your AI Client
1. Generate an API Key
Log in to the Web Dashboard (via Discord, Telegram, or Web3) or use /profile in @bitclibot to generate your developer key:
2. Cursor IDE Integration
Add BitCLI to your project's .cursor/mcp.json:
3. Claude Desktop Configuration
Add BitCLI to your claude_desktop_config.json:
⌨️ Unified Command Syntax (Used in Chat & alert_manager)
The exact same syntax works whether typed into Telegram or passed into the MCP command parameter:
- Exact Price:
btc 95k or binance eth 3150
- Velocity (Rapid Moves):
sol +3.5% 5m (Surges >3.5% in 5 min)
- Whale Volume Spikes:
* vol 15m x4 (Global scan: 4x above 20-SMA)
- Liquidation Cascades:
* liq z3 (Liquidations exceed 3 standard deviations)
- Order Flow (CVD):
btc cvd div 15m (Cumulative Volume Delta Divergence)
- Risk Position Sizing:
/pos btc 65k 63.7k 50 ($50 fixed risk calculation)
🛡 Security & Transparency
- No Exchange API Keys Needed: BitCLI does not custody funds or request your private exchange trading keys.
- Isolated Routing: The
send_notification tool strictly enforces ownership validation—agents can only message destination IDs explicitly verified by your account.
- Zero Polling Overhead: Avoid burning tokens on cron-loops. Set a trigger via
alert_manager and let our infrastructure notify your channels.
📄 License
This MCP specification and client wrappers are open-source under the MIT License.