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>
57 lines
1.4 KiB
JSON
57 lines
1.4 KiB
JSON
{
|
|
"arg": {
|
|
"channel": "orders-algo",
|
|
"uid": "77982378738415879",
|
|
"instType": "FUTURES",
|
|
"instId": "BTC-USD-200329"
|
|
},
|
|
"data": [{
|
|
"actualPx": "0",
|
|
"actualSide": "",
|
|
"actualSz": "0",
|
|
"algoClOrdId": "",
|
|
"algoId": "581878926302093312",
|
|
"attachAlgoOrds": [],
|
|
"amendResult": "",
|
|
"cTime": "1685002746818",
|
|
"uTime": "1708679675245",
|
|
"ccy": "",
|
|
"clOrdId": "",
|
|
"closeFraction": "",
|
|
"failCode": "",
|
|
"instId": "BTC-USDC",
|
|
"instType": "SPOT",
|
|
"last": "26174.8",
|
|
"lever": "0",
|
|
"notionalUsd": "11.0",
|
|
"ordId": "",
|
|
"ordIdList": [],
|
|
"ordPx": "",
|
|
"ordType": "conditional",
|
|
"posSide": "",
|
|
"quickMgnType": "",
|
|
"reduceOnly": "false",
|
|
"reqId": "",
|
|
"side": "buy",
|
|
"slOrdPx": "",
|
|
"slTriggerPx": "",
|
|
"slTriggerPxType": "",
|
|
"state": "live",
|
|
"sz": "11",
|
|
"tag": "",
|
|
"tdMode": "cross",
|
|
"tgtCcy": "quote_ccy",
|
|
"tpOrdPx": "-1",
|
|
"tpTriggerPx": "1",
|
|
"tpTriggerPxType": "last",
|
|
"triggerPx": "",
|
|
"triggerTime": "",
|
|
"tradeQuoteCcy": "USDT",
|
|
"amendPxOnTriggerType": "0",
|
|
"linkedOrd":{
|
|
"ordId":"98192973880283"
|
|
},
|
|
"isTradeBorrowMode": ""
|
|
}]
|
|
}
|