Skip to content
Sign up

Leveraged forex

Close all positions

Close every open position at once, at the market.

POST/api/v1/margin/positions/closeGet a key
curl --request POST \
  --url "https://reirex.com/api/v1/margin/positions/close" \
  --header "GX-API-KEY: $GX_API_KEY" \
  --header "GX-API-TIMESTAMP: $TIMESTAMP" \
  --header "GX-API-SIGN: $SIGNATURE"

200 OKapplication/json

{
  "closed": ["LP-7K2M4QX3P9", "LP-ZA8RT2WN6D"]
}

Wire this to your kill switch, next to Cancel all orders.

Response

  • closedstring[]

    The references of the positions closed.