curl https://api.aioka.io/v1/ghost/track-record
import httpx
resp = httpx.get("https://api.aioka.io/v1/ghost/track-record")
data = resp.json()
print(f"{data['validatedTrades']} validated trades — mode: {data['tradingMode']}")
print(f"Win rate: {data['winRate']}% | Total P&L: ${data['totalPnlUsd']:.2f}")
for t in data["trades"]:
print(f" {t['id']} {t['result']} ${t['pnlUsd']:+.2f} ({t['holdTimeMinutes']}m)")
{
"validatedTrades": 1,
"tradingMode": "LIVE",
"winRate": 100.0,
"totalPnlUsd": 795.28,
"avgHoldTimeMinutes": 1470.0,
"bestTradeUsd": 795.28,
"worstTradeUsd": 0.0,
"avgPnlPerTrade": 795.28,
"since": "2026-04-12",
"trades": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"entryTime": "2026-04-12T20:00:00+00:00",
"exitTime": "2026-04-13T20:30:00+00:00",
"entryPrice": 71070.60,
"exitPrice": 73329.50,
"holdTimeMinutes": 1470,
"pnlUsd": 795.28,
"pnlPercent": 3.18,
"result": "WIN",
"mode": "A",
"tp1Hit": true,
"exitReason": "TP2 (Final Exit — Remaining 50%)",
"entryConditions": {
"councilVerdict": "BUY",
"rsi": 35.44,
"emaDistance": 0.6577,
"confidence": 0.82
}
}
],
"equityCurve": [
{
"date": "2026-04-13T20:30:00+00:00",
"cumulativePnl": 795.28,
"tradeId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"result": "WIN"
}
]
}
Public
Ghost Trader Track Record
Full validated trade history with per-trade detail, aggregates, and equity curve
GET
/
v1
/
ghost
/
track-record
curl https://api.aioka.io/v1/ghost/track-record
import httpx
resp = httpx.get("https://api.aioka.io/v1/ghost/track-record")
data = resp.json()
print(f"{data['validatedTrades']} validated trades — mode: {data['tradingMode']}")
print(f"Win rate: {data['winRate']}% | Total P&L: ${data['totalPnlUsd']:.2f}")
for t in data["trades"]:
print(f" {t['id']} {t['result']} ${t['pnlUsd']:+.2f} ({t['holdTimeMinutes']}m)")
{
"validatedTrades": 1,
"tradingMode": "LIVE",
"winRate": 100.0,
"totalPnlUsd": 795.28,
"avgHoldTimeMinutes": 1470.0,
"bestTradeUsd": 795.28,
"worstTradeUsd": 0.0,
"avgPnlPerTrade": 795.28,
"since": "2026-04-12",
"trades": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"entryTime": "2026-04-12T20:00:00+00:00",
"exitTime": "2026-04-13T20:30:00+00:00",
"entryPrice": 71070.60,
"exitPrice": 73329.50,
"holdTimeMinutes": 1470,
"pnlUsd": 795.28,
"pnlPercent": 3.18,
"result": "WIN",
"mode": "A",
"tp1Hit": true,
"exitReason": "TP2 (Final Exit — Remaining 50%)",
"entryConditions": {
"councilVerdict": "BUY",
"rsi": 35.44,
"emaDistance": 0.6577,
"confidence": 0.82
}
}
],
"equityCurve": [
{
"date": "2026-04-13T20:30:00+00:00",
"cumulativePnl": 795.28,
"tradeId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"result": "WIN"
}
]
}
Overview
Returns the complete Ghost Trader track record since the Sprint 164 clean-slate restart (2026-04-12 17:55 UTC). Powers the aioka.io/track-record page. Every field is JSON-encoded in camelCase to match the website TypeScript interface one-for-one. Only trades withis_valid = true and status = 'CLOSED' are included. Backfilled,
synthetic, and open trades are excluded. /v1/ghost/stats remains the lightweight
5-field homepage widget endpoint — this endpoint is the full-history counterpart.
Tier: Public ✅ — No API key required
Cache: 300s (Redis)
Rate limit: None
Response Fields — Aggregates
| Field | Type | Description |
|---|---|---|
validatedTrades | integer | Number of closed validated trades in the history |
tradingMode | string | "LIVE" once any trade has a real Kraken fill, otherwise "PAPER" |
winRate | float | Percentage of validated closed trades that were profitable (0.0–100.0) |
totalPnlUsd | float | Sum of P&L (USD) across all validated closed trades |
avgHoldTimeMinutes | float | Mean hold duration across all validated trades |
bestTradeUsd | float | Best single-trade P&L |
worstTradeUsd | float | Worst single-trade P&L |
avgPnlPerTrade | float | Mean P&L per trade |
since | string | Track record restart date ("2026-04-12") |
trades | array | Per-trade detail (see below) |
equityCurve | array | Cumulative P&L points for charting |
Response Fields — Each Trade
| Field | Type | Description |
|---|---|---|
id | string | Trade UUID |
entryTime | string (ISO 8601) | UTC entry timestamp |
exitTime | string (ISO 8601) | UTC exit timestamp |
entryPrice | float | BTC price at entry (USD) |
exitPrice | float | BTC price at exit (USD) |
holdTimeMinutes | integer | Trade duration in minutes |
pnlUsd | float | Total trade P&L including TP1 partial |
pnlPercent | float | Percentage move from entry to exit |
result | string | "WIN" or "LOSS" |
mode | string | Entry mode — "A", "B", or "C" |
tp1Hit | boolean | Whether TP1 fired during the trade |
exitReason | string | Human-readable exit cause ("TP2 (Final Exit — Remaining 50%)", "TSL", "Stop Loss", etc.) |
entryConditions | object | null | Entry snapshot — councilVerdict, rsi, emaDistance, confidence |
Response Fields — Equity Curve Point
| Field | Type | Description |
|---|---|---|
date | string | Exit timestamp for this point |
cumulativePnl | float | Running total P&L up to and including this trade |
tradeId | string | null | Trade UUID for cross-reference |
result | string | null | "WIN" or "LOSS" |
P&L accounting includes both the TP1 partial close and the final exit. A trade where
TP1 locked +670andtheremaining50268 reports
pnlUsd = 401.35.curl https://api.aioka.io/v1/ghost/track-record
import httpx
resp = httpx.get("https://api.aioka.io/v1/ghost/track-record")
data = resp.json()
print(f"{data['validatedTrades']} validated trades — mode: {data['tradingMode']}")
print(f"Win rate: {data['winRate']}% | Total P&L: ${data['totalPnlUsd']:.2f}")
for t in data["trades"]:
print(f" {t['id']} {t['result']} ${t['pnlUsd']:+.2f} ({t['holdTimeMinutes']}m)")
{
"validatedTrades": 1,
"tradingMode": "LIVE",
"winRate": 100.0,
"totalPnlUsd": 795.28,
"avgHoldTimeMinutes": 1470.0,
"bestTradeUsd": 795.28,
"worstTradeUsd": 0.0,
"avgPnlPerTrade": 795.28,
"since": "2026-04-12",
"trades": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"entryTime": "2026-04-12T20:00:00+00:00",
"exitTime": "2026-04-13T20:30:00+00:00",
"entryPrice": 71070.60,
"exitPrice": 73329.50,
"holdTimeMinutes": 1470,
"pnlUsd": 795.28,
"pnlPercent": 3.18,
"result": "WIN",
"mode": "A",
"tp1Hit": true,
"exitReason": "TP2 (Final Exit — Remaining 50%)",
"entryConditions": {
"councilVerdict": "BUY",
"rsi": 35.44,
"emaDistance": 0.6577,
"confidence": 0.82
}
}
],
"equityCurve": [
{
"date": "2026-04-13T20:30:00+00:00",
"cumulativePnl": 795.28,
"tradeId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"result": "WIN"
}
]
}
Response
200 - application/json
Full validated track record
Show child attributes
Show child attributes
Show child attributes
Show child attributes