Skip to content

Commit

Permalink
Fix self trade sql
Browse files Browse the repository at this point in the history
  • Loading branch information
tolyo committed Oct 15, 2024
1 parent e1d5f4f commit 1020a69
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sql/0310_get_potential_self_trade_volume.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ BEGIN
ON b.trade_order_id = t.id
WHERE t.side = side_param
AND t.trading_account_id = trading_account_id_param
AND t.instrument_id = instrument_id_param
AND t.price <= price_param
INTO acc;
ELSE
Expand All @@ -29,6 +30,7 @@ BEGIN
ON b.trade_order_id = t.id
WHERE t.side = side_param
AND t.trading_account_id = trading_account_id_param
AND t.instrument_id = instrument_id_param
AND (t.price >= price_param OR t.price = 0.00)
INTO acc;
END IF;
Expand Down

0 comments on commit 1020a69

Please sign in to comment.