Aller au contenu principal

API Documentation

All the REST endpoints to integrate StrateForge with your tools.

Authentication

Most endpoints require a Bearer JWT token obtained via Supabase Auth.

Authorization: Bearer <SUPABASE_ACCESS_TOKEN>

Token obtained via supabase.auth.getSession() on the client side, or via the OAuth flow for third-party integrations. TradingView webhooks use a specific token generated on the TradingView Webhooks page.

The /api/v1/* endpoints (public API) use an API key generated on the API Keys page (Pro+ plan).

Authorization: Bearer sf_live_xxxxxxxxxxxx

Rate Limits

  • Public API (marketplace): 120 req/min per IP
  • Public API v1 (API key): 120 req/min per key and per endpoint
  • Authenticated API: 600 req/min per user
  • Backtest: 30 req/min per user
  • TradingView Webhook: 30 req/min per token

Public API v1 (API key)

GET/api/v1/meAccount info + effective planPro+
GET/api/v1/strategiesYour saved strategiesPro+
GET/api/v1/signalsYour signals (filters: symbol, timeframe, action, reason, strategyId)Pro+
GET/api/v1/backtest-runsYour saved backtests (filter: strategyId)Pro+
GET/api/v1/market/barsOHLCV (params: symbol, timeframe, limit, exchange)Pro+

Strategies

GET/api/strategiesLists your saved strategies
POST/api/strategiesCreates a new strategy (JSON definition)
PATCH/api/strategies/:idUpdates an existing strategy
DELETE/api/strategies/:idDeletes a strategy

Backtest

POST/api/backtestRuns a backtest on real history (Binance OHLCV)
GET/api/backtest-runsLists your backtest history
GET/api/backtest-runs/:idDetails of a saved backtest

Signals

GET/api/signalsLists generated signals (filters: symbol, timeframe, action)
POST/api/tv-webhook/:tokenPublic webhook for TradingView (triggers a signal)Pro

Forward Testing

POST/api/forward/toggleEnables/disables forward testing for a strategyPro

Paper Trading

GET/api/paperLists your paper trading configs
POST/api/paperCreates a new paper trading config
GET/api/paper/:id/tradesPaper trade history for a config

Live Trading

GET/api/liveStatus of your live configsElite
POST/api/live/kill-switchImmediately stops live tradingElite

Marketplace

GET/api/marketplaceLists published strategies (public)
GET/api/marketplace/:idDetails of a published strategy
POST/api/marketplace/:id/copyCopies a strategy into your account

Account

GET/api/account/exportGDPR export of all your data (JSON)
GET/api/account/tax-exportTax export CSV (CoinTracking, Koinly)

Versioned public API — available

The /api/v1/* API dedicated to third-party integrations is available (Pro+ plan). Generate a key on the API Keys page, then authenticate with the Authorization header. The key is shown only once, at creation.

curl -H "Authorization: Bearer sf_live_xxxxxxxxxxxx" \
  https://www.strateforge.app/api/v1/strategies