stop
This guide shows you how to stop a running Datafye Trading Environment on your local machine without removing it.
Prerequisites
Before you begin, ensure:
You have a running local Trading Environment
Docker Desktop is running on your machine
Before stopping: If you have open trading positions, ensure you close them or understand they will remain open. The Broker Connector will disconnect, but positions remain with your broker.
Stop Command
Use the following command to stop your local Trading Environment:
datafye trading local stopStop Process
When you stop the deployment, the CLI will:
Disconnect from broker - Close broker connections gracefully
Stop services gracefully - Send shutdown signals to all Datafye services
Wait for clean shutdown - Allow services to complete ongoing operations
Stop containers - Stop all Docker containers
Preserve state - Keep all configuration and data intact
Display status - Confirm deployment is stopped
After Stopping
Once stopped:
All Datafye services will be inactive
Docker containers will be stopped (but not removed)
Broker connections will be disconnected
Your configuration and data are preserved
System resources (CPU, memory) are freed
To resume work: Simply run datafye trading local start when ready.
Your local Trading Environment has been stopped successfully!
When to Stop
Stopping your deployment is useful for:
End of trading day - Stop the environment after market close
Freeing resources when not actively trading or developing
Pausing development work overnight or over weekends
Resolving issues by performing a clean restart
Updating configuration (requires stop, modify descriptors, then start)
Troubleshooting
Docker Not Running
If you see an error about Docker not being available:
Ensure Docker Desktop is running
The CLI needs Docker to stop containers even if they're already stopped
No Deployment Found
If you see an error that no local deployment exists:
Verify you've previously provisioned a deployment
Check if containers still exist:
docker ps -a | grep datafye
Services Won't Stop
If services fail to stop gracefully:
Wait up to 30 seconds for graceful shutdown
The CLI will force-stop containers if needed
If issues persist, you can manually stop Docker containers:
docker stop $(docker ps -q)
Open Positions Warning
If you have open positions:
The CLI will warn you about open positions
Positions remain with your broker (paper or live account)
You can reopen positions management after restarting the deployment
Related Commands
Provision a Local Trading Environment - Create a new deployment
Start a Local Trading Environment - Start a stopped deployment
Deprovision a Local Trading Environment - Remove the deployment completely
Last updated: 2025-10-22
Last updated

