Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Close Positions when Margin Utilization Gets Too High #230

Open
bperritt opened this issue Jun 26, 2024 · 0 comments
Open

Can't Close Positions when Margin Utilization Gets Too High #230

bperritt opened this issue Jun 26, 2024 · 0 comments

Comments

@bperritt
Copy link

Because there's not provided way to simply close a position, it's necessary to open a counter-position of the same quantity in the opposite direction in order to close a position using the API. However, if my available margin is too low, closing will fail, with the error 'order would put account below collateralization'. This seems to be a symptom of the fact that the system just blindly checks whether the client has the collateral to open a given position, without considering the fact that that position may be reducing the size of a presently open one. There is no elegant way around this and it presents a huge flaw with the API, because it becomes impossible to get out of losing positions. Please fix this ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant