/v1/sector
One sector correlations to all others, ranked, with beta to S&P 500
Provalo dal vivo
10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.
Funziona. Prendi una chiave API e usala nel tuo progetto.
Ottieni una chiave APIFrammenti di codice
curl "https://api.oanor.com/sectorcorrelation-api/v1/sector" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/sectorcorrelation-api/v1/sector", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/sectorcorrelation-api/v1/sector");
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/sectorcorrelation-api/v1/sector",
headers={"x-oanor-key": "oanor_test_..."}
)
Risposta di esempio
Una risposta reale di questo endpoint, acquisita dall'ultimo health check.
{
"data": {
"to": "2026-06-11",
"from": "2026-02-02",
"name": "Technology",
"note": "One sector's correlation to every other sector, ranked, plus its beta to the S&P 500 (beta > 1 amplifies market moves; a defensive sector is < 1). best_diversifiers are the least-correlated sectors.",
"sector": "technology",
"source": "Yahoo Finance",
"window_days": 90,
"correlations": [
{
"key": "consumer_discretionary",
"name": "Consumer Discretionary",
"correlation": 0.629
},
{
"key": "industrials",
"name": "Industrials",
"correlation": 0.526
},
{
"key": "communication",
"name": "Communication Services",
"correlation": 0.458
},
{
"key": "materials",
"name": "Materials",
"correlation": 0.446
},
{
"key": "financials",
"name": "Financials",
"correlation": 0.351
},
{
"key": "health_care",
"name": "Health Care",
"correlation": 0.087
},
{
"key": "real_estate",
"name": "Real Estate",
"correlation": 0.082
},
{
"key": "utilities",
"name": "Utilities",
"correlation": -0.131
},
{
"key": "energy",
"name": "Energy",
"correlation": -0.221
},
{
"key": "consumer_staples",
"name": "Consumer Staples",
"correlation": -0.261
}
],
"observations": 90,
"beta_to_sp500": 1.733,
"best_diversifiers": [
{
"key": "consumer_staples",
"name": "Consumer Staples",
"correlation": -0.261
},
{
"key": "energy",
"name": "Energy",
"correlation": -0.221
},
{
"key": "utilities",
"name": "Utilities",
"correlation": -0.131
}
]
},
"meta": {
"timestamp": "2026-06-12T10:35:13.145Z",
"request_id": "fd7fe134-d930-4fb3-ad96-108c6c8904a2"
},
"status": "ok",
"message": "Sector retrieved successfully",
"success": true
}