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>
This commit is contained in:
1 parent
74d4c4fa6f
commit
1419457fe4
50 files changed
+7327
-5
No files matched your search
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"code": "0",
|
||||
"data": [
|
||||
{
|
||||
"activePx": "",
|
||||
"actualPx": "",
|
||||
"actualSide": "",
|
||||
"actualSz": "0",
|
||||
"algoClOrdId": "",
|
||||
"algoId": "1753184812254216192",
|
||||
"amendPxOnTriggerType": "0",
|
||||
"attachAlgoOrds": [],
|
||||
"cTime": "1724751378980",
|
||||
"callbackRatio": "",
|
||||
"callbackSpread": "",
|
||||
"ccy": "",
|
||||
"chaseType": "",
|
||||
"chaseVal": "",
|
||||
"clOrdId": "",
|
||||
"closeFraction": "",
|
||||
"failCode": "0",
|
||||
"instId": "BTC-USDT",
|
||||
"instType": "SPOT",
|
||||
"isTradeBorrowMode": "",
|
||||
"last": "62916.5",
|
||||
"lever": "",
|
||||
"linkedOrd": {
|
||||
"ordId": ""
|
||||
},
|
||||
"maxChaseType": "",
|
||||
"maxChaseVal": "",
|
||||
"moveTriggerPx": "",
|
||||
"ordId": "",
|
||||
"ordIdList": [],
|
||||
"ordPx": "",
|
||||
"ordType": "conditional",
|
||||
"posSide": "net",
|
||||
"pxLimit": "",
|
||||
"pxSpread": "",
|
||||
"pxVar": "",
|
||||
"quickMgnType": "",
|
||||
"reduceOnly": "false",
|
||||
"side": "buy",
|
||||
"slOrdPx": "",
|
||||
"slTriggerPx": "",
|
||||
"slTriggerPxType": "",
|
||||
"state": "live",
|
||||
"sz": "10",
|
||||
"szLimit": "",
|
||||
"tag": "",
|
||||
"tdMode": "cash",
|
||||
"tgtCcy": "quote_ccy",
|
||||
"timeInterval": "",
|
||||
"tpOrdPx": "-1",
|
||||
"tpTriggerPx": "10000",
|
||||
"tpTriggerPxType": "last",
|
||||
"triggerPx": "",
|
||||
"triggerPxType": "",
|
||||
"triggerTime": "",
|
||||
"tradeQuoteCcy": "USDT",
|
||||
"uTime": "1724751378980"
|
||||
}
|
||||
],
|
||||
"msg": ""
|
||||
}
|
||||
Reference in new issue
Block a user