Settle sub-cent orders and migrate historical book prices
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user