SPB Git forge
1commits 1branches 0releases
189.0 KBsize
maindefault branch
6 h agolast push
Python 54.7% TypeScript 42.5% SQL 1.9%
1.6 KB · 25 lines tsx
Raw Blame History
1import { Card, Empty, PageHeader, Tile } from "@/components/ui";23export default function PaperPage() {4  return (5    <>6      <PageHeader title="Paper Trading" subtitle="Phase 4: strategies run against live Kraken data with a simulated, reconciled ledger. The schema (paper_orders, paper_fills, paper_positions, paper_equity) and the risk gateway already exist." />7      <div className="grid grid-cols-2 gap-3 md:grid-cols-4">8        <Tile label="Virtual equity" value="—" sub="paper engine not started" tone="muted" />9        <Tile label="Open orders" value="—" sub="paper engine not started" tone="muted" />10        <Tile label="Simulated P&L" value="—" sub="fees: taker/maker from TradeVolume" tone="muted" />11        <Tile label="Strategy state" value="—" sub="no runner scheduled" tone="muted" />12      </div>13      <Card title="What the paper engine will do" className="mt-4">14        <ul className="list-disc space-y-1 pl-5 text-xs text-fg-muted">15          <li>Run strategy plugins on closed bars as they arrive; targets execute at the next bar with the live spread and a queue-aware fill model.</li>16          <li>Every order passes the independent risk gateway (same code as backtests); rejected intents are audited.</li>17          <li>Ledger reconciliation against the simulated exchange state on every fill; mismatches trip the circuit breaker.</li>18          <li>Real-time positions, orders, fills and equity curve on this page via the SSE relay.</li>19        </ul>20      </Card>21      <Card title="Positions" className="mt-4"><Empty title="No paper positions">Nothing has traded; the paper runner is not implemented yet.</Empty></Card>22    </>23  );24}25