Aller au contenu
GET /v1/basket

Trade-weighted index normalised to 100

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/currencyindex-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/currencyindex-api/v1/basket" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/currencyindex-api/v1/basket", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/currencyindex-api/v1/basket");
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/currencyindex-api/v1/basket",
    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": {
        "legs": [
            {
                "base": 1.1,
                "ratio": 0.98181818,
                "weight": 0.5,
                "current": 1.08
            },
            {
                "base": 148,
                "ratio": 1.01351351,
                "weight": 0.5,
                "current": 150
            }
        ],
        "note": "Trade-weighted index normalised to 100 = 100 x product((current/base)^(weight/total_weight)). Above 100 = the indexed currency strengthened vs the basket.",
        "value": 99.754,
        "source": "CURRENCY-INDEX",
        "direction": "weaker",
        "base_value": 100,
        "change_pct": -0.246,
        "components": 2
    },
    "meta": {
        "timestamp": "2026-06-11T07:49:21.453Z",
        "request_id": "fd9df245-7281-4a43-aaee-625d528c90ad"
    },
    "status": "ok",
    "message": "Basket index computed",
    "success": true
}