diff --git a/config.live.example.json b/config.live.example.json index c3cddaaa..3eefe135 100644 --- a/config.live.example.json +++ b/config.live.example.json @@ -32,7 +32,7 @@ "max_total_exposure_usd": 1000000.0, "max_open_positions": 1000, "max_per_event": 0, - "min_price": 0.01, + "min_price": 0.0, "max_price": 0.95, "min_order_usd": 1.0 }, diff --git a/copybot.py b/copybot.py index 93981ce2..afbda67f 100644 --- a/copybot.py +++ b/copybot.py @@ -341,16 +341,24 @@ class LedgerLiveExecutor: return {"ok": False, "filled_shares": 0.0, "price": price, "resp": f"pre-check failed: {e}", "paper": False} try: + # protected prices round to 4dp and scale WITH the price — 2dp + # rounding zeroed the bound on sub-penny books (0.001 longshots + # are the follow set's specialty; the min_price floor removal + # 2026-07-13 makes them copyable, so the executor must survive + # them). BUY never bounds below the quoted cross; SELL never + # bounds above the quoted bid. if side == "BUY": r = self.client.place_market_order( token_id=token_id, side="BUY", amount=round(sz * price, 2), - max_price=min(round(price * (1 + self._slip), 2), 0.99), + max_price=min(max(round(price * (1 + self._slip), 4), + price), 0.99), order_type=self._otype) else: r = self.client.place_market_order( token_id=token_id, side="SELL", shares=sz, - min_price=max(round(price * (1 - self._slip), 2), 0.01), + min_price=min(max(round(price * (1 - self._slip), 4), + 0.0001), price), order_type=self._otype) except Exception as e: # NEVER raise into the trade loop — # but a timed-out post may still be resting: sweep + measure first diff --git a/live/copybot.paper.json b/live/copybot.paper.json index a5b769c2..feafc7c2 100644 --- a/live/copybot.paper.json +++ b/live/copybot.paper.json @@ -62,7 +62,7 @@ "daily_spend_cap_usd": 1000000.0, "max_total_exposure_usd": 1000000.0, "max_open_positions": 1000, - "min_price": 0.01, + "min_price": 0.0, "max_price": 0.99, "min_order_usd": 5.0, "max_per_event": 0