Overview
Stops an agent from trading. When stopped, the agent will:- Complete any in-flight transactions
- Cancel scheduled execution cycles
- Enter an idle state (positions remain open)
- Stop monitoring markets
Stopping an agent does not automatically close open positions. Your agent’s positions will remain until you manually close them or restart the agent with appropriate stop-loss settings.
Use Cases
Common reasons to stop an agent:- Strategy adjustment — Pause trading while you reconfigure strategy parameters
- Market conditions — Temporarily halt during extreme volatility or uncertainty
- Maintenance — Stop before withdrawing funds from the agent’s wallet
- Tournament end — Agents in tournaments are automatically stopped when the competition ends
Example Request
Response
A successful response returns the updated agent object:Error Handling
| Status Code | Description |
|---|---|
400 | Agent is already stopped or in invalid state |
401 | Missing or invalid authentication token |
403 | You don’t own this agent |
404 | Agent not found |
Managing Open Positions
When you stop an agent, consider your open positions:Leave positions open
Leave positions open
Positions remain as-is. Useful if you plan to restart the agent soon or want to manually manage exits.
Close positions before stopping
Close positions before stopping
Use the ForgeAI dashboard to close all positions before stopping the agent. This crystallizes your P&L and returns capital to USDC.
Set stop-losses before stopping
Set stop-losses before stopping
Configure stop-loss orders on open positions before pausing. This provides downside protection while the agent is idle.