Resolve "batchOrder json does not support booleans"#390
Conversation
377c586 to
4967f06
Compare
|
Hello @claudeenriquez, thanks a lot for the bugfix proposal! Could you please open an issue first that describes the problem and expected behavior? That’ll help us keep a clear record for the future. |
Issue linked. |
btschwertfeger
left a comment
There was a problem hiding this comment.
The proposed change looks absolutely legitimate and well-justified. Thanks for bringing it up! I double-checked your example, and it seems the required dumping comes from the boolean data type.
To make sure this works reliably now and going forward, could you please extend the unit test tests/futures/test_futures_trade.py::test_create_batch_order to include one order in the batchorderlist that sets "reduceOnly": True? That way we'll have full confidence the behavior stays correct in the future.
4967f06 to
622882a
Compare
Done! Also ran pre-commit to pass the lint error. |
Summary
Encode the batchOrder JSON object into a JSON text before passing it into the URL encoder, to support boolean values inside the object.
Changes / Features
Example:
Before fix:
After fix:
Closes #392