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 Privy JWT token. You can only emergency exit positions that belong to your wallet.
Authentication
Include your Privy JWT token in the Authorization header:Request Body
The unique identifier of the position to emergency exit.How to get: Use Get Positions to find your position IDs
Example: 12345
Example: 12345
Response Fields
Indicates if the emergency exit was completed successfully
The original margin amount returned to your account in USD
Emergency Exit Mechanics
How It Works
- Position Cancelled: The position is immediately removed from the system
- Margin Refunded: Your original margin is returned to your balance
- No PnL: No profit or loss is realized, regardless of current position value
- No Fees: No closure fees are charged for emergency exits
What You Get Back
- Original margin only: The exact USD amount you put up as margin
- No interest or funding: No compensation for time held
- No profit: Even if position was profitable, you only get original margin
What You Forfeit
- Unrealized PnL: Any profit or loss is abandoned
- Potential gains: No benefit from favorable price movements
- Position exposure: All market exposure is immediately eliminated
When to Use Emergency Exit
Legitimate Use Cases
System Issues
- Platform downtime: When normal trading is unavailable
- Smart contract issues: If there are blockchain-related problems
- Critical bugs: When position management is compromised
Personal Emergencies
- Immediate liquidity needs: When you need your margin back instantly
- Account security concerns: If you suspect account compromise
- Technical difficulties: When you cannot access normal trading functions
Market Conditions
- Extreme volatility: When normal price discovery breaks down
- Liquidity crisis: When position closure might be impaired
- Force majeure events: During exceptional market circumstances
When NOT to Use Emergency Exit
❌ Normal Trading: Use Close Position instead❌ Taking Profits: You forfeit all gains with emergency exit
❌ Cutting Losses: Normal closure may be more beneficial
❌ Portfolio Rebalancing: Use regular trading operations
❌ Fear of Liquidation: Normal closure is usually better
Business Logic
Position Validation
- Position must exist and belong to authenticated wallet
- Position must be in “open” status
- Cannot emergency exit already closed or liquidated positions
Refund Calculation
- Original margin: 100.00 USD
- Current position value: 150.00 USD (profit) or 75.00 USD (loss)
- Emergency exit refund: 100.00 USD (always original margin)
Balance Updates
After successful emergency exit:- Position removed: Deleted from all position tracking
- Margin returned: Original margin added to withdrawable balance
- No other effects: No PnL, fees, or other adjustments
Comparison with Normal Closure
Aspect | Normal Closure | Emergency Exit |
---|---|---|
Speed | Market-dependent | Immediate |
PnL Realization | ✅ Yes | ❌ No |
Fees | ✅ Dynamic fees apply | ✅ No fees |
Profit Potential | ✅ Keep gains | ❌ Forfeit gains |
Loss Management | ❌ Realize losses | ✅ Avoid losses |
Use Case | Normal trading | Emergency only |
Error Responses
Invalid position ID or position cannot be emergency exited
Missing or invalid authentication token
Attempting to emergency exit position that doesn’t belong to your wallet
Rate limit exceeded (10 requests per minute for trading endpoints)
Usage Examples
Emergency Exit from Profitable Position
Emergency Exit from Loss Position
Large Position Emergency Exit
Risk Considerations
Opportunity Cost
- Forfeited profits: Any gains are lost permanently
- Market recovery: Position might have recovered if held
- Timing risk: Market conditions might improve after exit
Strategic Impact
- Portfolio disruption: Removes planned market exposure
- Reentry costs: New positions incur fresh fees and spreads
- Tax implications: May affect accounting for gains/losses
Emotional Factors
- Panic decisions: Emergency exits are often made under stress
- Regret potential: May regret forfeiting profits later
- Learning opportunity: Missing chance to learn from position management
Best Practices
Before Using Emergency Exit
- Assess alternatives: Can you use normal closure instead?
- Check market conditions: Is normal trading functioning?
- Consider consequences: Are you forfeiting significant profits?
- Evaluate urgency: Is this truly an emergency?
Decision Framework
After Emergency Exit
- Review decision: Document why emergency exit was necessary
- Monitor markets: Track what would have happened if held
- Learn from experience: Update risk management procedures
- Plan reentry: If needed, plan new position entry
Recovery and Next Steps
After an emergency exit:- Confirm Refund - Check Account for margin refund
- Review Dashboard - Update portfolio view in Dashboard
- Assess Markets - Use Market Data to evaluate conditions
- 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
Strike Protocol API key authentication
Body
application/json
Position ID for emergency exit