Convert NO positions and conserve collateral across fixed negative-risk groups
This commit is contained in:
@@ -30,7 +30,7 @@ WITH reserved AS (
|
||||
WHEN 'MERGEABLE' THEN pairs>0
|
||||
END
|
||||
)
|
||||
SELECT market,outcome,size,available,reserved,row_status,payout_per_share,pairs,free_pairs,sort_key
|
||||
FROM filtered
|
||||
SELECT market,outcome,size,available,reserved,row_status,payout_per_share,pairs,free_pairs,sort_key,n.group_id
|
||||
FROM filtered LEFT JOIN neg_risk_members n USING(market)
|
||||
WHERE ?4 IS NULL OR (sort_key,market,outcome)>(?4,?5,?6)
|
||||
ORDER BY sort_key,market,outcome LIMIT ?7
|
||||
|
||||
Reference in New Issue
Block a user