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:

1

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.

2

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.

3

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 Header
Authorization: Bearer pab_live_a1b2c3d4e5f6...
Pro plan required. API key creation and usage is currently available to Pro subscribers. Access will be expanded to all users in the near future. If your subscription lapses, existing keys are paused until you resubscribe.

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

MCP Endpoint
https://agents.profitabul.ai/mcp

Claude Desktop / Claude Code

claude_desktop_config.json
{
  "mcpServers": {
    "profitabul": {
      "url": "https://agents.profitabul.ai/mcp",
      "headers": {
        "Authorization": "Bearer pab_live_YOUR_KEY_HERE"
      }
    }
  }
}

Cursor / VS Code

.cursor/mcp.json
{
  "mcpServers": {
    "profitabul": {
      "url": "https://agents.profitabul.ai/mcp",
      "headers": {
        "Authorization": "Bearer pab_live_YOUR_KEY_HERE"
      }
    }
  }
}

Verify connection

curl — test MCP initialize
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

Terminal
clawhub install profitabul/profitabul-mcp

Configure environment

Add your API key to ~/.clawdbot/.env:

~/.clawdbot/.env
PROFITABUL_API_KEY=pab_live_YOUR_KEY_HERE

Configure mcporter

Add to config/mcporter.json:

config/mcporter.json
{
  "mcpServers": {
    "profitabul": {
      "baseUrl": "https://agents.profitabul.ai/mcp",
      "headers": {
        "Authorization": "Bearer ${PROFITABUL_API_KEY}"
      }
    }
  }
}

Verify

Terminal
mcporter list profitabul

REST API

The same data is available over standard HTTP REST. Base URL:

Base URL
https://agents.profitabul.ai/v1
GET /v1/context?symbol=SPX Market context
POST /v1/signal Trading signal
GET /v1/levels?symbol=SPX GEX key levels
POST /v1/paper-trade Paper trading
POST /v1/live-trade Live execution

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.

ParameterTypeRequiredDescription
symbolstringYesTrading symbol (see supported symbols)
timeframestringNoCandle timeframe: 1m, 5m, 15m, 1h, 4h, 1d (default: 5m)
Example response (abbreviated)
{
  "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.

ParameterTypeRequiredDescription
symbolstringYesTrading symbol
gex_biasstringYespositive, negative, or neutral
vex_biasstringYesbullish, bearish, or neutral
vix_trendstringYesrising, falling, or flat

Returns signal direction (BULLISH/BEARISH/NEUTRAL), confidence percentage, suggested entry/target/stop levels, and rationale.

Signal truth table
GEXVEXVIXSignalConfidence
positivebullishfallingBULLISH85%
positivebullishrisingNEUTRAL50%
positivebearishfallingNEUTRAL55%
positivebearishrisingBEARISH65%
negativebullishfallingBULLISH70%
negativebullishrisingNEUTRAL45%
negativebearishfallingNEUTRAL50%
negativebearishrisingBEARISH80%
neutralbullishfallingBULLISH60%
neutralbearishrisingBEARISH60%

get_key_levels

GEX-derived support/resistance levels: king node (strongest gamma magnet), gatekeeper, zero gamma (hedge flip point), ceiling, and floor.

ParameterTypeRequiredDescription
symbolstringYesTrading 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.

ParameterTypeRequiredDescription
symbolstringYesTrading symbol
timeframestringNo1m, 5m, 15m, 1h, 4h, 1d (default: 5m)
daysnumberNoLookback days when start/end omitted (default: 30)
startnumberNoEpoch ms start time
endnumberNoEpoch ms end time

get_statistics

Summary statistics over historical candles: realized volatility, average range, volume.

ParameterTypeRequiredDescription
symbolstringYesTrading symbol
timeframestringNoCandle timeframe (default: 5m)
daysnumberNoLookback days (default: 30)
start / endnumberNoEpoch ms range override

run_report

Server-side report calculations: Opening Range Breakout (ORB) and Initial Balance (IB) analysis.

ParameterTypeRequiredDescription
reportTypestringYesorb or ib
symbolstringYesTrading symbol
timeframestringNoCandle timeframe (default: 5m)
daysnumberNoLookback 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.

ParameterTypeRequiredDescription
symbolstringYesTrading symbol
strategyobjectYes{ type: "orb-breakout" | "orb-fade", params?: { stopMult, targetMult } }
timeframestringNoCandle timeframe (default: 5m)
daysnumberNoLookback 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.

ParameterTypeRequiredDescription
actionstringYesopen, close, or list
symbolstringopenTrading symbol
sidestringopenlong or short
entrynumberopenEntry price
sizenumberopenPosition size / contracts
reasonstringNoTrade rationale
trade_idstringcloseTrade ID from open
exitnumbercloseExit price
close_reasonstringNoReason for closing

Live Execution Tools

Live execution tools require broker integration (ProjectX) and are only available when explicitly enabled for your account. Contact us via Discord to request access.
ToolDescription
live_openOpen a live futures trade with stop/target
live_closeClose a tracked live trade
live_reducePartially reduce an open position
live_add_riskAdd stop-loss / take-profit orders
live_cancel_ordersCancel open orders
live_accountRead account info (balance, margin)
live_positionsRead open positions
live_ordersRead working orders

Supported Symbols

CategorySymbols
IndicesSPX, NDX
ETFsSPY, QQQ, IWM
Equity FuturesES, NQ, YM, RTY
CommoditiesGC (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

LimitValue
Requests per minute120
Window typeSliding 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:

CodeMeaning
401Missing or invalid API key
403Subscription inactive or insufficient access
429Rate limit exceeded
400Invalid parameters (bad symbol, missing required fields)
500Server error (upstream relay issue)

Recommended Workflow

1

Get context

Call get_market_context to understand the current GEX regime, VIX state, and price action.

2

Check levels

Use get_key_levels for precise GEX-derived support and resistance.

3

Get signal

Feed GEX bias, VEX bias, and VIX trend from context into get_signal for directional bias.

4

Validate with data

Run run_report or run_backtest to check if the setup has historical edge.

5

Execute

Open a paper_trade to build track record, or live_open if live execution is enabled.

6

Manage

Track positions and close at signal levels. Use get_statistics to evaluate performance over time.