About AI Fund
AI Fund is an MCP server published by cubexch in the Blockchain category: aI trading desk with 42 hedge fund agents for Claude Code. Trade crypto & stocks like James Livermore, Jim Simons, or George Soros. Works with Cube.Exchange, OKX, Kraken, Binance, Coinbase, and 100+ exchanges. Hire agents, fire underperformers, backtest strategies. Conduid read 101 tools from its source: aggregate_order_books, analyze_cross_symbol, analyze_sniper, assess_portfolio_risk, backtest_strategy, backtest_strategy_v2 and 95 more. No package is published for it, so it installs from a source checkout.
The repository has 39 stars and 11 forks, and its last commit was on 8 Apr 2026. Conduid has no tagged release on record for it. It passes 3 of the 5 static checks Conduid ran on the repository; it does not pass License declared and No dynamic code execution. Its topics include ai-trading, algo-trading, bitcoin, cube, defi and exchange.
Install
git clone https://github.com/cubexch/ai-fundTools (101)
aggregate_order_booksAggregate order books from multiple exchanges for a symbol. Merges bids and asks, shows per-level exchange contributions, computes aggregate spread, and identifies best execution venue for buy/sell.analyze_cross_symbolCross-symbol statistical analysis using cached DuckDB data. Computes correlation matrix, relative returns, Sharpe ratios, and max drawdowns across multiple symbols — essential for pairs trading and portfolio construction.analyze_sniperAnalyze order book to estimate fill probability and expected fill price for a market order.assess_portfolio_riskPortfolio-level risk assessment: VaR, volatility, Sharpe, Sortino, max drawdown, and correlation matrix across positions.backtest_strategyRun a simple moving average crossover backtest on cached DuckDB data. Buys when fast SMA crosses above slow SMA, sells when fast crosses below. Returns trade list, equity curve, and performance stats (Sharpe, Sortino, max drawdown, win rate, profit factor).backtest_strategy_v2Run a multi-strategy backtest on cached OHLCV data. Strategies: ${Backtester.strategyNames().join(', ')}. Models commission and slippage. Returns trades, equity curve, and comprehensive metrics (Sharpe, Sortino, Calmar, max drawdown, win rate, profit factor, expectancy).calculate_dca_scheduleCompute a DCA (Dollar-Cost Averaging) schedule, optionally adjusted by rolling volatility.calculate_implementation_shortfallCalculate implementation shortfall between decision price and execution price.calculate_position_sizeCalculate optimal position size using Kelly criterion and fixed-fractional methods.calculate_varCalculate portfolio Value at Risk using parametric method.cancel_all_ordersCancel all open orders.cancel_orderCancel an open order by ID.check_correlation_riskCheck portfolio for dangerous correlations between holdings. Identifies highly correlated clusters.check_position_limitsValidate a proposed trade against risk limits. Returns pass/fail with details.check_pre_tradeComprehensive pre-trade risk check. Run this before executing any trade to get a go/no-go decision.close_positionClose a position by symbol. Optionally specify quantity or percentage to partially close.compare_execution_plansCompare TWAP, VWAP, and iceberg execution strategies for a given order. Returns cost/impact estimates and a recommendation.compare_strategiesRun ALL built-in strategies (${Backtester.strategyNames().join(', ')}) on the same cached data and return a ranked comparison table sorted by Sharpe ratio. Quick way to find the best strategy for a given symbol.detect_arbitrage_opportunityDetect cross-exchange arbitrage opportunities by comparing bid/ask prices for a symbol across multiple exchanges. Returns per-venue quotes, best bid/ask venues, spread, estimated profit after fees, and whether the opportunity is actionable.detect_basis_tradeDetect spot vs perpetual basis trade opportunities on ${client.name}. Compares spot and perp prices, computes basis, funding rate carry, and net annualized return after fees. The core profit engine for crypto market makers.detect_bb_squeezeBollinger Band squeeze detector on ${client.name}. Identifies low-volatility compression that often precedes breakouts. Scans multiple symbols and ranks by squeeze intensity.detect_confluenceMulti-timeframe confluence analysis. Fetches multiple timeframes for a symbol and detects bullish/bearish alignment.detect_correlation_regimeRolling correlation with regime change detection between two symbols. Computes rolling correlation over a sliding window, detects regime transitions (decorrelation events, sign flips), and classifies the current regime. Essential for pairs trading and dynamic hedging.detect_market_regimeClassify the current market regime for a symbol on ${client.name}. Returns trending_up, trending_down, ranging, volatile, quiet, or breakout — with confidence scores, indicator details, recent transitions, and strategy recommendations.detect_patternsDetect candlestick patterns (engulfing, doji, hammer, shooting star, three soldiers/crows). Returns detected patterns with signal details.execute_tradeExecute a trade with smart routing. Checks both the orderbook and on-chain liquidity, routes to the best price. Works like a market order — specify what you want to buy or sell and the amount. Accepts symbols or on-chain mint addresses. Quote asset defaults to USDC if omitted.export_to_parquetExport cached market data to a Parquet file for external analysis (Python, R, DuckDB CLI). Filters by symbol, timeframe, and exchange before writing.find_support_resistanceFind key support and resistance price levels for a symbol using pivot point analysis and price clustering.get_accountGet Alpaca account summary — buying power, cash, portfolio value, equity, and day trade count.get_account_depositGet a deposit link for the user to fund their account. Returns a URL to cube.exchange/agent/deposit that handles chain/token selection and shows the deposit address.get_assetsList all available trading assets with their trading pairs, lot sizes, tick sizes, and status.get_barsGet OHLCV candlestick bars for a symbol. Timeframes: 1Min, 5Min, 15Min, 1Hour, 1Day, 1Week, 1Month.get_cached_symbolsList all symbols cached in the local DuckDB market data store. Shows available exchanges, intervals, date ranges, and row counts.get_clockGet market clock — whether the market is open and next open/close times.get_cube_articlesDiscover Cube Exchange content from sitemap(s), then optionally supplement with curated RSS feeds while prioritizing Cube results.get_drawdown_monitorMonitor current portfolio drawdown from peak equity.get_exchange_healthComprehensive health check for ${client.name}. Returns connectivity status, auth state, rate limiter capacity, datastore status, journal status, latency stats, and any detected issues.get_exchange_infoGet ${client.name} exchange capabilities — supported order types, timeframes, rate limits, market count. Use to check what features are available.get_execution_qualityAnalyze execution quality of recent fills for a symbol on ${client.name}. Returns VWAP, average fill price, slippage vs current mid, fill rate, and maker/taker breakdown.get_feesGet trading fee rates on ${client.name}. Returns maker and taker fee percentages — critical for arbitrage profitability calculations.get_fillsGet trade fills (executed trades) from Alpaca account activities.get_funding_ratesFetch funding rates for perpetual contracts on ${client.name}. Returns current funding rate, annualized rate, mark/index prices, and next funding time. Essential for carry trade and basis trade strategies.get_latency_statsGet API request latency statistics for ${client.name}. Shows per-method timing (avg, p50, p95, p99, min, max), error rates, and request counts. Essential for monitoring execution infrastructure health.get_liquidation_heatmapEstimate liquidation levels from order book depth on ${client.name}. Shows where leveraged positions would be liquidated and the volume sitting at those levels.get_live_snapshotGet real-time market data snapshot for a symbol on ${client.name}. Returns WebSocket-streamed order book, ticker, and trades if a stream is active, otherwise falls back to REST API (order book + quote).get_margin_healthCheck margin account health, liquidation distance, and available margin.get_market_infoGet detailed market information for a symbol on ${client.name} — precision rules, min/max order sizes, and fee rates. Essential before placing orders to know valid amounts.get_market_microstructureAnalyze order book depth microstructure for a symbol on ${client.name}. Returns bid-ask imbalance, depth at multiple price levels, price impact estimates, order book shape, and weighted mid price — the analytics a Citadel market maker uses.get_momentum_scannerScan multiple symbols on ${client.name} for momentum signals. Computes price change over 1/5/10/20 bars, volume surge ratio, and a composite momentum score. Returns symbols sorted by momentum strength (strongest first).get_multi_timeframe_signalsAnalyze a symbol across multiple timeframes (1h, 4h, 1d). Returns signals from each timeframe and an alignment score indicating how strongly all timeframes agree.get_optimal_entryAnalyze order book depth, spread, and recent trade flow on ${client.name} to recommend optimal entry strategy for a trade. Returns recommended order type, price, estimated slippage, and trade flow signal.get_orderGet a specific order by ID.get_order_bookGet order book depth (bids and asks) for a symbol on ${client.name}.get_order_flow_imbalanceAnalyze recent public trades for buy/sell imbalance on ${client.name}. Computes buy vs sell volume, imbalance percentage, large trade detection, and net flow direction signal.get_order_historyGet historical closed/filled orders. Alias for get_orders with status=closed.get_ordersGet orders from Alpaca. Filter by status: open, closed, or all.get_pnl_attributionDetailed P&L attribution from the trade journal. Group realized P&L by symbol, strategy, calendar day, or hour of day. Essential for identifying which pairs, agents, or time windows drive performance.get_pnl_reportP&L summary from the trade journal. Computes realized P&L, buy/sell volume, total fees, and traded symbols. Filter by exchange, symbol, strategy, and time range.get_portfolioGet portfolio summary with all positions, current prices, total value, and allocation percentages.get_portfolio_exposureFull portfolio exposure breakdown on ${client.name}. Shows gross/net exposure, concentration, and per-asset weights.get_positionsGet all current positions with unrealized P&L, market value, and cost basis.get_quoteGet the latest quote (bid/ask) for a symbol.get_regime_historyGet the regime history for a symbol on ${client.name}. Shows a timeline of regime classifications with durations — useful for understanding how long regimes persist and what transitions look like.get_risk_dashboardComprehensive risk dashboard with traffic-light status for all risk metrics.get_signal_dashboardComprehensive signal dashboard for a watchlist. Returns per-symbol: current price, bias, score, top signal, nearest support/resistance.get_spread_monitorReal-time spread monitoring across multiple symbols on ${client.name}. Returns spreads sorted by spreadBps — essential for market-making venue selection. Shows which pairs have tightest/widest spreads.get_stream_statusShow active WebSocket streaming subscriptions and data freshness on ${client.name}. Lists all symbols with active streams, their channels (orderBook, ticker, trades), and how recently each was updated.get_subaccountsList all subaccounts available to this API key.get_technical_analysisRun technical indicators (SMA, EMA, RSI, MACD, Bollinger Bands, ATR, Stochastic) on OHLCV data for a symbol.get_tickerGet current price for a single symbol on ${client.name}. Faster than get_tickers for single lookups.get_tickersGet current snapshots (price, quote, daily bar) for one or more symbols.get_trade_journalQuery the trade journal for execution history. Filter by exchange, symbol, strategy, and time range. Returns individual trade records ordered by timestamp (newest first).get_tradesGet recent trades for a symbol from the market data feed.get_trendingGet currently trending assets with prices, volume, and market data.get_volatility_term_structureBuild volatility term structure from multiple timeframes on ${client.name}. Computes annualized volatility per timeframe and classifies the term structure as normal or inverted.get_volume_profileCompute volume profile (price-weighted volume distribution) from cached DuckDB data. Shows where the most trading activity occurred — essential for support/resistance and optimal order placement.get_vwapCompute VWAP (Volume-Weighted Average Price) from cached DuckDB data. The execution benchmark used by every institutional desk. Compares current price to VWAP for mean-reversion signals.ingest_historyBulk ingest historical OHLCV data from ${client.name} into the local DuckDB cache. Fetches candles and stores them for fast SQL analytics. Run this before cross-symbol analysis.ingest_recent_tradesFetch recent public trades from ${client.name} and store as 1-second OHLCV candles in the local DuckDB cache. Each second of trade activity becomes one candle (open=first price, close=last price, volume=sum). Useful for tick-level analysis and microstructure research.match_strategy_to_regimeGiven the current market regime on ${client.name}, recommend optimal trading strategies and parameters adjusted for risk tolerance. Returns regime classification, recommended strategies, position sizing, and actionable advice.modify_orderModify an existing open order. Can change qty, limit_price, stop_price, time_in_force, or trail.optimize_grid_paramsOptimize grid trading parameters for a symbol on ${client.name}. Uses Bollinger Bands for price range and ATR for grid spacing. Returns grid levels, spacing, expected daily trades, and volatility regime.optimize_strategyGrid search over parameter space for a given strategy. Tests all combinations of provided parameter arrays and ranks results by the chosen metric (sharpe, return, or calmar). Use for finding optimal parameters.place_orderPlace an order on Alpaca. Supports market, limit, stop, stop_limit, and trailing_stop order types.plan_icebergPlan an iceberg order execution. Splits order into small visible clips to minimize market impact.plan_smart_routePlan optimal order routing across multiple venues based on available liquidity.plan_twapPlan a TWAP (Time-Weighted Average Price) execution schedule. Splits a large order into equal time slices.plan_vwapPlan a Volume-Weighted Average Price execution. Distributes order sizes proportional to historical volume.query_market_dataRun a SQL query against the local DuckDB market data cache. The ohlcv table has columns: symbol, exchange, asset_type, interval, ts, open, high, low, close, volume. Use for VWAP, volume profiles, cross-symbol analysis — like kdb+ for crypto.rebalance_portfolioCalculate optimal trades to rebalance a portfolio to target weights on ${client.name}. Returns trade list with amounts, notional values, and turnover metrics.scan_breakoutsScan for potential breakouts: symbols near support/resistance levels with volume confirmation. Useful for finding imminent breakout candidates.scan_divergencesScan multiple symbols for RSI and MACD divergences. Returns symbols with active bullish or bearish divergences.scan_marketScan multiple symbols for trading opportunities. Returns ranked list of symbols with signals above the minimum score threshold.scan_mean_reversionScan cached DuckDB data for mean reversion opportunities using Z-scores on ${client.name}. Flags overbought/oversold symbols based on deviation from rolling mean.scan_regime_changesScan multiple symbols on ${client.name} for recent regime changes. Identifies symbols that transitioned between regimes within the lookback window — useful for catching emerging trends or breakdowns.scan_signalsRun full signal analysis on a single symbol. Returns all detected signals, overall score, and directional bias.search_assetsSearch for tradable assets on Alpaca by symbol or name.set_risk_limitsView or update risk management limits. Pass parameters to update, or call with no params to view current limits.simulate_market_impactEstimate the market impact cost of executing a given quantity. Uses Almgren-Chriss model with realized volatility.simulate_stress_testStress test portfolio against historical crash scenarios or custom price changes.walk_forward_testWalk-forward optimization: split data into rolling train/test windows, optimize on training data, validate on test data. Detects overfitting by comparing in-sample vs out-of-sample performance. The gold standard for strategy validation.Security checks
Static checks derived from the repository a month ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 3.5K words.
- !License declaredNo license file. Legally you have no right to use it in a product.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedA lockfile pins dependency versions.
- !No dynamic code executionScanned 135 source files and found 42 calls to eval or shell execution, in connectors/alpaca/mcp-server/src/client/credential-store.ts, connectors/ccxt/mcp-server/src/client/credential-store.ts and connectors/cube/mcp-server/src/cli/cube.ts among others. Review how tool inputs reach them before granting credentials.
1 check has not been run yet.
README
The repository's README runs to about 3.5K words, fetched a month ago. The original in the repository is authoritative.
Read full README