_schedule_due only looked at the target day of the current week or
month. When that day had no bar and the next bar opened a new period
(Good Friday with weekday=5, a month-end on a weekend with monthday=31,
or a Saturday target on a stock market), the run was silently dropped.
Inside a period the missed day was already caught up on the next bar;
apply the same rule to the previous period's target day.
Normalize venue contract quantities before posting and derive incremental
prices and fees from cumulative order snapshots. Serialize ledger, position
and grid state updates; reconcile delayed fees and preserve rebates,
fractional quantities and native fee currencies across supported venues.
Fix product/account routing, REST adapter contracts, initial grid recovery,
and migration bootstrap registration. Add PostgreSQL concurrency and
rollback regression coverage to CI and document venue contracts/deployment.
Validation: 2716 passed, 7 environment skips, 23 integration/stress deselected;
critical lint, compile, structure, lockfile and documentation checks passed.
Real exchange order placement was not exercised. Refs #248.
Require confirmed sellable balances and cap close quantities after ledger retries. Reject failed balance reads and invalid normalization without submitting orders. Cover spot adapters, direct execution, worker retries, and grid exits.
Only trade balances are sellable; keep frozen balances in owned trading inventory and exclude unrelated balance types. Cover non-trading rows in both orders, close sizing, and fully frozen holdings.
HTX /v1/account/accounts/{id}/balance returns one row per (currency, type):
a "trade" row for the sellable part and a "frozen" row for whatever is
locked by resting orders. get_spot_base_holding returned on the first row
matching the base asset, so the frozen quantity never reached the holding.
get_spot_total_base_balance documents that ownership must use the whole
account inventory, precisely because open limit orders move quantity from
available to locked without changing ownership. With a resting sell order
on HTX spot, the total came back short and the drift check saw a position
that is not actually gone. Row order is not guaranteed either, so a
"frozen"-first payload reported the locked amount as available.
Accumulate over every row for the base asset instead: "frozen" adds to
the total only, anything else adds to both the total and the available
part.