Settle sub-cent orders and migrate historical book prices

This commit is contained in:
2026-12-03 07:07:25 +08:00
parent 064b301ebd
commit 20ce08adf9
32 changed files with 393 additions and 138 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ WITH selected(market) AS MATERIALIZED (
UNION ALL
SELECT s.market, f.seq, f.quantity, f.at_ms,
CASE c.taker_order WHEN f.yes_order THEN f.yes_price
WHEN f.no_order THEN 100-f.yes_price END
WHEN f.no_order THEN 10000-f.yes_price END
FROM selected s CROSS JOIN paired_fills f ON f.market=s.market
LEFT JOIN execution_context c ON c.execution=f.seq
)