← Back to Dashboard

API Documentation

Programmatic access to Saxon Trading Signals data and analysis.

Authentication

All API requests require an API key passed via the x-api-key header. Include it in every request:

curl "https://saxontradingsignals.com/api/signals" \
  -H "x-api-key: YOUR_API_KEY"

Requests without a valid API key will receive a 401 Unauthorized response.

Endpoints

GET/api/signals

List signals with optional filters. Returns all signals for the given date, or across a date range. Filter by signal type.

Parameters

ParameterTypeDescription
datestringFilter by date (YYYY-MM-DD). Defaults to today.
signalstringFilter by signal type: BUY, SELL, or HOLD.
fromstringStart of date range (YYYY-MM-DD).
tostringEnd of date range (YYYY-MM-DD).

Example Request

curl "https://saxontradingsignals.com/api/signals?date=2026-04-06&signal=BUY" \
  -H "x-api-key: YOUR_KEY"

Example Response

[
  {
    "symbol": "AAPL",
    "signal": "BUY",
    "score": 4,
    "rsi": 42.3,
    "macd_histogram": 0.85,
    "date": "2026-04-06"
  }
]
GET/api/signals/{symbol}

Get historical signals for a specific symbol over the last 90 days.

Example Request

curl "https://saxontradingsignals.com/api/signals/AAPL" \
  -H "x-api-key: YOUR_KEY"

Example Response

[
  {
    "symbol": "AAPL",
    "signal": "BUY",
    "score": 4,
    "rsi": 42.3,
    "date": "2026-04-06"
  },
  {
    "symbol": "AAPL",
    "signal": "HOLD",
    "score": 3,
    "rsi": 50.1,
    "date": "2026-04-05"
  }
]
GET/api/stock/{symbol}

Get the current signal and price data for a specific stock.

Example Request

curl "https://saxontradingsignals.com/api/stock/AAPL" \
  -H "x-api-key: YOUR_KEY"

Example Response

{
  "symbol": "AAPL",
  "signal": "BUY",
  "score": 4,
  "price": 198.45,
  "rsi": 42.3,
  "macd_histogram": 0.85,
  "ma50": 192.10,
  "ma200": 185.30,
  "volume_ratio": 1.25
}
POST/api/stock/{symbol}/analyze

Run AI-powered analysis on a stock using the provided indicator data. Returns a narrative analysis with buy/sell reasoning.

Rate limited: 10 requests per minute

Request Body

{
  "signal": "BUY",
  "score": 4,
  "rsi": 42.3,
  "macd_histogram": 0.85,
  "ma50": 192.10,
  "ma200": 185.30,
  "volume_ratio": 1.25,
  "relative_strength": 0.8
}

Example Request

curl -X POST "https://saxontradingsignals.com/api/stock/AAPL/analyze" \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "signal": "BUY",
    "score": 4,
    "rsi": 42.3,
    "macd_histogram": 0.85,
    "ma50": 192.10,
    "ma200": 185.30,
    "volume_ratio": 1.25,
    "relative_strength": 0.8
  }'

Example Response

{
  "analysis": "AAPL is showing strong bullish momentum with RSI at 42.3 indicating room for upside. The MACD histogram is positive at 0.85, confirming upward momentum. Price is above both the 50-day and 200-day moving averages, suggesting a healthy uptrend...",
  "generated_at": "2026-04-06T14:30:00Z"
}
GET/api/watchlist

List all items on your watchlist.

Example Request

curl "https://saxontradingsignals.com/api/watchlist" \
  -H "x-api-key: YOUR_KEY"

Example Response

[
  {
    "symbol": "AAPL",
    "added_at": "2026-04-01T10:00:00Z",
    "signal": "BUY",
    "score": 4
  }
]
GET/api/performance

Get backtesting performance statistics for all signals.

Example Request

curl "https://saxontradingsignals.com/api/performance" \
  -H "x-api-key: YOUR_KEY"

Example Response

{
  "total_signals": 1250,
  "accuracy": 0.68,
  "avg_return_buy": 0.032,
  "avg_return_sell": -0.018,
  "sharpe_ratio": 1.45,
  "period": "2025-01-01 to 2026-04-06"
}
GET/api/export

Export signals in JSON or CSV format for a given date.

Parameters

ParameterTypeDescription
formatstringExport format: json or csv. Defaults to json.
datestringDate to export (YYYY-MM-DD). Defaults to today.

Example Request

curl "https://saxontradingsignals.com/api/export?format=json&date=2026-04-06" \
  -H "x-api-key: YOUR_KEY"

Example Response

[
  {
    "symbol": "AAPL",
    "signal": "BUY",
    "score": 4,
    "rsi": 42.3,
    "date": "2026-04-06"
  }
]