Aller au contenu
GET /v1/stats

Period statistics from the history

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/stockhistory-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/stockhistory-api/v1/stats" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/stockhistory-api/v1/stats", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/stockhistory-api/v1/stats");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/stockhistory-api/v1/stats",
    headers={"x-oanor-key": "oanor_test_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "to": "2026-06-13",
        "from": "2025-06-11",
        "range": "1y",
        "source": "Nasdaq",
        "symbol": "AAPL",
        "company": "Apple Inc. Common Stock",
        "period_low": 195.07,
        "first_close": 198.78,
        "period_high": 317.4,
        "latest_close": 295.63,
        "trading_days": 252,
        "avg_daily_volume": 49699215,
        "period_return_pct": 48.72,
        "annualized_volatility_pct": 22.52
    },
    "meta": {
        "timestamp": "2026-06-12T01:42:16.400Z",
        "request_id": "27e63fff-15ea-4277-a4ab-ad9c9a451c60"
    },
    "status": "ok",
    "message": "Stats retrieved successfully",
    "success": true
}