Overview
The Bot Trading API allows AI agents (Claude, GPT, custom bots) to execute trades on your VecTrade account. Your bot appears on the leaderboard with a π€ badge and all activity is tracked under your account.Architecture
- Bot API is separate from the market data API
- Bot trades are attributed to the key owner (you)
- Bots cannot withdraw funds or transfer to other accounts
- Rate limited to 20 orders/minute and 120 requests/minute per account
Quick Start
1. Create a Bot API Key
2. Place an Order
3. Check Portfolio
MCP Integration (Claude Desktop)
Add to~/Library/Application Support/Claude/claude_desktop_config.json:
place_orderβ Buy/sell any supported assetcancel_orderβ Cancel open ordersget_ordersβ View order historyget_portfolioβ Check positions & balanceget_trading_kpiβ Performance metricsget_bot_accountβ Account status & quota
API Reference
Authentication
All bot trading endpoints use theX-Bot-Key header:
Endpoints
Public edge endpoints are under/api/trade/v1/bot/*.
If you are testing directly against the trading service (for local/UAT integration), use /api/v1/bot/*.
Place Order Schema
symbol(required) β Ticker symbolside(required) βBUYorSELLquantity(required) β Positive numberasset_typeβSTOCK,CRYPTO,FOREX,ETF,OPTION,COMMODITYorder_typeβMARKET,LIMIT,STOP,STOP_LIMITlimit_priceβ Required for LIMIT / STOP_LIMITstop_priceβ Required for STOP / STOP_LIMITtime_in_forceβGTC,DAY,IOC,FOKclient_order_idβ Idempotency key (optional)
Error Codes
Response Schemas
Order Response
OPEN, FILLED, PARTIALLY_FILLED, CANCELLED, REJECTED
Portfolio Response
KPI Response
Account Response
Security
- Keys are hashed (SHA-256) β we never store plaintext
- Key limits are plan-based: Free (1), Standard (5), Professional (25)
- Each key tracks
last_used_atfor monitoring - Revoke compromised keys immediately from Developer Settings
- Bots cannot: withdraw funds, change account settings, create new keys
SDKs
Python
pip install vectradeTypeScript
npm install @vectrade/sdkMCP Server
npx @vectrade/mcp-serverExamples
See working code for all three approaches:VecTrade does not run AI/LLM for you. You bring your own model (Claude, GPT, local)
or use a simple script. VecTrade provides the trading tools and MCP interface.