From fff37563e953fd445597772f6975ec59f3c52eca Mon Sep 17 00:00:00 2001 From: Serhat Dolmac Date: Tue, 14 Apr 2026 23:12:58 +0300 Subject: [PATCH] fix: use round_down for price in market orders Market orders should use round_down (not round_normal) when computing raw_price to match TypeScript client behavior and avoid over-paying. Closes #323 --- py_clob_client/order_builder/builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py_clob_client/order_builder/builder.py b/py_clob_client/order_builder/builder.py index 64fb7c96..30901df9 100644 --- a/py_clob_client/order_builder/builder.py +++ b/py_clob_client/order_builder/builder.py @@ -85,7 +85,7 @@ def get_order_amounts( def get_market_order_amounts( self, side: str, amount: float, price: float, round_config: RoundConfig ): - raw_price = round_normal(price, round_config.price) + raw_price = round_down(price, round_config.price) if side == BUY: raw_maker_amt = round_down(amount, round_config.size)