Files
Anubis/tests/Anubis.Tests/Fixtures/okx-trading/balance.json
T
Alby96andClaude Opus 5.5 1419457fe4 Add the trading core: ledger, simulator, order manager, reconciliation (refs #26 #27 #28 #29 #30)
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>
2026-11-10 20:29:02 +01:00

80 lines
2.7 KiB
JSON

{
"code": "0",
"data": [
{
"adjEq": "55415.624719833286",
"availEq": "55415.624719833286",
"borrowFroz": "0",
"delta": "0",
"deltaLever": "0",
"deltaNeutralStatus": "0",
"details": [
{
"autoLendStatus": "off",
"autoLendMtAmt": "0",
"availBal": "4834.317093622894",
"availEq": "4834.3170936228935",
"borrowFroz": "0",
"cashBal": "4850.435693622894",
"ccy": "USDT",
"crossLiab": "0",
"colRes": "0",
"collateralEnabled": false,
"collateralRestrict": false,
"colBorrAutoConversion": "0",
"disEq": "4991.542013297616",
"eq": "4992.890093622894",
"eqUsd": "4991.542013297616",
"smtSyncEq": "0",
"spotCopyTradingEq": "0",
"fixedBal": "0",
"frozenBal": "158.573",
"frpType": "0",
"imr": "",
"interest": "0",
"isoEq": "0",
"isoLiab": "0",
"isoUpl": "0",
"liab": "0",
"maxLoan": "0",
"mgnRatio": "",
"mmr": "",
"notionalLever": "",
"ordFrozen": "0",
"rewardBal": "0",
"spotInUseAmt": "",
"clSpotInUseAmt": "",
"maxSpotInUse": "",
"spotIsoBal": "0",
"stgyEq": "150",
"twap": "0",
"uTime": "1705449605015",
"upl": "-7.545600000000006",
"uplLiab": "0",
"spotBal": "",
"openAvgPx": "",
"accAvgPx": "",
"spotUpl": "",
"spotUplRatio": "",
"totalPnl": "",
"totalPnlRatio": ""
}
],
"imr": "0",
"isoEq": "0",
"mgnRatio": "",
"mmr": "0",
"notionalUsd": "0",
"notionalUsdForBorrow": "0",
"notionalUsdForFutures": "0",
"notionalUsdForOption": "0",
"notionalUsdForSwap": "0",
"ordFroz": "",
"totalEq": "55837.43556134779",
"uTime": "1705474164160",
"upl": "0"
}
],
"msg": ""
}