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

Stop Command

Use the following command to stop your local Trading Environment:

datafye trading local stop

Local deployments don't require a --name parameter since only one deployment is allowed per machine.

Stop Process

When you stop the deployment, the CLI will:

  1. Disconnect from broker - Close broker connections gracefully

  2. Stop services gracefully - Send shutdown signals to all Datafye services

  3. Wait for clean shutdown - Allow services to complete ongoing operations

  4. Stop containers - Stop all Docker containers

  5. Preserve state - Keep all configuration and data intact

  6. Display status - Confirm deployment is stopped

Stopping preserves your deployment configuration and data. You can restart it later with datafye trading local start.

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.

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:

  1. Ensure Docker Desktop is running

  2. 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:

  1. Verify you've previously provisioned a deployment

  2. Check if containers still exist: docker ps -a | grep datafye

Services Won't Stop

If services fail to stop gracefully:

  1. Wait up to 30 seconds for graceful shutdown

  2. The CLI will force-stop containers if needed

  3. If issues persist, you can manually stop Docker containers: docker stop $(docker ps -q)

Open Positions Warning

If you have open positions:

  1. The CLI will warn you about open positions

  2. Positions remain with your broker (paper or live account)

  3. You can reopen positions management after restarting the deployment


Last updated: 2025-10-22

Last updated