smithery.ai

trading-operations

Daily trading operations, monitoring, troubleshooting, deployment, and system health checks. Use when starting trading sessions, monitoring strategies, troubleshooting issues, checking system status, or deploying strategies.

First seen Apr 13, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 7,385 B
  • docs SUMMARY.md 250 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Trading Operations

Daily Startup Checklist

1. Start OpenAlgo Server

KiteConnect Instance (Port 5001 - NSE/MCX):

cd /Users/mac/dyad-apps/probable-fiesta/openalgo
./QUICK_START.sh

Or manually:

cd /Users/mac/dyad-apps/probable-fiesta/openalgo
source /Users/mac/dyad-apps/openalgo/venv/bin/activate
bash start.sh

Dhan Instance (Port 5002 - Options):

cd /Users/mac/dyad-apps/probable-fiesta/openalgo
bash scripts/start_dhan_port5002_final.sh

2. Verify Server Status

Quick Status Check:

cd /Users/mac/dyad-apps/probable-fiesta/openalgo
./CHECK_STATUS.sh

Detailed Health Check:

cd /Users/mac/dyad-apps/probable-fiesta/openalgo
source /Users/mac/dyad-apps/openalgo/venv/bin/activate
python3 scripts/authentication_health_check.py

3. Check Broker Authentication

KiteConnect (Port 5001):

Dhan (Port 5002):

4. Verify Strategies

Strategy Dashboard:

5. Monitor Dashboard

Main Dashboard:

Monitoring

Real-Time Monitoring

Check Strategy Logs:

cd /Users/mac/dyad-apps/probable-fiesta/openalgo
tail -f logs/strategy_*.log | grep -E "\[ENTRY\]|\[EXIT\]|\[REJECTED\]|\[ERROR\]"

Monitor All Strategy Logs:

cd /Users/mac/dyad-apps/probable-fiesta/openalgo
bash scripts/check_all_strategy_logs.sh

Check Positions:

curl http://127.0.0.1:5001/positions | jq

Check Orders:

curl http://127.0.0.1:5001/orderbook | jq

Key Endpoints

Endpoint Purpose Port
/dashboard Main dashboard 5001/5002
/python Strategy management 5001/5002
/positions Current positions 5001/5002
/orderbook Order status 5001/5002
/auth/broker Broker authentication 5001/5002
/health System health 5001/5002

Troubleshooting

Strategies Not Running

Check:

  1. Server is running: lsof -i :5001 or lsof -i :5002
  2. Strategies are enabled in /python dashboard
  3. Market hours: 09:15-15:30 IST (weekdays only)
  4. API key is configured: Check OPENALGO_APIKEY env var

Fix:

# Restart specific strategy
curl -X POST http://127.0.0.1:5001/api/v1/strategy/restart \
  -H "Content-Type: application/json" \
  -d '{"strategy": "strategy_name"}'

No Orders Being Placed

Common Causes:

  1. Entry conditions too strict (check logs for [REJECTED])
  2. Risk limits blocking entries (portfolio heat limit)
  3. API connectivity issues
  4. Market closed or outside trading hours

Diagnosis:

# Check strategy logs for rejection reasons
grep "\[REJECTED\]" logs/strategy_*.log

# Check risk limits
curl http://127.0.0.1:5001/risk | jq

403 Errors

Fix 403 errors:

cd /Users/mac/dyad-apps/probable-fiesta/openalgo
python3 scripts/fix_403_strategies.py

Restart affected strategies:

bash scripts/restart_403_strategies.sh

Authentication Issues

KiteConnect Token Expired:

  1. Go to http://127.0.0.1:5001/auth/broker
  2. Click "Reconnect Zerodha"
  3. Complete OAuth flow

Dhan Login Issues:

  • Check: openalgo/DHANLOGINTROUBLESHOOTING.md
  • Verify credentials in .env file
  • Check port 5002 is not blocked

Deployment

Deploy Ranked Strategies

After backtesting and ranking:

cd /Users/mac/dyad-apps/probable-fiesta/openalgo/strategies
bash scripts/deploy_ranked_strategies.sh

This script:

  1. Reads backtest ranking results
  2. Enables top-ranked strategies
  3. Configures parameters from optimization
  4. Sets up monitoring

Manual Strategy Deployment

Enable Strategy:

curl -X POST http://127.0.0.1:5001/api/v1/strategy/enable \
  -H "Content-Type: application/json" \
  -d '{
    "strategy": "strategy_name",
    "symbol": "NIFTY",
    "params": {
      "risk_per_trade": 0.02,
      "stop_loss_pct": 1.5
    }
  }'

Configure Schedule:

  • Set trading hours: 09:30-15:15 IST
  • Set check interval: 60 seconds (or as needed)
  • Configure market hours filter

Emergency Procedures

Emergency Stop

Immediate Actions:

  1. Go to http://127.0.0.1:5001/python → Toggle OFF all strategies
  2. Go to http://127.0.0.1:5001/positions → Close all positions
  3. Stop server: lsof -i :5001 then kill <PID>

Kill Switch API:

curl -X POST http://127.0.0.1:5001/api/v1/flatten

Position Flattening

Close All Positions:

curl -X POST http://127.0.0.1:5001/api/v1/positions/flatten \
  -H "Content-Type: application/json" \
  -d '{"exchange": "NSE"}'

Close Specific Symbol:

curl -X POST http://127.0.0.1:5001/api/v1/positions/close \
  -H "Content-Type: application/json" \
  -d '{"symbol": "NIFTY", "exchange": "NSE"}'

Daily Shutdown

Backup Settings

Save Settings:

cd /Users/mac/dyad-apps/probable-fiesta/openalgo
./QUICK_BACKUP.sh

Or manually:

python3 scripts/backup_settings.py

List Backups:

python3 scripts/list_backups.py

Restore Settings:

python3 scripts/restore_settings.py

End of Day Checklist

  1. ✅ All positions closed (or verified as intended)
  2. ✅ Settings backed up
  3. ✅ Logs reviewed for errors
  4. ✅ Strategy performance noted
  5. ✅ Server stopped (optional, can run 24/7)

Market Hours

NSE/MCX Trading Hours:

  • Market Open: 09:15 IST
  • Trading Window: 09:30-15:15 IST (strategies active)
  • Market Close: 15:30 IST
  • Token Expiry: 03:00 IST (daily)

MCX Trading Hours:

  • Extended hours: 09:00-23:30 IST
  • Check specific commodity trading hours

Port Configuration

Dual OpenAlgo Setup:

Port Broker Purpose Strategies
5001 KiteConnect NSE/MCX Equity, MCX strategies
5002 Dhan Options Options strategies, rankers

Strategy Routing:

  • NSE/MCX strategies → http://127.0.0.1:5001
  • Options strategies → http://127.0.0.1:5002

Log Analysis

Key Log Patterns

Entry Signals:

grep "\[ENTRY\]" logs/strategy_*.log

Exit Signals:

grep "\[EXIT\]" logs/strategy_*.log

Rejections:

grep "\[REJECTED\]" logs/strategy_*.log

Errors:

grep -E "ERROR|Exception|Traceback" logs/strategy_*.log

Log Locations

  • Strategy logs: openalgo/logs/strategy_*.log
  • Server logs: openalgo/logs/server.log
  • Error logs: openalgo/logs/error.log

Additional Resources

  • Quick start: START_HERE.md
  • Setup guide: OPENALGOLIVETRADING_SETUP.md
  • Paper trading: PAPERTRADINGGUIDE.md
  • Troubleshooting: openalgo/DHANLOGINTROUBLESHOOTING.md
  • Status scripts: openalgo/scripts/checkallstrategy_logs.sh