Live · v1

Trading Intelligence API

REST endpoints for trading signals, AI chart analysis, and portfolio insights — covering equities, crypto, forex, and commodities. Authenticated by API key, rate-limited per key, with webhook delivery for new signals.

Base URL
https://tradeai.smartchain.consulting/api/public/v1
Auth
Bearer token (tsk_live_…)
Rate limit
60 requests / minute per key

Step 1 — Generate an API key

Sign in, open API Keys, click Create key, and copy the secret (shown once). Send it on every request as Authorization: Bearer tsk_live_….

Step 2 — Make your first call

curl https://tradeai.smartchain.consulting/api/public/v1/health \
  -H "Authorization: Bearer tsk_live_xxx"

Every response includes X-RateLimit-Limit and X-RateLimit-Remaining headers. A 429means you've hit the cap — back off and retry.

Step 3 — Endpoints & data you can get

📈 Curated trading signals (admin-published)

Hand-vetted setups published by our analysts and shared with the whole community. Low frequency, high quality. Filter by symbol, asset class, or side.

GET /signals?asset_class=crypto&side=long&limit=20
GET /signals/{id}

# Response includes "source": "curated" on every row.
# Fields: id, symbol, exchange, asset_class, side, entry, stop,
# targets[], confidence, rationale, generated_at

🤖 On-demand AI signals (per request)

You pick the symbol(s) — we pull live OHLCV from our market-data layer, compute indicators, and ask the AI for a fresh trade setup. Use this when the curated feed doesn't cover what you're trading. Each call counts against your API quota.

POST /signals/generate
{
  "symbols": ["BTC/USD", "ETH/USD"],   // or "symbol": "AAPL"
  "asset_class": "crypto",
  "timeframe": "1Hour"                  // optional, default 1Hour
}

# Returns { "signals": [...] }, each with:
# source: "ai", symbol, side, entry, stop, targets[],
# confidence, bias, rationale, risks[], indicators, summary

🖼️ AI chart analysis — from a screenshot

POST a base64 chart image. Get structured trend, support/resistance, patterns, and a trade plan back.

POST /charts/analyze-image
{
  "image": "data:image/png;base64,iVBORw0...",
  "symbol": "BTCUSD",
  "timeframe": "4h",
  "notes": "looking for breakout"
}

📊 AI chart analysis — from a symbol

We pull live OHLCV, compute indicators (RSI, MACD, EMAs, ATR), and return AI-generated technical analysis. Works for equities, crypto, and forex.

Markets covered: US equities (NYSE, Nasdaq, AMEX) are real-time via our primary feed. International equities — LSE, XETRA, Euronext, SIX, TSE, HKEX, NSE/BSE, KRX, ASX, TSX, B3 and others — are supported via our global feed using a TICKER.EXCHANGE suffix (e.g. BMW.DE,7203.T, RELIANCE.NSE); real-time vs delayed depends on the active data entitlement.

POST /charts/analyze-symbol
{
  "symbol": "AAPL",
  "asset_class": "equities",
  "timeframe": "1Hour"  // 1Min | 5Min | 15Min | 1Hour | 1Day
}

💼 Portfolio summary

Send your holdings, get total value, P&L, and allocation by asset class — priced in real time.

POST /portfolio/summary
{
  "holdings": [
    { "symbol": "AAPL", "asset_class": "equities", "quantity": 10, "cost_basis": 150 },
    { "symbol": "BTCUSD", "asset_class": "crypto",   "quantity": 0.25, "cost_basis": 42000 },
    { "symbol": "EURUSD", "asset_class": "forex",    "quantity": 10000, "cost_basis": 1.07 }
  ]
}

🧠 Portfolio AI insights

Same payload as summary. Returns AI-generated risk, diversification, and rebalancing recommendations.

POST /portfolio/insights

📟 Usage

GET /usage
# → { month, requests, limit, reset_at }

Step 4 — Real-time webhooks

Subscribe at /webhooks to receive signal.created events the moment a new signal is published. Each delivery is signed with X-Signal-Signature (HMAC-SHA256) — verify before trusting the payload.

Full reference

The complete OpenAPI spec — with every parameter, response shape, and error code — is at /docs (interactive) or /api/public/v1/openapi (raw JSON).