Open ddragosd opened 1 year ago
Great Job!
I'm still testing this in production for a little longer before removing the WIP
, and making it ready for review.
Thanks a lot for your effort!
@ddragosd you should take a look at this implementation from MrDaubinet could be helpful for your work to support shorting
@BarakBa1 thanks for referencing the extension. Are you suggesting we don't merge this PR and instead use the extension you referenced ?
Hope the shorting can be merged into the master
Thanks for the efforts, hope it gets merged.
I'm opening a PR to get feedback on adding support for shorting.
I need this feature, and I'd like to share it with the community too.
Details
The implementation intentionally keeps the original behavior in place as much as possible - which is no shorting support . Developers have to be specific in the code to enable it. What this PR adds:
MarginWallet
- a class that should be explicitly used when shorting is needed. Instead of initializing aWallet
instance, developers can initialize aMarginWallet
NegativeQuantity
- I created this class as the current implementation is pretty strict with throwing errors for negative quantities, and I wanted to leave that functionality untouched.TODO:
Related Issues
317
439
327