From c44e3324c690e29f99d17516b6dabe80e129e55b Mon Sep 17 00:00:00 2001 From: otto Date: Thu, 16 Apr 2026 22:11:05 +0200 Subject: [PATCH] fix: round limit_price to 2 decimal places before order submit Alpaca rejects prices with more than 2 decimal places (code 42210000). Affected BAC on first live tick. --- bot/alpaclaudia/executor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/alpaclaudia/executor.py b/bot/alpaclaudia/executor.py index 0c08d25..01255a6 100644 --- a/bot/alpaclaudia/executor.py +++ b/bot/alpaclaudia/executor.py @@ -55,7 +55,7 @@ def _build_request(intent: OrderIntent) -> Any: **common, ) if intent.order_type == "limit": - return LimitOrderRequest(limit_price=intent.limit_price, **common) + return LimitOrderRequest(limit_price=round(intent.limit_price, 2), **common) return MarketOrderRequest(**common)