Describe the bug
im using pydantic 2.6.3
and tastytrade latest 6.7
How to reproduce
I cant seem to pass pydantic validation for everything
i print out all the values everything is correct but pydantic throws errors
any version I should use to work with tastytrade 6.7 ?
any ideas of why it keeps causing value issues that are clearly defined.
this happens when i try to place an order
this is an example
/.local/lib/python3.11/site-packages/pydantic/_internal/_config.py:322: UserWarning: Valid config keys have changed in V2:
'allow_population_by_field_name' has been renamed to 'populate_by_name'
warnings.warn(message, UserWarning)
InstrumentType.EQUITY <enum 'InstrumentType'>
Traceback (most recent call last):
File "/media/FinDrive/obotp/test_order.py", line 14, in
order = NewOrder(
^^^^^^^^^
File "/.local/lib/python3.11/site-packages/pydantic/main.py", line 171, in init
self.__pydantic_validator__.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 2 validation errors for NewOrder
time-in-force
Field required [type=missing, input_value={'time_in_force': <OrderT...eEffect.DEBIT: 'Debit'>}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.6/v/missing
order-type
Field required [type=missing, input_value={'time_in_force': <OrderT...eEffect.DEBIT: 'Debit'>}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.6/v/missing
I see you closed this but for posterity: pydantic version needs to be 1, 2 has lots of breaking changes. If you install tastytrade through pip that should be taken care of.
Describe the bug im using pydantic 2.6.3 and tastytrade latest 6.7
How to reproduce I cant seem to pass pydantic validation for everything i print out all the values everything is correct but pydantic throws errors any version I should use to work with tastytrade 6.7 ? any ideas of why it keeps causing value issues that are clearly defined. this happens when i try to place an order this is an example /.local/lib/python3.11/site-packages/pydantic/_internal/_config.py:322: UserWarning: Valid config keys have changed in V2: