Aller au contenu
GET /v1/drawdown

Worst & current drawdown

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/cryptorisk-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/cryptorisk-api/v1/drawdown" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/cryptorisk-api/v1/drawdown", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/cryptorisk-api/v1/drawdown");
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/cryptorisk-api/v1/drawdown",
    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": {
        "coin": "BTC",
        "note": "max_drawdown_pct is the worst peak-to-trough decline over the window; current_drawdown_pct is how far the last close sits below the window high. Indices count days from the window start.",
        "source": "Binance",
        "last_close": 63354.69,
        "peak_index": 116,
        "window_days": 365,
        "observations": 366,
        "trough_index": 359,
        "all_time_high": 124658.54,
        "max_drawdown_pct": -51.16,
        "current_drawdown_pct": -49.18,
        "drawdown_length_days": 243
    },
    "meta": {
        "timestamp": "2026-06-12T01:41:05.666Z",
        "request_id": "643f4485-ef1f-436a-9df3-25c4e4ee368d"
    },
    "status": "ok",
    "message": "Drawdown retrieved successfully",
    "success": true
}