AiphaBrain Lab Pre-Trade Check
v0.1.2Binance spot pre-trade gate: lot size, min notional, slippage -> pass/warn/block.
MCP stdio server exposing AiphaBrain Lab's two currently free pre-trade endpoints as tools: Input: market (spot|usdm), symbol (e.g. BTCUSDT), side (BUY|SELL), type (MARKET|LIMIT), quantity or quoteAmount, price (LIMIT), leverage (full tool only). exchange is always binance.
Summary extracted from the README.
aiphabrain-mcp (private, not published)
MCP stdio server exposing AiphaBrain Lab's two currently free pre-trade endpoints as tools:
| Tool | Endpoint |
|---|---|
pretrade_check |
POST https://api.aiphabrainlab.com/v1/pretrade-check |
pretrade_check_lite |
POST https://api.aiphabrainlab.com/v1/pretrade-check-lite |
Input: market (spot|usdm), symbol (e.g. BTCUSDT), side (BUY|SELL), type (MARKET|LIMIT), quantity or quoteAmount, price (LIMIT), leverage (full tool only). exchange is always binance.
- Read-only: never places orders, never pays, never signs, reads no env vars or keys.
- Network: only
https://api.aiphabrainlab.com, 15 s timeout, redirects refused. - HTTP 402 is returned as a tool error; no payment is attempted.
npm ci --ignore-scripts && npm run build
node dist/index.js # stdio server
node test/client.mjs ../test_log.txt # live JSON-RPC test (initialize, tools/list, tools/call)
node test/offline_402.mjs # offline mocked-fetch 402 test (not an online test)