Skip to content

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

Description

@bperritt

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions