ScalpingOdds.com

Historical probability analytics for crypto scalping strategies

API Endpoints

GET /api/stats.php

Returns historical statistics for a given trading symbol.

Parameters:
symbol (required) - Trading pair symbol (e.g., BTCUSDT)
api_key (optional) - Your API key for authenticated access
GET /api/stats.php?symbol=BTCUSDT&api_key=YOUR_KEY

Response:
{
  "symbol": "BTCUSDT",
  "lookback_days": 90,
  "generated_at": "2025-12-04T19:07:58.370507+00:00Z",
  "minute_buckets": [
    {
      "minute_of_day": 540,
      "sample_count": 42,
      "p_green1": 0.52,
      "p_green2": 0.31,
      "p_green3": 0.18,
      "ci_green1": {"lower": 0.38, "upper": 0.66},
      ...
    }
  ]
}

GET /api/health.php

Health check endpoint for monitoring service availability.

GET /api/health.php

Response:
{
  "status": "ok",
  "db": "ok",
  "time": "2025-12-04T12:00:00Z"
}

GET /api/auth_test.php

Test API key validity.

Parameters:
api_key (required) - Your API key to validate
GET /api/auth_test.php?api_key=YOUR_KEY

Response (valid):
{
  "ok": true,
  "subscriber_id": 123,
  "plan": "basic"
}

Response (invalid):
{
  "ok": false
}

Supported Symbols

Currently tracking the following trading pairs:

Error Responses

All API endpoints return structured error responses:

HTTP 400 Bad Request:
{"error": "missing_symbol"}
{"error": "invalid_symbol"}

HTTP 401 Unauthorized:
{"error": "invalid_api_key"}

HTTP 503 Service Unavailable:
{"error": "stats_not_available"}