API Documentation

Manage your API keys to integrate and backtest GPTChart.ai analysis into your applications.

Your API Keys

Loading API keys...

Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Available Endpoints

Analysis Endpoints

  • POST /api/v2/crypto/analyze - Analyze cryptocurrency charts
  • POST /api/v2/stock/analyze - Analyze stock charts
  • POST /api/v2/forex/analyze - Analyze forex charts

Symbol Endpoints

  • GET /api/v2/crypto/symbols - Get available crypto symbols
  • GET /api/v2/stock/symbols - Get available stock symbols
  • GET /api/v2/forex/symbols - Get available forex symbols

Analysis Request Schema

All analysis endpoints accept the same request structure:

FieldTypeRequiredDescription
symbolstringYesTrading symbol (e.g., "BTC-USD", "SPY", "EURUSD")
intervalenumYesTimeframe: 1m, 5m, 15m, 30m, 1H, 4H, 1D, 1W, 1M
expertModebooleanNoEnable advanced analysis (default: false)
selectedIndicatorsstring[]NoMax 3 indicators (see available indicators below)
timeframesstring[]NoMax 2 additional timeframes for expert mode
customPromptstringNoCustom analysis instructions (max 3000 chars)
analyzeRelatedNewsbooleanNoInclude news analysis (default: false)
strategyIdstringNoUser strategy ID for personalized analysis

Available Indicators

Use these IDs in selectedIndicators (max 3).

Simple Moving Average (SMA)
Trend filter (20/50/200 common)
sma
Exponential Moving Average (EMA)
Faster trend response (e.g., 20/50)
ema
Ichimoku Cloud
Regime context & S/R
ichimoku
Bollinger Bands
Volatility bands; squeezes/means
bbands
Average True Range (ATR)
Volatility sizing; great for SL/TP
atr
Supertrend
Trend and volatility trailing stop
supertrend
Parabolic SAR
Trailing stop based on price acceleration
sar
Relative Strength Index (RSI)
Momentum (14 default)
rsi
MACD
Momentum + trend; crosses & hist
macd
Know Sure Thing (KST)
Rate-of-change momentum blend
kst
Stochastic Oscillator
Momentum / OB-OS
stoch
Average Directional Index (ADX)
Trend strength (not direction)
adx
%B (Percent B)
Price vs. BB location (0–1)
percent_b
Money Flow Index (MFI)
Volume-weighted momentum
mfi
Detrended Price Oscillator (DPO)
Removes longer-term trend
dpo
Volume Weighted Average Price (VWAP)
Fair-value anchor weighted by volume
vwap
Relative Volume (RVOL)
Volume relative to average participation
rvol
Accumulation/Distribution (A/D)
Volume-based flow of accumulation vs. distribution
ad
Example:
{
  "symbol": "BTC-USD",
  "interval": "15m",
  "expertMode": true,
  "selectedIndicators": ["bbands", "atr", "rsi"]
}

Analysis Response Schema

FieldTypeDescription
analysisstringDetailed AI analysis and reasoning
entrynumberSuggested entry price
stopLossnumberRecommended stop loss price
takeProfitnumberTarget take profit price
confirmationPricenumberPrice level for trade confirmation
reasoningstringConcise trading rationale
biasstringMarket bias: "Buy", "Sell", or "Neutral"
creditsUsednumberCredits consumed for this analysis

Example Requests & Responses

Basic Analysis Request

{
  "symbol": "BTC-USD",
  "interval": "15m"
}

Expert Mode Request

{
  "symbol": "BTC-USD",
  "interval": "15m",
  "expertMode": true,
  "selectedIndicators": ["bbands", "atr"],
  "timeframes": ["15m", "1H"],
  "customPrompt": "Look for stop-hunts or liquidity sweeps around previous highs/lows. Use ATR for SL/TP and confirm using price rejection patterns and Bollinger Band volatility.",
  "analyzeRelatedNews": false
}

Strategy Request

{
  "symbol": "BTC-USD",
  "strategyId": "c1mEhAha9qaVpHdAKQx0"
}

Response Example

{
  "analysis": "Technical analysis shows bullish momentum with price above key moving averages...",
  "entry": 642.5,
  "stopLoss": 634.38,
  "takeProfit": 660.25,
  "confirmationPrice": 642.5,
  "reasoning": "Daily shows bullish regime with price above Ichimoku cloud...",
  "bias": "Buy",
  "creditsUsed": 3
}

Error Responses

Status CodeError TypeDescription
400Bad RequestInvalid request body or parameters
401UnauthorizedInvalid API key or insufficient credits
405Method Not AllowedIncorrect HTTP method
429Rate LimitedToo many requests
500Internal Server ErrorServer-side error

Error Response Format:

{
  "error": "Invalid request body",
  "details": [
    {
      "code": "invalid_type",
      "expected": "string",
      "received": "number",
      "path": ["symbol"]
    }
  ]
}