From c88618f2201879a0fe120cd5c3cf5476eaf202ff Mon Sep 17 00:00:00 2001 From: jaxperro Date: Sun, 12 Jul 2026 21:48:20 -0400 Subject: [PATCH] =?UTF-8?q?no=20price=20floor:=20min=5Fprice=200.01=20?= =?UTF-8?q?=E2=86=92=200=20(both=20books),=20cap=20stays=200.95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User call 2026-07-13 after a big 0.001 longshot was floor-blocked (the same band class that blocked the 16x Hive copy at 0.05). Executor's protected prices now round to 4dp and scale with the price — the old 2dp rounding zeroed the bound on sub-penny books (BUY never bounds below the quoted cross; SELL never above the quoted bid; verified at 0.001/0.002). Co-Authored-By: Claude Fable 5 --- config.live.example.json | 2 +- copybot.py | 12 ++++++++++-- live/copybot.paper.json | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) 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