import type { Position } from "../lib/alpaca"; import { money, num, pct } from "../lib/format"; export function PositionsTable({ positions }: { positions: Position[] }) { if (!positions.length) { return (
| Symbol | Class | Qty | Entry | Mark | Market value | P&L | % |
|---|---|---|---|---|---|---|---|
| {p.symbol} | {isOpt ? "opt" : "eq"} ยท {p.side || "long"} | {num(p.qty, 0)} | {money(p.avg_entry_price)} | {money(p.current_price)} | {money(p.market_value)} | {money(pl, { sign: true })} | {pct(plpc)} |