/v1/pair
One pair's correlations ranked into co-movers and hedges
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/fxcorrelation-api/v1/pair" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/fxcorrelation-api/v1/pair", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/fxcorrelation-api/v1/pair");
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/fxcorrelation-api/v1/pair",
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": {
"name": "Euro / US Dollar",
"note": "Correlation of EURUSD to every other pair over window_days of daily log returns. most_correlated move with it (avoid stacking); best_hedges are the most negatively correlated (genuine diversifiers / hedges). Read fresh per call, nothing cached.",
"pair": "EURUSD",
"source": "Yahoo Finance",
"best_hedges": [
{
"name": "US Dollar / Swiss Franc",
"pair": "USDCHF",
"correlation": -0.831,
"observations": 60
},
{
"name": "US Dollar / Mexican Peso",
"pair": "USDMXN",
"correlation": -0.829,
"observations": 60
},
{
"name": "US Dollar / Canadian Dollar",
"pair": "USDCAD",
"correlation": -0.628,
"observations": 60
}
],
"window_days": 60,
"correlations": [
{
"name": "British Pound / US Dollar",
"pair": "GBPUSD",
"correlation": 0.888,
"observations": 60
},
{
"name": "Australian Dollar / US Dollar",
"pair": "AUDUSD",
"correlation": 0.871,
"observations": 60
},
{
"name": "New Zealand Dollar / US Dollar",
"pair": "NZDUSD",
"correlation": 0.807,
"observations": 60
},
{
"name": "Australian Dollar / Japanese Yen",
"pair": "AUDJPY",
"correlation": 0.631,
"observations": 60
},
{
"name": "British Pound / Japanese Yen",
"pair": "GBPJPY",
"correlation": 0.429,
"observations": 60
},
{
"name": "Euro / Japanese Yen",
"pair": "EURJPY",
"correlation": 0.353,
"observations": 60
},
{
"name": "Euro / Swiss Franc",
"pair": "EURCHF",
"correlation": 0.014,
"observations": 60
},
{
"name": "Euro / British Pound",
"pair": "EURGBP",
"correlation": -0.161,
"observations": 60
},
{
"name": "US Dollar / Chinese Yuan",
"pair": "USDCNY",
"correlation": -0.401,
"observations": 60
},
{
"name": "US Dollar / Japanese Yen",
"pair": "USDJPY",
"correlation": -0.607,
"observations": 60
},
{
"name": "US Dollar / Canadian Dollar",
…