@echo off
echo ========================================
echo    Market Data Proxy Stopper
echo ========================================
echo.

REM Stop Nginx processes
echo Stopping Nginx proxy server...
taskkill /f /im nginx.exe >nul 2>&1
if errorlevel 1 (
    echo [ℹ] Nginx proxy server was not running
) else (
    echo [✓] Nginx proxy server stopped
)

echo.
echo Stopping Node.js API server...

REM Stop all node.exe processes
taskkill /f /im node.exe >nul 2>&1
if errorlevel 1 (
    echo [ℹ] Node.js API server was not running
) else (
    echo [✓] Node.js API server stopped
)

echo.
echo ========================================
echo    All services stopped!
echo ========================================
echo.
echo Services that were running have been stopped.
echo You can now safely:
echo - Close applications
echo - Restart services
echo - Run start_proxy.bat again
echo.
echo Press any key to close this window...
pause >nul
