diff --git a/alpaca/trading/models.py b/alpaca/trading/models.py index 3b011ef3..b36a8185 100644 --- a/alpaca/trading/models.py +++ b/alpaca/trading/models.py @@ -249,7 +249,15 @@ def __init__(self, **data: Any) -> None: # mleg responses will give ''s that will need to be converted to None # to avoid validation errors from pydantic - for k in ["asset_id", "symbol", "asset_class", "side", "type", "order_type"]: + for k in [ + "asset_id", + "symbol", + "asset_class", + "side", + "position_intent", + "type", + "order_type", + ]: if k in data and data[k] == "": data[k] = None