curl https://api.aioka.io/v1/ghost/regime-performance
import httpx
resp = httpx.get("https://api.aioka.io/v1/ghost/regime-performance")
for row in resp.json()["regimes"]:
print(f"{row['regime']:<22} trades={row['trades']:>3} "
f"win_rate={row['win_rate'] * 100:5.1f}% "
f"pnl=${row['total_pnl']:>8.2f}")
export const revalidate = 300; // ISR — W-1 compliant
export default async function Page() {
const data = await fetch(
"https://api.aioka.io/v1/ghost/regime-performance",
{ next: { revalidate: 300 } },
).then(r => r.json());
return <RegimeChart data={data} />;
}
{
"regimes": [
{
"regime": "BULL_TRENDING",
"trades": 12,
"wins": 10,
"losses": 2,
"win_rate": 0.833,
"avg_pnl_pct": 1.24,
"total_pnl": 847.50
},
{
"regime": "WHALE_ACCUMULATION",
"trades": 4,
"wins": 3,
"losses": 1,
"win_rate": 0.75,
"avg_pnl_pct": 0.92,
"total_pnl": 312.10
},
{
"regime": "SAFE_HAVEN_DEMAND",
"trades": 2,
"wins": 2,
"losses": 0,
"win_rate": 1.0,
"avg_pnl_pct": 1.85,
"total_pnl": 124.40
}
],
"total_trades": 18,
"assets_included": ["BTC", "ETH", "SOL", "ADA", "TAO", "GOLD", "EURUSD"],
"since": "2026-04-12",
"generated_at": "2026-05-13T10:00:00Z",
"cached": false,
"cache_ttl_seconds": 300
}
Public
Performance by Regime (Multi-Asset)
Ghost Trader win rate and P&L aggregated by market regime across all 7 councils
GET
/
v1
/
ghost
/
regime-performance
curl https://api.aioka.io/v1/ghost/regime-performance
import httpx
resp = httpx.get("https://api.aioka.io/v1/ghost/regime-performance")
for row in resp.json()["regimes"]:
print(f"{row['regime']:<22} trades={row['trades']:>3} "
f"win_rate={row['win_rate'] * 100:5.1f}% "
f"pnl=${row['total_pnl']:>8.2f}")
export const revalidate = 300; // ISR — W-1 compliant
export default async function Page() {
const data = await fetch(
"https://api.aioka.io/v1/ghost/regime-performance",
{ next: { revalidate: 300 } },
).then(r => r.json());
return <RegimeChart data={data} />;
}
{
"regimes": [
{
"regime": "BULL_TRENDING",
"trades": 12,
"wins": 10,
"losses": 2,
"win_rate": 0.833,
"avg_pnl_pct": 1.24,
"total_pnl": 847.50
},
{
"regime": "WHALE_ACCUMULATION",
"trades": 4,
"wins": 3,
"losses": 1,
"win_rate": 0.75,
"avg_pnl_pct": 0.92,
"total_pnl": 312.10
},
{
"regime": "SAFE_HAVEN_DEMAND",
"trades": 2,
"wins": 2,
"losses": 0,
"win_rate": 1.0,
"avg_pnl_pct": 1.85,
"total_pnl": 124.40
}
],
"total_trades": 18,
"assets_included": ["BTC", "ETH", "SOL", "ADA", "TAO", "GOLD", "EURUSD"],
"since": "2026-04-12",
"generated_at": "2026-05-13T10:00:00Z",
"cached": false,
"cache_ttl_seconds": 300
}
Overview
Returns Ghost Trader performance aggregated by market regime across all 7 councils — BTC, ETH, SOL, ADA, TAO, Gold, EUR/USD. Each validated closed trade carries the regime label that was persisted at entry time; the endpoint UNIONs every per-asset table and groups by regime so the aioka.io “Performance by Regime” widget can paint a single chart spanning the whole system. Tier: Public ✅ — No API key required Cache TTL: 300 seconds (5 min) Rate limit: 60 calls / IP / minuteOnly validated closed trades with a non-NULL regime are counted. Legacy
rows that lack a regime label simply do not appear in any bucket — they do
not break the response. Each asset writes its own native regime: BTC /
ETH / SOL / ADA / TAO read from
regime_history; Gold writes Gold-native
regimes (SAFE_HAVEN_DEMAND, INFLATION_HEDGE, …) via its dedicated
detector; EUR/USD writes the same way.Response Fields
| Field | Type | Description |
|---|---|---|
regimes | array | Per-regime rows, sorted by trades DESC, then win_rate DESC |
total_trades | integer | Sum of trades across all regimes (excludes NULL-regime trades) |
assets_included | array of strings | Asset tables that contributed (["BTC","ETH","SOL","ADA","TAO","GOLD","EURUSD"]) |
since | string | Clean-slate cutoff date ("2026-04-12") |
generated_at | string | UTC ISO timestamp |
cached | boolean | Whether response was served from cache |
cache_ttl_seconds | integer | Cache TTL |
Per-regime row
| Field | Type | Description |
|---|---|---|
regime | string | Regime label (e.g. BULL_TRENDING, SAFE_HAVEN_DEMAND) |
trades | integer | Total trades closed in this regime |
wins | integer | Trades with pnl > 0 |
losses | integer | Trades with pnl <= 0 |
win_rate | float | Fraction 0.0–1.0 (e.g. 0.833 = 83.3%) |
avg_pnl_pct | float | Mean PnL per trade as percentage points (1.24 = +1.24%) |
total_pnl | float | Cumulative USD PnL within this regime |
win_rate is a fraction (0.0–1.0), not a percentage (0–100). Multiply by
100 for display. This differs from /v1/regime/stats which returns the
percentage form for BTC-only.curl https://api.aioka.io/v1/ghost/regime-performance
import httpx
resp = httpx.get("https://api.aioka.io/v1/ghost/regime-performance")
for row in resp.json()["regimes"]:
print(f"{row['regime']:<22} trades={row['trades']:>3} "
f"win_rate={row['win_rate'] * 100:5.1f}% "
f"pnl=${row['total_pnl']:>8.2f}")
export const revalidate = 300; // ISR — W-1 compliant
export default async function Page() {
const data = await fetch(
"https://api.aioka.io/v1/ghost/regime-performance",
{ next: { revalidate: 300 } },
).then(r => r.json());
return <RegimeChart data={data} />;
}
{
"regimes": [
{
"regime": "BULL_TRENDING",
"trades": 12,
"wins": 10,
"losses": 2,
"win_rate": 0.833,
"avg_pnl_pct": 1.24,
"total_pnl": 847.50
},
{
"regime": "WHALE_ACCUMULATION",
"trades": 4,
"wins": 3,
"losses": 1,
"win_rate": 0.75,
"avg_pnl_pct": 0.92,
"total_pnl": 312.10
},
{
"regime": "SAFE_HAVEN_DEMAND",
"trades": 2,
"wins": 2,
"losses": 0,
"win_rate": 1.0,
"avg_pnl_pct": 1.85,
"total_pnl": 124.40
}
],
"total_trades": 18,
"assets_included": ["BTC", "ETH", "SOL", "ADA", "TAO", "GOLD", "EURUSD"],
"since": "2026-04-12",
"generated_at": "2026-05-13T10:00:00Z",
"cached": false,
"cache_ttl_seconds": 300
}