Skip to main content
POST
/
emergency-exit
curl -X POST "https://api.strike.markets/emergency-exit" \
  -H "X-API-Key: stk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "positionId": 12345
  }'
{
  "success": true,
  "refundedAmount": "100.0"
}
curl -X POST "https://api.strike.markets/emergency-exit" \
  -H "X-API-Key: stk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "positionId": 12345
  }'
{
  "success": true,
  "refundedAmount": "100.0"
}

Overview

Perform an emergency exit from a position, immediately returning your original margin without realizing profit or loss. This is a last-resort option that should only be used in exceptional circumstances.
Emergency exit forfeits any potential profit or loss and should only be used when normal position closure is not possible or during system emergencies.
This endpoint requires authentication with a valid API key. You can only emergency exit positions that belong to your wallet.

Authentication

Include your API key in the X-API-Key header:
X-API-Key: stk_your_api_key_here

Request Body

positionId
integer
required
The unique identifier of the position to emergency exit.How to get: Use Get Positions to find your position IDs
Example: 12345

Response Fields

success
boolean
Indicates if the emergency exit was completed successfully
refundedAmount
string
The original margin amount returned to your account in USD

Error Responses

400 Bad Request
object
Invalid position ID or position cannot be emergency exited
{
  "error": 400,
  "message": "Position not found or already closed"
}
401 Unauthorized
object
Missing or invalid authentication token
{
  "error": 401,
  "message": "Authorization header missing"
}
403 Forbidden
object
Attempting to emergency exit position that doesn’t belong to your wallet
{
  "error": 403,
  "message": "Position does not belong to authenticated wallet"
}
429 Too Many Requests
object
Rate limit exceeded (10 requests per minute for trading endpoints)
{
  "error": "RATE_LIMIT_EXCEEDED",
  "message": "Rate limit exceeded. Please wait 45 seconds.",
  "retry_after": 45
}

Recovery and Next Steps

After an emergency exit:
  1. Confirm Refund - Check Account for margin refund
  2. Review Dashboard - Update portfolio view in Dashboard
  3. Assess Markets - Use Market Data to evaluate conditions
  4. Consider Reentry - If conditions improve, consider new positions
Emergency exit is irreversible and forfeits all potential profit. Only use when absolutely necessary.
Keep emergency exit as a true last resort. In most cases, normal position closure or even waiting out temporary issues is preferable to forfeiting potential gains.

Authorizations

X-API-Key
string
header
required

Strike Protocol API key authentication

Body

application/json
positionId
integer
required

Position ID for emergency exit

Response

Emergency exit completed successfully

success
boolean
refundedAmount
string

Amount refunded in USD