feat(academy): add 6-step interactive beginner masterclass & learning mode with voice tutoring
This commit is contained in:
@@ -339,6 +339,35 @@ async def hermes_vision_audit(req: HermesVisionRequest):
|
||||
})
|
||||
return res
|
||||
|
||||
@app.get("/api/v1/hermes/explain_trade")
|
||||
def explain_trade(
|
||||
symbol: Optional[str] = "XAUUSD",
|
||||
direction: Optional[str] = "BUY",
|
||||
entry: Optional[float] = None,
|
||||
sl: Optional[float] = None,
|
||||
tp: Optional[float] = None
|
||||
):
|
||||
"""Generates an institutional 6-step educational masterclass in Bengali for complete beginners."""
|
||||
from app.engine.hermes_agent import hermes_copilot
|
||||
tick = connector.get_live_tick(symbol or settings.TARGET_SYMBOL)
|
||||
telemetry = connector.get_telemetry()
|
||||
current_price = tick.get("bid", 2734.80)
|
||||
equity = telemetry.get("equity", 15.19)
|
||||
|
||||
target_entry = entry if (entry and entry > 0) else current_price
|
||||
target_sl = sl if (sl and sl > 0) else round(target_entry - 1.50 if direction == "BUY" else target_entry + 1.50, 2)
|
||||
target_tp = tp if (tp and tp > 0) else round(target_entry + 2.70 if direction == "BUY" else target_entry - 2.70, 2)
|
||||
|
||||
return hermes_copilot.explain_trade_for_beginner(
|
||||
symbol=symbol or "XAUUSD",
|
||||
current_price=current_price,
|
||||
equity=equity,
|
||||
direction=direction or "BUY",
|
||||
entry=target_entry,
|
||||
sl=target_sl,
|
||||
tp=target_tp
|
||||
)
|
||||
|
||||
@app.post("/api/v1/automation/n8n_webhook")
|
||||
async def n8n_inbound_webhook(req: N8nTriggerRequest):
|
||||
"""Inbound webhook router allowing n8n to trigger remote commands (e.g. Telegram /kill)."""
|
||||
|
||||
Reference in New Issue
Block a user