Phase 3 needs books the bot can trust before any strategy trades. This adds: - schema 0003: executions, order events, trades, residues, account status, reconciliations, capital changes, applied corporate actions, simulator books; - the broker interface with the internal simulator and the Alpaca paper and OKX demo adapters, all behind the live guard (SPEC 2.2); - the append-only ledger with lots, trades from zero to zero, residues, dividends, splits and reversals; capital entrusted per broker and equity photographs with time-weighted return and FX effect; - the order manager (chasing limit, pacing, sells never abandoned, server stops, breached-stop rule) and the reconciler with prudent mode; - the trading service wired into the host, off in demo mode and in tests. Ids made with one clock in the same millisecond now carry a counter (RFC 9562 method 1): two lots of one order kept a random order, which broke LIFO. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
514 B
JSON
21 lines
514 B
JSON
{
|
|
"asset_class": "us_equity",
|
|
"asset_id": "904837e3-3b76-47ec-b432-046db621571b",
|
|
"asset_marginable": true,
|
|
"avg_entry_price": "100.0",
|
|
"change_today": "0.0084",
|
|
"cost_basis": "500.0",
|
|
"current_price": "120.0",
|
|
"exchange": "NASDAQ",
|
|
"lastday_price": "119.0",
|
|
"market_value": "600.0",
|
|
"qty": "5",
|
|
"qty_available": "4",
|
|
"side": "long",
|
|
"symbol": "AAPL",
|
|
"unrealized_intraday_pl": "10.0",
|
|
"unrealized_intraday_plpc": "0.0084",
|
|
"unrealized_pl": "100.0",
|
|
"unrealized_plpc": "0.20"
|
|
}
|