You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
after an update of the v4-dydx-py-v2 client I got an error creating stop limit orders because the condition type was no longer set correctly. This is the exact error messages returned after placing the order: "condition type cannot be unspecified: Conditional type is invalid".
After a bit of debugging I found out, that the error is due to the function calculate_condition_type(order_type: OrderType) in the chain_helpers.py file. The newest version returns an unspecified condition type for stop limit orders. I suggest to change the function back to the old version to return the condition type for stop losses like shown below.
elif order_type in [OrderType.STOP_LIMIT]: return Order.ConditionType.CONDITION_TYPE_STOP_LOSS
The text was updated successfully, but these errors were encountered:
Hello,
after an update of the v4-dydx-py-v2 client I got an error creating stop limit orders because the condition type was no longer set correctly. This is the exact error messages returned after placing the order: "condition type cannot be unspecified: Conditional type is invalid".
After a bit of debugging I found out, that the error is due to the function calculate_condition_type(order_type: OrderType) in the chain_helpers.py file. The newest version returns an unspecified condition type for stop limit orders. I suggest to change the function back to the old version to return the condition type for stop losses like shown below.
elif order_type in [OrderType.STOP_LIMIT]: return Order.ConditionType.CONDITION_TYPE_STOP_LOSS
The text was updated successfully, but these errors were encountered: