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>
35 lines
912 B
JSON
35 lines
912 B
JSON
{
|
|
"code": "0",
|
|
"data": [
|
|
{
|
|
"side": "buy",
|
|
"fillSz": "0.00192834",
|
|
"fillPx": "51858",
|
|
"fillPxVol": "",
|
|
"fillFwdPx": "",
|
|
"fee": "-0.00000192834",
|
|
"fillPnl": "0",
|
|
"ordId": "680800019749904384",
|
|
"feeRate": "-0.001",
|
|
"instType": "SPOT",
|
|
"fillPxUsd": "",
|
|
"instId": "BTC-USDT",
|
|
"clOrdId": "",
|
|
"posSide": "net",
|
|
"billId": "680800019754098688",
|
|
"subType": "1",
|
|
"fillMarkVol": "",
|
|
"tag": "",
|
|
"fillTime": "1708587373361",
|
|
"execType": "T",
|
|
"fillIdxPx": "",
|
|
"tradeId": "744876980",
|
|
"fillMarkPx": "",
|
|
"feeCcy": "BTC",
|
|
"ts": "1708587373362",
|
|
"tradeQuoteCcy": "USDT"
|
|
}
|
|
],
|
|
"msg": ""
|
|
}
|