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. Market-data API keys (vq_...) and Bot API keys (tvt_...) are separate credentials. Bot orders use X-Bot-Key; they do not use the Python or TypeScript market-data SDK’s client.trade resource.
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
AUDUSD=X, EURUSD=X, GBPUSD=X, NZDUSD=X, USDCAD=X, USDCHF=X, and USDJPY=X. Spot Forex is fully funded and long-only; shorting and leverage are not available.
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 symbol; Forex uses a six-letter pair plus=X, such asEURUSD=Xside(required) —BUYorSELLquantity(required) — Positive numberasset_type—STOCK,CRYPTO,FOREX,ETF,OPTION,COMMODITYorder_type—MARKET,LIMIT,STOP,STOP_LIMIT,TRAILING_STOPlimit_price— Required for LIMIT / STOP_LIMITstop_price— Required for STOP / STOP_LIMITtrail_amount,trail_type— Trailing-stop parameters;trail_amountis required forTRAILING_STOPtime_in_force—GTC,DAY,IOC,FOK,GTDexpire_at— Required forGTDclient_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.