Checking...
Port 8004
System
GET /health

Health check — returns API status, version, and available endpoints.

Click "Try It" to see the live response
curl -s https://nwc-advisory.com/structuredproducts/api/health | python3 -m json.tool
import requests
r = requests.get("https://nwc-advisory.com/structuredproducts/api/health")
print(r.json())
const res = await fetch("https://nwc-advisory.com/structuredproducts/api/health");
const data = await res.json();
console.log(data);
API 1 — Commodity Momentum Signal
GET /v1/commodity-momentum/signal

Primary signal endpoint. Returns current composite score, regime classification, and all 5 sub-signal scores with weights and contributions.

Click "Try It" to see the live response
curl -s https://nwc-advisory.com/structuredproducts/api/v1/commodity-momentum/signal | python3 -m json.tool
import requests
r = requests.get("https://nwc-advisory.com/structuredproducts/api/v1/commodity-momentum/signal")
data = r.json()
print(f"Regime: {data['regime']} ({data['composite_score']:+.1f})")
for name, sig in data['sub_signals'].items():
    print(f"  {name}: {sig['score']:+.1f} (weight: {sig['weight']:.1%})")
const res = await fetch("https://nwc-advisory.com/structuredproducts/api/v1/commodity-momentum/signal");
const data = await res.json();
console.log(`Regime: ${data.regime} (${data.composite_score})`);
GET /v1/commodity-momentum/history

Historical composite scores for charting. Returns daily scores and regime classifications.

ParameterTypeDefaultDescription
daysint90Number of historical trading days
Click "Try It" to see the live response
curl -s "https://nwc-advisory.com/structuredproducts/api/v1/commodity-momentum/history?days=30" | python3 -m json.tool
import requests
r = requests.get("https://nwc-advisory.com/structuredproducts/api/v1/commodity-momentum/history", params={"days": 30})
for point in r.json()["history"]:
    print(f"{point['date']}: {point['composite']:+.1f} ({point['regime']})")
const res = await fetch("https://nwc-advisory.com/structuredproducts/api/v1/commodity-momentum/history?days=30");
const data = await res.json();
data.history.forEach(p => console.log(`${p.date}: ${p.composite} (${p.regime})`));
API 2 — Trade Corridor Risk Signal
GET /v1/corridor-risk/all

All 4 corridors at once. Returns composite risk scores, sub-signal breakdown, and top-3 historical event analogues for each corridor.

Click "Try It" to see the live response
curl -s https://nwc-advisory.com/structuredproducts/api/v1/corridor-risk/all | python3 -m json.tool
import requests
r = requests.get("https://nwc-advisory.com/structuredproducts/api/v1/corridor-risk/all")
data = r.json()
print(f"Overall Risk: {data['overall_risk_score']:.0f}/100 ({data['overall_risk_level']})")
for key, corr in data["corridors"].items():
    print(f"  {corr['corridor']}: {corr['composite_score']:.0f} ({corr['risk_level']})")
const res = await fetch("https://nwc-advisory.com/structuredproducts/api/v1/corridor-risk/all");
const data = await res.json();
console.log(`Overall: ${data.overall_risk_score} (${data.overall_risk_level})`);
GET /v1/corridor-risk/{corridor_key}

Single corridor deep dive with full sub-signal breakdown and all 12 event analogues ranked by similarity.

ParameterTypeOptionsDescription
corridor_keypathchina_me, china_africa, me_europe, asia_eu_suezCorridor identifier
Click a corridor above to see the live response
curl -s https://nwc-advisory.com/structuredproducts/api/v1/corridor-risk/china_me | python3 -m json.tool
import requests
corridor = "china_me"  # or china_africa, me_europe, asia_eu_suez
r = requests.get(f"https://nwc-advisory.com/structuredproducts/api/v1/corridor-risk/{corridor}")
data = r.json()
print(f"Risk: {data['composite_score']:.0f}/100 ({data['risk_level']})")
print("Top analogues:")
for a in data['top_analogues']:
    print(f"  {a['event']} ({a['year']}): {a['similarity']:.0f}% similar")
const corridor = "china_me";
const res = await fetch(`https://nwc-advisory.com/structuredproducts/api/v1/corridor-risk/${corridor}`);
const data = await res.json();
console.log(`Risk: ${data.composite_score}/100 (${data.risk_level})`);
Reference & Documentation
GET /v1/backtest/summary

Complete backtest results — year-by-year accuracy, variance contributions, LOO impact, and validation metrics.

Click "Try It" to see the live response
GET /v1/methodology

Full methodology documentation — signal construction, weights, data sources, backtest parameters.

Click "Try It" to see the live response