Strategy

Stream strategy code generation token-by-token (SSE)

post/api/v1/generate/stream

Request

  • Base URL: https://api.quantifyme.ai
  • URL: https://api.quantifyme.ai/api/v1/generate/stream
  • Auth: API key in header X-API-Key

Request body

api_keystring

Your API key, if you cannot set the X-API-Key header. Agents that mint a key at runtime (e.g. a ChatGPT Action calling POST /api/v1/key/trial) should pass the returned api_key here on every subsequent call. The X-API-Key header wins when both are present.

claude_model'sonnet' | 'opus' | 'haiku'
descriptionstring

Optional one-line natural-language summary; Claude treats it as PRIMARY USER REQUEST.

end_datestring date
featuresstring
indicatorsIndicators

Flat indicator config. See GET /api/v1/indicator-schema for full param list.

modelstring
optimizationstring
riskstring
risk_functionstring
signalsstring
start_datestring date
symbol'EURUSD' | 'GBPUSD' | 'USDJPY' | 'USDCHF' | 'AUDUSD' | 'NZDUSD' | 'USDCAD' | 'BTCUSD'

Forex pair to train/backtest on.

timeframe'1min' | '5min' | '15min' | '1h'

OHLC bar size.

train_splitnumber

Example request

{
  "aux_feeds": [
    {
      "symbol": "USDCHF",
      "timeframe": "15min"
    }
  ],
  "end_date": "2026-04-01",
  "features": "RSI 14, Bollinger Bands",
  "indicators": {
    "macd_enabled": true,
    "macd_fast": 12,
    "macd_signal": 9,
    "macd_slow": 26,
    "rsi_enabled": true,
    "rsi_period": 14
  },
  "model": "Random Forest",
  "pos_rules": {
    "max_pos": 1
  },
  "risk": "0.5% stop loss",
  "signals": "Buy when RSI < 30",
  "start_date": "2025-01-01",
  "train_split": 0.7
}

Response

SSE stream. Events: token {text}, done {code}, error {error}. — Server-Sent Events stream. Each message is event: <type>\ndata: <json>\n\n.

Changes

No recorded changes to this operation across all 1 revision of this API.