← Chat Archive

Share:
Hermes session 20260727_122602_a20fbd
2026-07-27 12:26 25 messages hermes-20260727_1226...
ASSISTANT (hermes, glm-5.2)
2026-07-27 12:26
TOOL (hermes, glm-5.2)
[Tool: read_file] {"content": "1|# Daily VIDYA Bot — Architecture\n2|\n3|## What this is\n4|\n5|A standalone, stateless, zone-filtered trading bot system. One systemd service\n6|per symbol: `daily-vidya-bot@<name>.service` (13 symbols).\n7|\n8|It trades the same SMA(2) × VIDYA(20) Renko crossover as the Renko VIDYA bot,\n9|PLUS a daily-trend zone filter (the \"line in stone\"). It may hold positions\n10|opposite to the renko bot on the same underlying — the logics are different\n11|and that is by design.\n12|\n13|**No files are shared with the renko bot.** This folder is self-contained:\n14|config.py, signal_engine.py, telegram.py, bot.py, daily_vidya_symbols.yaml.\n15|\n16|## Strategy\n17|\n18|1. Signal: SMA(2) crosses VIDYA(20) on Renko bricks built from 5-min closes.\n19|2. Zone filter: yesterday's daily VIDYA = today's LINE IN STONE (anchor).\n20| - price > anchor + 0.5% → CLEAR_LONG\n21| - price < anchor − 0.5% → CLEAR_SHORT\n22| - inside ±0.5% → IN_ZONE\n23|3. Direction enforcement (ZONE_DIRECTION_ENFORCED=True in config.py):\n24| BUY_CALL only when CLEAR_LONG, BUY_PUT only when CLEAR_SHORT.\n25| IN_ZONE → HOLD existing position, no new entries.\n26|\n27|## Data flow (ZERO broker API calls for market data)\n28|\n29|```\n30|incremental_filler.py (cron */5, 9:00–15:xx Mon–Fri, shared chart infra)\n31| two-tier: symbols with a RUNNING bot (renko-vidya-bot@* OR daily-vidya-bot@*)\n32| get 5-min fills; all others hourly. Same API calls as before — the daily\n33| bot's 13 symbols are the same symbols the renko system already fills.\n34| │ writes\n35| ▼\n36|/var/www/openalgo-chart/api/dbs/<name>_5min.db ← READ-ONLY for this bot\n37| │\n38| ▼\n39|daily anchor cron (Hermes job 0611736006e3, 15:45 Mon–Fri, no-agent script)\n40| /home/ubuntu/.hermes/scripts/daily_anchor_store.sh\n41| → vidya_daily.py store → computes today's VIDYA from the 5-min DB\n42| → writes <name>_daily_vidya.db (daily_anchors), dated TODAY\n43| → tomorrow's bot reads it as the line in stone\n44| → completeness guard: any symbol not anchored to today's close after 15:40\n45| triggers a Telegram maintenance alert\n46|```\n47|\n48|The bot reads BOTH DBs from local disk only. The broker API is touched only\n49|at trade time: positionbook (truth for positions), quotes (limit pricing),\n50|placeorder/cancelorder.\n51|\n52|## The four gates (every poll, in order)\n53|\n54|1. **FRESHNESS** — a crossover is tradable only within 5 min of its candle\n55| CLOSE (signal timestamps are candle START times; measured from close —\n56| the Jul 24 fix). Stale → monitor only.\n57| Exception: `order_now` mode acts on the existing crossover on the FIRST\n58| poll after start (even stale), then switches to fresh-only.\n59|2. **ANCHOR GUARD** — the anchor's date must equal the last trading day WITH\n60| DATA before today in the symbol's own 5-min DB (handles weekends and\n61| holidays automatically). Mismatch → NO entries, Telegram alert on ... [5808 chars total, truncated]
2026-07-27 12:26
TOOL (hermes, glm-5.2)
[Tool: read_file] {"content": "1|# Daily VIDYA Bot — Working (day-to-day operations)\n2|\n3|## Starting a bot\n4|\n5|From the dashboard: https://bot.openalgo.theworkpc.com → \"Daily VIDYA\" tab →\n6|START (choose \"Order Now\" or \"Wait Crossover\").\n7|\n8|From the terminal:\n9|\n10|```bash\n11|# Order Now (acts on the existing crossover at first poll, then fresh-only):\n12|echo order_now > /tmp/daily-vidya-mode-sbin\n13|sudo systemctl start daily-vidya-bot@sbin\n14|\n15|# Wait Crossover (only fresh crossovers):\n16|echo wait_crossover > /tmp/daily-vidya-mode-sbin\n17|sudo systemctl start daily-vidya-bot@sbin\n18|```\n19|\n20|## Stopping\n21|\n22|Dashboard STOP button, or:\n23|\n24|```bash\n25|sudo systemctl stop daily-vidya-bot@sbin\n26|```\n27|\n28|Stopping does NOT close open positions — the bot just stops trading.\n29|If a bot is stopped with a position open, that position is unmanaged until\n30|you restart the bot (order_now will realign it to the current signal).\n31|\n32|## Checking status\n33|\n34|```bash\n35|systemctl list-units --state=running 'daily-vidya-bot@*'\n36|tail -f /home/ubuntu/bots/daily_vidya_bot/mdocument/logs/dvbot_sbin.log\n37|tail -f /home/ubuntu/bots/daily_vidya_bot/mdocument/logs/trades.log\n38|```\n39|\n40|## One-shot diagnostic (no trading unless a fresh crossover exists)\n41|\n42|```bash\n43|cd /home/ubuntu/bots/daily_vidya_bot\n44|python3 bot.py --symbol SBIN --mode wait_crossover --once\n45|```\n46|\n47|Prints one POLL line: price, SMA, VIDYA, anchor, zone, crossover freshness,\n48|broker position, decision.\n49|\n50|## Changing a symbol's order broker\n51|\n52|Edit `daily_vidya_symbols.yaml` → `order_broker: flattrade|shoonya|kotak`\n53|for that symbol. Takes effect on next bot start (restart the service).\n54|\n55|## Changing strategy knobs\n56|\n57|In `config.py`:\n58|- `ZONE_PCT` (default 0.5) — width of the no-trade zone\n59|- `ZONE_DIRECTION_ENFORCED` (default True) — False allows either direction\n60| once price is clear of the zone\n61|- `FRESH_CROSSOVER_MINUTES` (default 5)\n62|- `SL_AMOUNT`, `MAX_OPEN_LOTS`, `LIMIT_BUFFER_PCT`\n63|\n64|Restart affected services after edits.\n65|\n66|## Daily rhythm (automatic)\n67|\n68|- 09:00–15:30 Mon–Fri — filler keeps running bots' symbols on a 5-min fill\n69|- 15:45 Mon–Fri — anchor cron stores today's VIDYA as tomorrow's line in\n70| stone (Telegram alert if any symbol misses today's close)\n71|- Bot loop — 60s polls, trades only fresh crossovers that pass all gates\n72|\n73|## Rules of thumb\n74|\n75|- START a bot any time; order_now syncs it to the current signal safely.\n76|- Monday morning: verify Friday's anchor exists before starting:\n77| `sqlite3 /var/www/openalgo-chart/api/dbs/sbin_daily_vidya.db \\\n78| \"SELECT * FROM daily_anchors ORDER BY date DESC LIMIT 1\"`\n79| The date must be the previous trading day, or the bot will refuse entries.\n80|- Opposite positions vs the renko bot on the same symbol are NORMAL.\n81|", "total_lines": 80, "file_size ... [3067 chars total, truncated]
2026-07-27 12:26
ASSISTANT (hermes, glm-5.2)
Now I'll update both files. Starting with ARCHITECTURE.md — multiple sections need changes:
2026-07-27 12:26
TOOL (hermes, glm-5.2)
[Tool: patch] {"success": true, "diff": "--- a//home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md\n+++ b//home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md\n@@ -11,7 +11,12 @@\n and that is by design.\n \n **No files are shared with the renko bot.** This folder is self-contained:\n-config.py, signal_engine.py, telegram.py, bot.py, daily_vidya_symbols.yaml.\n+config.py, telegram.py, bot.py, daily_vidya_symbols.yaml.\n+\n+> **Note (Jul 27 2026 rewiring):** `signal_engine.py` is now **dead code**. All\n+> computed values (Renko bricks, SMA, VIDYA, crossover signal, daily anchor)\n+> are fetched from the chart API at `http://127.0.0.1:5050`. The bot no longer\n+> computes anything itself and no longer reads the `daily_vidya` DB.\n \n ## Strategy\n \n", "files_modified": ["/home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md"], "lint": {"status": "skipped", "message": "No linter for .md files"}, "resolved_path": "/home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md"}
2026-07-27 12:26
ASSISTANT (hermes, glm-5.2)
2026-07-27 12:26
TOOL (hermes, glm-5.2)
[Tool: patch] {"success": true, "diff": "--- a//home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md\n+++ b//home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md\n@@ -29,7 +29,7 @@\n BUY_CALL only when CLEAR_LONG, BUY_PUT only when CLEAR_SHORT.\n IN_ZONE → HOLD existing position, no new entries.\n \n-## Data flow (ZERO broker API calls for market data)\n+## Data flow (ZERO broker API calls for market data; ALL computation via chart API)\n \n ```\n incremental_filler.py (cron */5, 9:00–15:xx Mon–Fri, shared chart infra)\n@@ -38,21 +38,25 @@\n bot's 13 symbols are the same symbols the renko system already fills.\n │ writes\n ▼\n-/var/www/openalgo-chart/api/dbs/<name>_5min.db ← READ-ONLY for this bot\n+/var/www/openalgo-chart/api/dbs/<name>_5min.db ← source: 5min_db\n │\n ▼\n-daily anchor cron (Hermes job 0611736006e3, 15:45 Mon–Fri, no-agent script)\n- /home/ubuntu/.hermes/scripts/daily_anchor_store.sh\n- → vidya_daily.py store → computes today's VIDYA from the 5-min DB\n- → writes <name>_daily_vidya.db (daily_anchors), dated TODAY\n- → tomorrow's bot reads it as the line in stone\n- → completeness guard: any symbol not anchored to today's close after 15:40\n- triggers a Telegram maintenance alert\n+chart API (http://127.0.0.1:5050) ← the bot fetches ALL computed values from here\n+ ├─ GET /api/renko-signal/<SYM> → Renko bricks, SMA(2), VIDYA(20), crossover\n+ │ signal (source: 5min_db). Replaces the\n+ │ former in-process signal_engine.py math.\n+ └─ GET /api/daily-vidya/<SYM> → daily anchor (yesterday's VIDYA), the\n+ \"line in stone\". Replaces the former\n+ daily_vidya DB / daily_anchors table.\n ```\n \n-The bot reads BOTH DBs from local disk only. The broker API is touched only\n-at trade time: positionbook (truth for positions), quotes (limit pricing),\n-placeorder/cancelorder.\n+The bot makes **no local DB reads** and **no self-computation**. Two HTTP GETs\n+to the chart API per poll supply every computed value. The broker API is\n+touched only at trade time: positionbook (truth for positions), quotes (limit\n+pricing), placeorder/cancelorder.\n+\n+> `signal_engine.py` remains in the folder but is no longer imported or called\n+> by `bot.py`. It is dead code kept for reference only.\n \n ## The four gates (every poll, in order)\n \n", "files_modified": ["/home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md"], "lint": {"status": "skipped", "message": "No linter for .md files"}, "resolved_path": "/home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md"}
2026-07-27 12:26
ASSISTANT (hermes, glm-5.2)
2026-07-27 12:26
TOOL (hermes, glm-5.2)
[Tool: patch] {"success": true, "diff": "--- a//home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md\n+++ b//home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md\n@@ -66,8 +66,9 @@\n Exception: `order_now` mode acts on the existing crossover on the FIRST\n poll after start (even stale), then switches to fresh-only.\n 2. **ANCHOR GUARD** — the anchor's date must equal the last trading day WITH\n- DATA before today in the symbol's own 5-min DB (handles weekends and\n- holidays automatically). Mismatch → NO entries, Telegram alert once/day.\n+ DATA before today, as reported by the chart API's `/api/daily-vidya/<SYM>`\n+ endpoint (handles weekends and holidays automatically). Mismatch → NO\n+ entries, Telegram alert once/day.\n 3. **ZONE** — IN_ZONE → hold, no entry.\n 4. **DIRECTION** — CALL requires CLEAR_LONG, PUT requires CLEAR_SHORT.\n \n", "files_modified": ["/home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md"], "lint": {"status": "skipped", "message": "No linter for .md files"}, "resolved_path": "/home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md"}
2026-07-27 12:26
ASSISTANT (hermes, glm-5.2)
Now update the Orders section to add the positionbook fix and contract auto-roll:
2026-07-27 12:26
TOOL (hermes, glm-5.2)
[Tool: patch] {"success": true, "diff": "--- a//home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md\n+++ b//home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md\n@@ -80,9 +80,15 @@\n - Per-symbol broker from daily_vidya_symbols.yaml (`order_broker`:\n flattrade / shoonya / kotak). Default shoonya.\n - Option symbol / expiry lookups: shoonya → flattrade → kotak.\n+- **Contract auto-roll:** when selecting the monthly expiry, skip any expiry\n+ within 1 day of today (i.e. expiry − today ≤ 1 day). This avoids taking\n+ delivery-week contracts that are about to expire.\n - OTM1 strike, monthly expiry, NRML product, LIMIT only (LTP ± 3% buffer).\n If no LTP is available the entry is SKIPPED — never a MARKET order.\n - 1 lot per signal, max 2 lots (checked against the live positionbook).\n+- **Positionbook call:** fetch with `apikey` only — do NOT send a `strategy`\n+ field. Sending `strategy` was filtering out this bot's positions and causing\n+ false \"flat\" reads (fixed Jul 27 2026).\n - SL ₹1,500/lot is REPORTED in alerts but not placed as a broker order —\n exit-on-flip is the real risk control (same as the renko bot).\n - Strategy tag on every order: `DailyVIDYA` (isolates positions from the\n", "files_modified": ["/home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md"], "lint": {"status": "skipped", "message": "No linter for .md files"}, "resolved_path": "/home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md"}
2026-07-27 12:26
ASSISTANT (hermes, glm-5.2)
Now update the Statelessness section and the Files section:
2026-07-27 12:26
TOOL (hermes, glm-5.2)
[Tool: patch] {"success": true, "diff": "--- a//home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md\n+++ b//home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md\n@@ -97,8 +97,8 @@\n ## Statelessness\n \n No state files anywhere. Crash → systemd Restart=on-failure → next poll is a\n-full fresh assessment. Broker = truth for positions, 5-min DB = truth for\n-signals, daily_anchors = truth for the zone.\n+full fresh assessment. Broker = truth for positions, chart API = truth for\n+signals and the daily anchor.\n \n ## Lifecycle\n \n", "files_modified": ["/home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md"], "lint": {"status": "skipped", "message": "No linter for .md files"}, "resolved_path": "/home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md"}
2026-07-27 12:26
ASSISTANT (hermes, glm-5.2)
2026-07-27 12:26
TOOL (hermes, glm-5.2)
[Tool: patch] {"success": true, "diff": "--- a//home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md\n+++ b//home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md\n@@ -114,7 +114,9 @@\n /home/ubuntu/bots/daily_vidya_bot/\n bot.py trading loop (this is the whole bot)\n config.py constants + BotConfig + yaml loader\n- signal_engine.py Renko + VIDYA + SMA (identical math to chart)\n+ signal_engine.py DEAD CODE (Jul 27 2026) — kept for reference,\n+ no longer imported by bot.py. All computation\n+ now done by the chart API.\n telegram.py alerts (own copy)\n daily_vidya_symbols.yaml 13 symbols, per-symbol order_broker\n mdocument/\n", "files_modified": ["/home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md"], "lint": {"status": "skipped", "message": "No linter for .md files"}, "resolved_path": "/home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md"}
2026-07-27 12:26
ASSISTANT (hermes, glm-5.2)
Now update the "Shared infra touched" section to remove the daily anchor cron reference:
2026-07-27 12:26
TOOL (hermes, glm-5.2)
[Tool: patch] {"success": true, "diff": "--- a//home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md\n+++ b//home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md\n@@ -133,4 +133,8 @@\n includes daily-vidya-bot@* services.\n - /home/ubuntu/bots/dashboard/dashboard.py + bot_systems.yaml — per-system\n service_prefix (fixes the old bug where this tab controlled renko services).\n-- /home/ubuntu/bots/dashboard/vidya_daily.py — anchor completeness guard.\n+- /var/www/openalgo-chart chart API (`http://127.0.0.1:5050`) — the bot's sole\n+ source for computed values: `/api/renko-signal/<SYM>` (Renko/SMA/VIDYA/\n+ crossover, source 5min_db) and `/api/daily-vidya/<SYM>` (daily anchor).\n+ The old `vidya_daily.py` anchor store + `daily_vidya` DB are no longer\n+ read by this bot.\n", "files_modified": ["/home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md"], "lint": {"status": "skipped", "message": "No linter for .md files"}, "resolved_path": "/home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md"}
2026-07-27 12:26
ASSISTANT (hermes, glm-5.2)
ARCHITECTURE.md is done. Now update WORKING.md — it mentions the daily_vidya DB anchor check:
2026-07-27 12:26
TOOL (hermes, glm-5.2)
[Tool: patch] {"success": true, "diff": "--- a//home/ubuntu/bots/daily_vidya_bot/mdocument/WORKING.md\n+++ b//home/ubuntu/bots/daily_vidya_bot/mdocument/WORKING.md\n@@ -73,8 +73,9 @@\n ## Rules of thumb\n \n - START a bot any time; order_now syncs it to the current signal safely.\n-- Monday morning: verify Friday's anchor exists before starting:\n- `sqlite3 /var/www/openalgo-chart/api/dbs/sbin_daily_vidya.db \\\n- \"SELECT * FROM daily_anchors ORDER BY date DESC LIMIT 1\"`\n+- Monday morning: verify the anchor is present by hitting the chart API:\n+ `curl -s http://127.0.0.1:5050/api/daily-vidya/SBIN | jq .`\n The date must be the previous trading day, or the bot will refuse entries.\n+ (The old `daily_vidya` DB is no longer read — the anchor now comes from the\n+ chart API.)\n - Opposite positions vs the renko bot on the same symbol are NORMAL.\n", "files_modified": ["/home/ubuntu/bots/daily_vidya_bot/mdocument/WORKING.md"], "lint": {"status": "skipped", "message": "No linter for .md files"}, "resolved_path": "/home/ubuntu/bots/daily_vidya_bot/mdocument/WORKING.md"}
2026-07-27 12:26
ASSISTANT (hermes, glm-5.2)
Now update the "Daily rhythm" section in WORKING.md that mentions the anchor cron:
2026-07-27 12:26
TOOL (hermes, glm-5.2)
[Tool: patch] {"success": true, "diff": "--- a//home/ubuntu/bots/daily_vidya_bot/mdocument/WORKING.md\n+++ b//home/ubuntu/bots/daily_vidya_bot/mdocument/WORKING.md\n@@ -66,9 +66,9 @@\n ## Daily rhythm (automatic)\n \n - 09:00–15:30 Mon–Fri — filler keeps running bots' symbols on a 5-min fill\n-- 15:45 Mon–Fri — anchor cron stores today's VIDYA as tomorrow's line in\n- stone (Telegram alert if any symbol misses today's close)\n-- Bot loop — 60s polls, trades only fresh crossovers that pass all gates\n+- Bot loop — 60s polls, fetches all computed values from the chart API\n+ (`/api/renko-signal/<SYM>` + `/api/daily-vidya/<SYM>`), trades only fresh\n+ crossovers that pass all gates\n \n ## Rules of thumb\n \n", "files_modified": ["/home/ubuntu/bots/daily_vidya_bot/mdocument/WORKING.md"], "lint": {"status": "skipped", "message": "No linter for .md files"}, "resolved_path": "/home/ubuntu/bots/daily_vidya_bot/mdocument/WORKING.md"}
2026-07-27 12:26
ASSISTANT (hermes, glm-5.2)
Let me verify the final state of both files:
2026-07-27 12:26
TOOL (hermes, glm-5.2)
[Tool: execute_code] {"status": "success", "output": "{'total_count': 10, 'matches_format': \"path-grouped: each file path on its own line, followed by indented '<line>: <content>' rows for matches in that file\", 'matches_text': '/home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md\\n 16: > **Note (Jul 27 2026 rewiring):** `signal_engine.py` is now **dead code**. All\\n 47: │ former in-process signal_engine.py math.\\n 50: daily_vidya DB / daily_anchors table.\\n 53: The bot makes **no local DB reads** and **no self-computation**. Two HTTP GETs\\n 58: > `signal_engine.py` remains in the folder but is no longer imported or called\\n 117: signal_engine.py DEAD CODE (Jul 27 2026) — kept for reference,\\n 139: The old `vidya_daily.py` anchor store + `daily_vidya` DB are no longer\\n/home/ubuntu/bots/daily_vidya_bot/mdocument/TROUBLESHOOTING.md\\n 14: cd /home/ubuntu/bots/dashboard && python3 vidya_daily.py store\\n 15: sqlite3 /var/www/openalgo-chart/api/dbs/<name>_daily_vidya.db \\\\\\n 16: \"SELECT * FROM daily_anchors ORDER BY date DESC LIMIT 1\"'}\n", "exit_code": 0, "tool_calls_made": 1, "duration_seconds": 0.1, "stdout_truncated": false, "stdout_bytes_captured": 1103, "stdout_bytes_total": 1103, "stdout_bytes_omitted": 0}
2026-07-27 12:26
ASSISTANT (hermes, glm-5.2)
All remaining matches in ARCHITECTURE.md and WORKING.md are intentional references describing what's been replaced. TROUBLESHOOTING.md also has stale references but it wasn't in scope — let me note that. Done. Summary: - Modified `/home/ubuntu/bots/daily_vidya_bot/mdocument/ARCHITECTURE.md`: - Added rewiring note declaring `signal_engine.py` dead code - Rewrote data flow: bot fetches Renko/SMA/VIDYA/crossover from `/api/renko-signal/<SYM>` and daily anchor from `/api/daily-vidya/<SYM>` (chart API at `127.0.0.1:5050`) - Removed daily anchor cron / `daily_vidya` DB references - Updated anchor guard to reference chart API endpoint - Added positionbook fix (apikey only, no strategy field) - Added contract auto-roll rule (skip expiry ≤1 day) - Updated Files listing and Shared infra section - Modified `/home/ubuntu/bots/daily_vidya_bot/mdocument/WORKING.md`: - Replaced sqlite anchor check with `curl` to chart API - Updated daily rhythm to remove anchor cron, mention chart API fetches - Note: `TROUBLESHOOTING.md` also references `vidya_daily.py`/`daily_vidya.db` but was out of scope for this task.
2026-07-27 12:26
USER (hermes, glm-5.2)
Update ARCHITECTURE.md in /home/ubuntu/bots/daily_vidya_bot/mdocument/ to reflect that the bot now fetches ALL computed values from the chart API. Read the current file first, then edit. Key changes: (1) Renko bricks, SMA, VIDYA, crossover signal now come from http://127.0.0.1:5050/api/renko-signal/<SYM> (source: 5min_db) — not self-computed via signal_engine.py. (2) Daily anchor comes from http://127.0.0.1:5050/api/daily-vidya/<SYM> — not from the daily_vidya DB. (3) signal_engine.py is dead code. (4) Positionbook fix: call with apikey only, no strategy field. (5) Contract auto-roll: skip expiry within 1 day. Keep existing strategy docs, just update the data source sections. Also update WORKING.md if it mentions self-computation or signal_engine.py.
2026-07-27 12:26