-
Notifications
You must be signed in to change notification settings - Fork 260
Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
In this file, for class LimitOrderRequest
, limit_price
is set to be an optional attribute (i.e., limit_price (Optional[float]
), even though it is required (even though this may seem obvious I have tested this and it really is required). it should be changed to limit_price (float)
.
Expected Behavior
it should require the attribute limit_price
.
SDK Version I encountered this issue in
alpaca-py version: v0.42.1
Steps To Reproduce
1. I cannot share my code because it's customized, but just submit an order using LimitOrderRequest but without the limit_price attribute.
2. You will see something like this:
pydantic_core._pydantic_core.ValidationError: 1 validation error for LimitOrderRequest
Value error, limit_price is required [type=value_error, input_value={'symbol': 'AAPL', 'qty':...derType.LIMIT: 'limit'>}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.11/v/value_error
3. If you do use limit_price, your order will go through just fine.
Filled out the Steps to Reproduce section?
- I have entered valid steps to reproduce my issue or have attached a minimally reproducible case in code that shows my issue happening; and understand that without this my issue will be flagged as invalid and closed after 30 days.
Anything else?
No response
Metadata
Metadata
Assignees
Labels
No labels