Documentation
Profitabul Agent API
Real-time futures market intelligence, GEX/options flow analysis, trading signals, and execution for AI agents — via MCP and REST.
Quick Start
Get connected in three steps:
Get your API key
Log in to profitabul.com, go to Settings → Integrations, and generate an Agent API key. The key starts with pab_live_ and is shown once — copy it immediately.
Add to your agent
Configure your MCP client (Claude, OpenClaw, Cursor, etc.) to point at the Profitabul MCP endpoint with your key in the auth header.
Start calling tools
Your agent now has access to 16 tools for market data, signals, backtesting, paper trading, and live execution.
Authentication
All requests require a Bearer token in the Authorization header:
Authorization: Bearer pab_live_a1b2c3d4e5f6...
Managing your key
- Create: Settings → Integrations → "Generate API Key"
- Rotate: Click "Regenerate" to create a new key (revokes the old one)
- Revoke: Click "Revoke" to disable the key immediately
Keys are hashed server-side with SHA-256. We never store your plaintext key after initial display.
MCP Setup
The Profitabul Agent API implements the Model Context Protocol over HTTP JSON-RPC. Connect any MCP-compatible client.
Endpoint
https://agents.profitabul.ai/mcp
Claude Desktop / Claude Code
{
"mcpServers": {
"profitabul": {
"url": "https://agents.profitabul.ai/mcp",
"headers": {
"Authorization": "Bearer pab_live_YOUR_KEY_HERE"
}
}
}
}Cursor / VS Code
{
"mcpServers": {
"profitabul": {
"url": "https://agents.profitabul.ai/mcp",
"headers": {
"Authorization": "Bearer pab_live_YOUR_KEY_HERE"
}
}
}
}Verify connection
curl -X POST https://agents.profitabul.ai/mcp \
-H "Authorization: Bearer pab_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}'You should get back a response with protocolVersion and serverInfo.
OpenClaw / ClawHub
Profitabul is available as a ClawHub skill for OpenClaw agents.
Install from ClawHub
clawhub install profitabul/profitabul-mcp
Configure environment
Add your API key to ~/.clawdbot/.env:
PROFITABUL_API_KEY=pab_live_YOUR_KEY_HERE
Configure mcporter
Add to config/mcporter.json:
{
"mcpServers": {
"profitabul": {
"baseUrl": "https://agents.profitabul.ai/mcp",
"headers": {
"Authorization": "Bearer ${PROFITABUL_API_KEY}"
}
}
}
}Verify
mcporter list profitabul
REST API
The same data is available over standard HTTP REST. Base URL:
https://agents.profitabul.ai/v1
OpenAPI spec: https://agents.profitabul.ai/openapi.json
Tools Reference
16 tools across market intelligence, historical analysis, paper trading, and live execution.
get_market_context
Comprehensive market snapshot: price, GEX regime, VIX state, key levels, and candle summary.
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Trading symbol (see supported symbols) |
timeframe | string | No | Candle timeframe: 1m, 5m, 15m, 1h, 4h, 1d (default: 5m) |
{
"symbol": "SPX",
"price": { "last": 6052.75, "dayChange": +12.34 },
"gex": {
"kingNode": 6050, "zeroGamma": 5980,
"ceiling": 6100, "floor": 5925
},
"gexBias": { "regime": "positive", "expectedBehavior": "mean-reverting" },
"vix": { "value": 16.2, "trend": "falling", "percentile": 32 }
}get_signal
Heatseeker trading signal combining gamma exposure, vanna flows, and VIX trend into a directional bias with confidence score.
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Trading symbol |
gex_bias | string | Yes | positive, negative, or neutral |
vex_bias | string | Yes | bullish, bearish, or neutral |
vix_trend | string | Yes | rising, falling, or flat |
Returns signal direction (BULLISH/BEARISH/NEUTRAL), confidence percentage, suggested entry/target/stop levels, and rationale.
Signal truth table
| GEX | VEX | VIX | Signal | Confidence |
|---|---|---|---|---|
| positive | bullish | falling | BULLISH | 85% |
| positive | bullish | rising | NEUTRAL | 50% |
| positive | bearish | falling | NEUTRAL | 55% |
| positive | bearish | rising | BEARISH | 65% |
| negative | bullish | falling | BULLISH | 70% |
| negative | bullish | rising | NEUTRAL | 45% |
| negative | bearish | falling | NEUTRAL | 50% |
| negative | bearish | rising | BEARISH | 80% |
| neutral | bullish | falling | BULLISH | 60% |
| neutral | bearish | rising | BEARISH | 60% |
get_key_levels
GEX-derived support/resistance levels: king node (strongest gamma magnet), gatekeeper, zero gamma (hedge flip point), ceiling, and floor.
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Trading symbol |
Returns levels with distance from current price, net gamma, put/call ratio, and trading implications.
get_history
Fetch historical OHLCV candles for any symbol, timeframe, and date range.
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Trading symbol |
timeframe | string | No | 1m, 5m, 15m, 1h, 4h, 1d (default: 5m) |
days | number | No | Lookback days when start/end omitted (default: 30) |
start | number | No | Epoch ms start time |
end | number | No | Epoch ms end time |
get_statistics
Summary statistics over historical candles: realized volatility, average range, volume.
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Trading symbol |
timeframe | string | No | Candle timeframe (default: 5m) |
days | number | No | Lookback days (default: 30) |
start / end | number | No | Epoch ms range override |
run_report
Server-side report calculations: Opening Range Breakout (ORB) and Initial Balance (IB) analysis.
| Parameter | Type | Required | Description |
|---|---|---|---|
reportType | string | Yes | orb or ib |
symbol | string | Yes | Trading symbol |
timeframe | string | No | Candle timeframe (default: 5m) |
days | number | No | Lookback days (default: 30) |
ORB report returns breakout direction rates (up/down/both/none) and average opening range. IB report returns average initial balance range.
run_backtest
Server-side strategy backtest with configurable parameters.
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Trading symbol |
strategy | object | Yes | { type: "orb-breakout" | "orb-fade", params?: { stopMult, targetMult } } |
timeframe | string | No | Candle timeframe (default: 5m) |
days | number | No | Lookback days (default: 30) |
Returns trade count, win rate, net points, and average points per trade.
paper_trade
Open, close, and list simulated positions with full P&L tracking.
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | open, close, or list |
symbol | string | open | Trading symbol |
side | string | open | long or short |
entry | number | open | Entry price |
size | number | open | Position size / contracts |
reason | string | No | Trade rationale |
trade_id | string | close | Trade ID from open |
exit | number | close | Exit price |
close_reason | string | No | Reason for closing |
Live Execution Tools
| Tool | Description |
|---|---|
live_open | Open a live futures trade with stop/target |
live_close | Close a tracked live trade |
live_reduce | Partially reduce an open position |
live_add_risk | Add stop-loss / take-profit orders |
live_cancel_orders | Cancel open orders |
live_account | Read account info (balance, margin) |
live_positions | Read open positions |
live_orders | Read working orders |
Supported Symbols
| Category | Symbols |
|---|---|
| Indices | SPX, NDX |
| ETFs | SPY, QQQ, IWM |
| Equity Futures | ES, NQ, YM, RTY |
| Commodities | GC (Gold), SI (Silver), CL (Crude Oil), HG (Copper) |
Micro aliases (MES, MNQ, MGC, SIL) are automatically resolved to their full-size equivalents for data queries. Live execution uses micro contracts directly.
Rate Limits
| Limit | Value |
|---|---|
| Requests per minute | 120 |
| Window type | Sliding window, per API key |
When rate limited, the API returns HTTP 429 Too Many Requests with a Retry-After header indicating seconds to wait.
Error Handling
MCP tool calls return errors in the standard isError: true format. REST endpoints return appropriate HTTP status codes:
| Code | Meaning |
|---|---|
401 | Missing or invalid API key |
403 | Subscription inactive or insufficient access |
429 | Rate limit exceeded |
400 | Invalid parameters (bad symbol, missing required fields) |
500 | Server error (upstream relay issue) |
Recommended Workflow
Get context
Call get_market_context to understand the current GEX regime, VIX state, and price action.
Check levels
Use get_key_levels for precise GEX-derived support and resistance.
Get signal
Feed GEX bias, VEX bias, and VIX trend from context into get_signal for directional bias.
Validate with data
Run run_report or run_backtest to check if the setup has historical edge.
Execute
Open a paper_trade to build track record, or live_open if live execution is enabled.
Manage
Track positions and close at signal levels. Use get_statistics to evaluate performance over time.