{"openapi":"3.1.0","info":{"title":"Forex AI Assistant API","description":"REST API for forex candles, indicators, risk management, signals, news, and AI analysis.","version":"0.0.1"},"servers":[{"url":"https://forexaiassistant.com","description":"Production"}],"paths":{"/forex/update-all":{"get":{"tags":["forex-controller"],"operationId":"updateAll","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}},"post":{"tags":["forex-controller"],"operationId":"updateAll_1","parameters":[{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/forex/live-rates/refresh":{"post":{"tags":["forex-controller"],"operationId":"refreshLiveRates","parameters":[{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/dashboard/trading-control/resume":{"post":{"tags":["dashboard-controller"],"operationId":"resumeTrading","parameters":[{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TradingControlResponse"}}}}}}},"/dashboard/trading-control/pause":{"post":{"tags":["dashboard-controller"],"operationId":"pauseTrading","parameters":[{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradingControlRequest"}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TradingControlResponse"}}}}}}},"/api/open-signals/execute-pending":{"post":{"tags":["open-signal-controller"],"operationId":"executePending","parameters":[{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}},{"name":"max","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":3}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExecutionSummary"}}}}}}},"/api/news-sentiment/refresh":{"post":{"tags":["news-sentiment-controller"],"operationId":"refresh","parameters":[{"name":"pair","in":"query","required":true,"schema":{"type":"string"}},{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NewsSentimentSnapshot"}}}}}}},"/api/news-sentiment/refresh-all":{"post":{"tags":["news-sentiment-controller"],"operationId":"refreshAll","parameters":[{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NewsSentimentSnapshot"}}}}}}}},"/api/mt5/import-position":{"post":{"tags":["mt-5-controller"],"operationId":"importPosition","parameters":[{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}},{"name":"ticket","in":"query","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TradeSignal"}}}}}}},"/api/mt5-history-candles/{timeframe}":{"post":{"tags":["mt-5-historical-candle-controller"],"operationId":"pushCandles","parameters":[{"name":"timeframe","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveRateCandlePushRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LiveRateCandlePushResponse"}}}}}}},"/api/live-candles/mt5":{"post":{"tags":["live-rate-candle-controller"],"operationId":"pushMt5Candles","parameters":[{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveRateCandlePushRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LiveRateCandlePushResponse"}}}}}}},"/api/alerts/test":{"post":{"tags":["alert-controller"],"operationId":"testAlert","parameters":[{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/ai/trades/{id}/execute-mt5":{"post":{"tags":["ai-decision-controller"],"operationId":"executeOpenTradeOnMt5","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TradeSignal"}}}}}}},"/ai/manual-trade/{from}/{to}":{"post":{"tags":["ai-decision-controller"],"operationId":"openManualTrade","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TradeSignal"}}}}}}},"/dashboard/trades/{id}/journal":{"patch":{"tags":["dashboard-controller"],"operationId":"updateTradeJournal","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeJournalUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TradeHistoryResponse"}}}}}}},"/test":{"get":{"tags":["test-controller"],"operationId":"test","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/news/{pair}":{"get":{"tags":["news-controller"],"operationId":"getNews","parameters":[{"name":"pair","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NewsResponse"}}}}}}},"/news/analysis/{pair}":{"get":{"tags":["news-controller"],"operationId":"analyzeNews","parameters":[{"name":"pair","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NewsAnalysisResponse"}}}}}}},"/hello":{"get":{"tags":["hello-controller"],"operationId":"hello","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/forex/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"getRate","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ForexResponse"}}}}}}},"/forex/watchlist":{"get":{"tags":["forex-controller"],"operationId":"getWatchlist","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ForexResponse"}}}}}}}},"/forex/swing/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"swingSignal","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SwingSignalResponse"}}}}}}},"/forex/swing-trade/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"swingTrade","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SwingTradeResponse"}}}}}}},"/forex/swing-scan":{"get":{"tags":["forex-controller"],"operationId":"swingScan","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SwingTradeResponse"}}}}}}}},"/forex/sma2/{from}/{to}/{period}":{"get":{"tags":["forex-controller"],"operationId":"getCandleSMA","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SmaResponse"}}}}}}},"/forex/sma/{from}/{to}/{period}":{"get":{"tags":["forex-controller"],"operationId":"getSMA","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SmaResponse"}}}}}}},"/forex/signals":{"get":{"tags":["forex-controller"],"operationId":"getSignals","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TradeSignal"}}}}}}}},"/forex/signal2/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"signal2","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SignalV2Response"}}}}}}},"/forex/signal/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"signal","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SignalResponse"}}}}}}},"/forex/rsi2/{from}/{to}/{period}":{"get":{"tags":["forex-controller"],"operationId":"getCandleRSI","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RsiResponse"}}}}}}},"/forex/rsi/{from}/{to}/{period}":{"get":{"tags":["forex-controller"],"operationId":"getRSI","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RsiResponse"}}}}}}},"/forex/regime2/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"regime2","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TrendStrengthResponse"}}}}}}},"/forex/macd2/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"getCandleMACD","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MacdResponse"}}}}}}},"/forex/macd/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"getMACD","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MacdResponse"}}}}}}},"/forex/load/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"loadCandles","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/forex/live-rates":{"get":{"tags":["forex-controller"],"operationId":"liveRates","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LivePairRateResponse"}}}}}}}},"/forex/latest/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"getLatestRate","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ForexRate"}}}}}}},"/forex/history":{"get":{"tags":["forex-controller"],"operationId":"getHistory","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ForexRate"}}}}}}}},"/forex/history/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"getPairHistory","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ForexRate"}}}}}}}},"/forex/ema2/{from}/{to}/{period}":{"get":{"tags":["forex-controller"],"operationId":"getCandleEMA","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EMAResponse"}}}}}}},"/forex/ema/{from}/{to}/{period}":{"get":{"tags":["forex-controller"],"operationId":"getEMA","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EMAResponse"}}}}}}},"/forex/candles/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"getCandles","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ForexCandle"}}}}}}}},"/forex/candles/count":{"get":{"tags":["forex-controller"],"operationId":"countCandles","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"integer","format":"int64"}}}}}}},"/forex/backtest8":{"get":{"tags":["forex-controller"],"operationId":"backtest8","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BacktestV8Response"}}}}}}},"/forex/backtest7/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"backtest7","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BacktestV7Response"}}}}}}},"/forex/backtest6/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"backtest6","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BacktestV6Response"}}}}}}},"/forex/backtest5/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"backtest5","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BacktestV4Response"}}}}}}},"/forex/backtest4/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"backtest4","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BacktestV3Response"}}}}}}},"/forex/backtest3/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"backtest3","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BacktestV2Response"}}}}}}},"/forex/backtest2/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"backtestV2","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BacktestV2Response"}}}}}}},"/forex/backtest/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"backtest","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BacktestResponse"}}}}}}},"/forex/backtest/v9":{"get":{"tags":["forex-controller"],"operationId":"backtestV9","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BacktestV8Response"}}}}}}},"/forex/backtest/v9/diagnostic":{"get":{"tags":["forex-controller"],"operationId":"diagnosticV9","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BacktestDiagnosticResponse"}}}}}}},"/forex/backtest/v8":{"get":{"tags":["forex-controller"],"operationId":"backtestV8","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BacktestV8Response"}}}}}}},"/forex/backtest-diagnostic/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"diagnostic","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BacktestDiagnosticResponse"}}}}}}},"/forex/atr/{from}/{to}/{period}":{"get":{"tags":["forex-controller"],"operationId":"atr","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AtrResponse"}}}}}}},"/forex/atr-levels/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"atrLevels","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ATRTradeLevelsResponse"}}}}}}},"/forex/analyze/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"analyze","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TrendAnalysisResponse"}}}}}}},"/forex/analysis/{from}/{to}":{"get":{"tags":["forex-controller"],"operationId":"analysis","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MarketAnalysisResponse"}}}}}}},"/dashboard/trading-control":{"get":{"tags":["dashboard-controller"],"operationId":"tradingControl","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TradingControlResponse"}}}}}}},"/dashboard/statistics":{"get":{"tags":["dashboard-controller"],"operationId":"statistics","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TradeStatisticsResponse"}}}}}}},"/dashboard/signals/open":{"get":{"tags":["dashboard-controller"],"operationId":"openSignals","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SignalResponse"}}}}}}}},"/dashboard/history":{"get":{"tags":["dashboard-controller"],"operationId":"getTradeHistory","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TradeHistoryResponse"}}}}}}}},"/dashboard/dashboard":{"get":{"tags":["dashboard-controller"],"operationId":"dashboard","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DashboardResponse"}}}}}}},"/dashboard/daily-trade-guard":{"get":{"tags":["dashboard-controller"],"operationId":"dailyTradeGuard","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DailyTradeGuardStatusResponse"}}}}}}},"/dashboard/analyze":{"get":{"tags":["dashboard-controller"],"operationId":"analyze_1","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MarketAnalysisResponse"}}}}}}},"/api/watchlist/mt5-m1":{"get":{"tags":["mt-5-watchlist-controller"],"operationId":"mt5M1Rates","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Mt5WatchlistRateResponse"}}}}}}}},"/api/trend-confirmation/h4":{"get":{"tags":["trend-confirmation-controller"],"operationId":"h4","parameters":[{"name":"pair","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/H4TrendConfirmation"}}}}}}},"/api/signals/stats":{"get":{"tags":["trade-signal-controller"],"operationId":"stats","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/api/signals/open":{"get":{"tags":["trade-signal-controller"],"operationId":"getOpenSignals","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TradeSignal"}}}}}}}},"/api/signals/all":{"get":{"tags":["trade-signal-controller"],"operationId":"getAllSignals","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TradeSignal"}}}}}}}},"/api/setup-detection/h1":{"get":{"tags":["setup-detection-controller"],"operationId":"h1","parameters":[{"name":"pair","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/H1SetupDetection"}}}}}}},"/api/schedulers/status":{"get":{"tags":["scheduler-controller"],"operationId":"status","parameters":[{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SchedulerStatusResponse"}}}}}}}},"/api/risk/calculate":{"get":{"tags":["risk-management-controller"],"operationId":"calculateRisk","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string"}},{"name":"to","in":"query","required":true,"schema":{"type":"string"}},{"name":"timeframe","in":"query","required":false,"schema":{"type":"string","default":"4H"}},{"name":"balance","in":"query","required":true,"schema":{"type":"number","format":"double"}},{"name":"risk","in":"query","required":false,"schema":{"type":"number","format":"double","default":2.0}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RiskManagementResponse"}}}}}}},"/api/open-signals":{"get":{"tags":["open-signal-controller"],"operationId":"latest","parameters":[{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OpenSignal"}}}}}}}},"/api/open-signals/pending":{"get":{"tags":["open-signal-controller"],"operationId":"pending","parameters":[{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OpenSignal"}}}}}}}},"/api/news-sentiment":{"get":{"tags":["news-sentiment-controller"],"operationId":"latest_1","parameters":[{"name":"pair","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NewsSentimentSnapshot"}}}}}}},"/api/news-sentiment/latest":{"get":{"tags":["news-sentiment-controller"],"operationId":"latestSnapshots","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NewsSentimentSnapshot"}}}}}}}},"/api/mt5/reconciliation":{"get":{"tags":["mt-5-controller"],"operationId":"reconciliation","parameters":[{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Mt5ReconciliationResponse"}}}}}}},"/api/mt5/positions":{"get":{"tags":["mt-5-controller"],"operationId":"positions","parameters":[{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Mt5PositionsResponse"}}}}}}},"/api/mt5/closed-position":{"get":{"tags":["mt-5-controller"],"operationId":"closedPosition","parameters":[{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}},{"name":"ticket","in":"query","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Mt5ClosedPositionResponse"}}}}}}},"/api/mt5-history-candles/{timeframe}/latest":{"get":{"tags":["mt-5-historical-candle-controller"],"operationId":"latest_2","parameters":[{"name":"timeframe","in":"path","required":true,"schema":{"type":"string"}},{"name":"pair","in":"query","required":true,"schema":{"type":"string"}},{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Mt5CandleBase"}}}}}}},"/api/mt5-history-candles/{timeframe}/count":{"get":{"tags":["mt-5-historical-candle-controller"],"operationId":"count","parameters":[{"name":"timeframe","in":"path","required":true,"schema":{"type":"string"}},{"name":"pair","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"integer","format":"int64"}}}}}}},"/api/market-bias/d1":{"get":{"tags":["market-bias-controller"],"operationId":"d1Bias","parameters":[{"name":"pair","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DailyMarketBias"}}}}}}},"/api/live-candles/latest":{"get":{"tags":["live-rate-candle-controller"],"operationId":"latest_3","parameters":[{"name":"pair","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LiveRateCandle"}}}}}}},"/api/live-candles/count":{"get":{"tags":["live-rate-candle-controller"],"operationId":"count_1","parameters":[{"name":"pair","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"integer","format":"int64"}}}}}}},"/api/entry-check":{"get":{"tags":["entry-timing-controller"],"operationId":"check","parameters":[{"name":"pair","in":"query","required":true,"schema":{"type":"string"}},{"name":"timeframe","in":"query","required":false,"schema":{"type":"string","default":"M5"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EntryTiming"}}}}}}},"/api/entry-check/best":{"get":{"tags":["entry-timing-controller"],"operationId":"best","parameters":[{"name":"pair","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EntryTiming"}}}}}}},"/api/charts/mt5":{"get":{"tags":["mt-5-chart-controller"],"operationId":"mt5Chart","parameters":[{"name":"pair","in":"query","required":true,"schema":{"type":"string"}},{"name":"timeframe","in":"query","required":false,"schema":{"type":"string","default":"M5"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":300}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Mt5ChartCandleResponse"}}}}}}}},"/api/backtests/strategy":{"get":{"tags":["backtest-controller"],"operationId":"strategy","parameters":[{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":30}},{"name":"pair","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StrategyBacktestResponse"}}}}}}},"/api/backtests/last-30-days":{"get":{"tags":["backtest-controller"],"operationId":"last30Days","parameters":[{"name":"X-ADMIN-KEY","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StrategyBacktestResponse"}}}}}}},"/ai/test":{"get":{"tags":["ai-decision-controller"],"operationId":"test_1","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/ai/analyze/{from}/{to}":{"get":{"tags":["ai-decision-controller"],"operationId":"analyze_2","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":"string"}},{"name":"to","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AiMarketDecisionResponse"}}}}}}}},"components":{"schemas":{"TradingControlResponse":{"type":"object","properties":{"tradingDate":{"type":"string","format":"date"},"paused":{"type":"boolean"},"reason":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"}}},"TradingControlRequest":{"type":"object","properties":{"reason":{"type":"string"}}},"ExecutionSummary":{"type":"object","properties":{"scanned":{"type":"integer","format":"int32"},"executed":{"type":"integer","format":"int32"},"errors":{"type":"integer","format":"int32"},"message":{"type":"string"}}},"NewsSentimentSnapshot":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"pair":{"type":"string"},"sentiment":{"type":"string"},"impact":{"type":"string"},"recommendation":{"type":"string"},"averageSentiment":{"type":"number","format":"double"},"articleCount":{"type":"integer","format":"int32"},"summary":{"type":"string"},"collectedAt":{"type":"string","format":"date-time"}}},"TradeSignal":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"pair":{"type":"string"},"timeframe":{"type":"string"},"signal":{"type":"string"},"entryPrice":{"type":"number","format":"double"},"stopLoss":{"type":"number","format":"double"},"takeProfit":{"type":"number","format":"double"},"plannedEntryPrice":{"type":"number","format":"double"},"plannedStopLoss":{"type":"number","format":"double"},"plannedTakeProfit":{"type":"number","format":"double"},"exitPrice":{"type":"number","format":"double"},"mt5Ticket":{"type":"integer","format":"int64"},"executionStatus":{"type":"string"},"executionMessage":{"type":"string"},"executionPrice":{"type":"number","format":"double"},"score":{"type":"integer","format":"int32"},"grade":{"type":"string"},"explanation":{"type":"string"},"scoreBreakdown":{"type":"string"},"journalNotes":{"type":"string"},"journalTags":{"type":"string"},"status":{"type":"string"},"result":{"type":"string"},"accountBalance":{"type":"number","format":"double"},"riskPercent":{"type":"number","format":"double"},"riskAmount":{"type":"number","format":"double"},"positionSize":{"type":"number","format":"double"},"expectedProfit":{"type":"number","format":"double"},"expectedLoss":{"type":"number","format":"double"},"riskReward":{"type":"string"},"riskMultiple":{"type":"number","format":"double"},"pnl":{"type":"number","format":"double"},"commission":{"type":"number","format":"double"},"swap":{"type":"number","format":"double"},"durationMinutes":{"type":"integer","format":"int32"},"createdAt":{"type":"string","format":"date-time"},"closedAt":{"type":"string","format":"date-time"}}},"LiveRateCandleItemRequest":{"type":"object","properties":{"time":{"type":"string","minLength":1},"open":{"type":"number","format":"double"},"high":{"type":"number","format":"double"},"low":{"type":"number","format":"double"},"close":{"type":"number","format":"double"},"tickVolume":{"type":"integer","format":"int64"},"spread":{"type":"integer","format":"int32"},"realVolume":{"type":"integer","format":"int64"}},"required":["close","high","low","open","time"]},"LiveRateCandlePushRequest":{"type":"object","properties":{"symbol":{"type":"string","minLength":1},"pair":{"type":"string"},"source":{"type":"string"},"timeframe":{"type":"string"},"candles":{"type":"array","items":{"$ref":"#/components/schemas/LiveRateCandleItemRequest"},"minItems":1}},"required":["candles","symbol"]},"LiveRateCandlePushResponse":{"type":"object","properties":{"pair":{"type":"string"},"source":{"type":"string"},"timeframe":{"type":"string"},"received":{"type":"integer","format":"int32"},"inserted":{"type":"integer","format":"int32"},"skipped":{"type":"integer","format":"int32"},"deletedOld":{"type":"integer","format":"int64"}}},"TradeJournalUpdateRequest":{"type":"object","properties":{"journalNotes":{"type":"string"},"journalTags":{"type":"string"}}},"TradeHistoryResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"pair":{"type":"string"},"timeframe":{"type":"string"},"signal":{"type":"string"},"entryPrice":{"type":"number","format":"double"},"stopLoss":{"type":"number","format":"double"},"takeProfit":{"type":"number","format":"double"},"plannedEntryPrice":{"type":"number","format":"double"},"plannedStopLoss":{"type":"number","format":"double"},"plannedTakeProfit":{"type":"number","format":"double"},"pnl":{"type":"number","format":"double"},"result":{"type":"string"},"score":{"type":"integer","format":"int32"},"grade":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"closedAt":{"type":"string","format":"date-time"},"explanation":{"type":"string"},"scoreBreakdown":{"type":"string"},"journalNotes":{"type":"string"},"journalTags":{"type":"string"}}},"NewsArticle":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"source":{"type":"string"},"publishedAt":{"type":"string"},"sentiment":{"type":"number","format":"double"}}},"NewsResponse":{"type":"object","properties":{"pair":{"type":"string"},"news":{"type":"array","items":{"$ref":"#/components/schemas/NewsArticle"}}}},"NewsAnalysisResponse":{"type":"object","properties":{"pair":{"type":"string"},"sentiment":{"type":"string"},"impact":{"type":"string"},"averageSentiment":{"type":"number","format":"double"},"recommendation":{"type":"string"},"summary":{"type":"string"},"news":{"type":"array","items":{"$ref":"#/components/schemas/NewsArticle"}}}},"ForexResponse":{"type":"object","properties":{"fromCurrency":{"type":"string"},"toCurrency":{"type":"string"},"exchangeRate":{"type":"string"}}},"SwingSignalResponse":{"type":"object","properties":{"pair":{"type":"string"},"trend":{"type":"string"},"price":{"type":"number","format":"double"},"ema20":{"type":"number","format":"double"},"rsi":{"type":"number","format":"double"},"swingBuySetup":{"type":"boolean"}}},"SwingTradeResponse":{"type":"object","properties":{"pair":{"type":"string"},"signal":{"type":"string"},"entryPrice":{"type":"number","format":"double"},"atr":{"type":"number","format":"double"},"stopLoss":{"type":"number","format":"double"},"takeProfit":{"type":"number","format":"double"},"riskReward":{"type":"string"},"score":{"type":"integer","format":"int32"},"grade":{"type":"string"},"explanation":{"type":"string"},"scoreBreakdown":{"type":"string"}}},"SmaResponse":{"type":"object","properties":{"fromCurrency":{"type":"string"},"toCurrency":{"type":"string"},"period":{"type":"integer","format":"int32"},"sma":{"type":"number","format":"double"}}},"SignalV2Response":{"type":"object","properties":{"pair":{"type":"string"},"signal":{"type":"string"},"confidence":{"type":"integer","format":"int32"},"reason":{"type":"string"},"bullishScore":{"type":"integer","format":"int32"},"bearishScore":{"type":"integer","format":"int32"}}},"SignalResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"pair":{"type":"string"},"timeframe":{"type":"string"},"signal":{"type":"string"},"entryPrice":{"type":"number","format":"double"},"stopLoss":{"type":"number","format":"double"},"takeProfit":{"type":"number","format":"double"},"plannedEntryPrice":{"type":"number","format":"double"},"plannedStopLoss":{"type":"number","format":"double"},"plannedTakeProfit":{"type":"number","format":"double"},"score":{"type":"integer","format":"int32"},"grade":{"type":"string"},"status":{"type":"string"},"result":{"type":"string"},"pnl":{"type":"number","format":"double"},"createdAt":{"type":"string","format":"date-time"},"closedAt":{"type":"string","format":"date-time"},"confidence":{"type":"string"},"reason":{"type":"string"},"scoreBreakdown":{"type":"string"},"accountBalance":{"type":"number","format":"double"},"riskPercent":{"type":"number","format":"double"},"riskAmount":{"type":"number","format":"double"},"positionSize":{"type":"number","format":"double"},"expectedProfit":{"type":"number","format":"double"},"expectedLoss":{"type":"number","format":"double"},"riskReward":{"type":"string"},"riskMultiple":{"type":"number","format":"double"},"accountCurrency":{"type":"string"},"mt5Ticket":{"type":"integer","format":"int64"},"executionStatus":{"type":"string"},"executionMessage":{"type":"string"},"executionPrice":{"type":"number","format":"double"}}},"RsiResponse":{"type":"object","properties":{"fromCurrency":{"type":"string"},"toCurrency":{"type":"string"},"period":{"type":"integer","format":"int32"},"rsi":{"type":"number","format":"double"}}},"TrendStrengthResponse":{"type":"object","properties":{"pair":{"type":"string"},"regime":{"type":"string"},"sma50":{"type":"number","format":"double"},"sma200":{"type":"number","format":"double"},"atr":{"type":"number","format":"double"},"trendStrength":{"type":"number","format":"double"}}},"MacdResponse":{"type":"object","properties":{"fromCurrency":{"type":"string"},"toCurrency":{"type":"string"},"ema12":{"type":"number","format":"double"},"ema26":{"type":"number","format":"double"},"macd":{"type":"number","format":"double"}}},"LivePairRateResponse":{"type":"object","properties":{"pair":{"type":"string"},"fromCurrency":{"type":"string"},"toCurrency":{"type":"string"},"exchangeRate":{"type":"number","format":"double"},"fetchedAt":{"type":"string","format":"date-time"},"fresh":{"type":"boolean"},"status":{"type":"string"}}},"ForexRate":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"fromCurrency":{"type":"string"},"toCurrency":{"type":"string"},"exchangeRate":{"type":"string"},"fetchedAt":{"type":"string","format":"date-time"}}},"EMAResponse":{"type":"object","properties":{"fromCurrency":{"type":"string"},"toCurrency":{"type":"string"},"period":{"type":"integer","format":"int32"},"ema":{"type":"number","format":"double"}}},"ForexCandle":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"symbol":{"type":"string"},"timeframe":{"type":"string"},"openPrice":{"type":"number","format":"double"},"highPrice":{"type":"number","format":"double"},"lowPrice":{"type":"number","format":"double"},"closePrice":{"type":"number","format":"double"},"candleTime":{"type":"string","format":"date-time"}}},"BacktestV8Response":{"type":"object","properties":{"pairsTested":{"type":"integer","format":"int32"},"totalTrades":{"type":"integer","format":"int32"},"wins":{"type":"integer","format":"int32"},"losses":{"type":"integer","format":"int32"},"winRate":{"type":"number","format":"double"},"profitFactor":{"type":"number","format":"double"},"netReturn":{"type":"number","format":"double"}}},"BacktestV7Response":{"type":"object","properties":{"pair":{"type":"string"},"totalTrades":{"type":"integer","format":"int32"},"wins":{"type":"integer","format":"int32"},"losses":{"type":"integer","format":"int32"},"winRate":{"type":"number","format":"double"},"profitFactor":{"type":"number","format":"double"},"netReturn":{"type":"number","format":"double"}}},"BacktestV6Response":{"type":"object","properties":{"pair":{"type":"string"},"totalTrades":{"type":"integer","format":"int32"},"wins":{"type":"integer","format":"int32"},"losses":{"type":"integer","format":"int32"},"winRate":{"type":"number","format":"double"},"profitFactor":{"type":"number","format":"double"},"netReturn":{"type":"number","format":"double"}}},"BacktestV4Response":{"type":"object","properties":{"pair":{"type":"string"},"totalTrades":{"type":"integer","format":"int32"},"wins":{"type":"integer","format":"int32"},"losses":{"type":"integer","format":"int32"},"winRate":{"type":"number","format":"double"},"profitFactor":{"type":"number","format":"double"},"netReturn":{"type":"number","format":"double"}}},"BacktestV3Response":{"type":"object","properties":{"pair":{"type":"string"},"totalTrades":{"type":"integer","format":"int32"},"wins":{"type":"integer","format":"int32"},"losses":{"type":"integer","format":"int32"},"winRate":{"type":"number","format":"double"},"averageWin":{"type":"number","format":"double"},"averageLoss":{"type":"number","format":"double"},"profitFactor":{"type":"number","format":"double"}}},"BacktestV2Response":{"type":"object","properties":{"pair":{"type":"string"},"totalTrades":{"type":"integer","format":"int32"},"wins":{"type":"integer","format":"int32"},"losses":{"type":"integer","format":"int32"},"winRate":{"type":"number","format":"double"}}},"BacktestResponse":{"type":"object","properties":{"pair":{"type":"string"},"records":{"type":"integer","format":"int32"},"averagePrice":{"type":"number","format":"double"},"latestPrice":{"type":"number","format":"double"},"changePercent":{"type":"number","format":"double"}}},"BacktestDiagnosticResponse":{"type":"object","properties":{"pair":{"type":"string"},"buyTrades":{"type":"integer","format":"int32"},"buyWins":{"type":"integer","format":"int32"},"sellTrades":{"type":"integer","format":"int32"},"sellWins":{"type":"integer","format":"int32"},"buyWinRate":{"type":"number","format":"double"},"sellWinRate":{"type":"number","format":"double"}}},"AtrResponse":{"type":"object","properties":{"pair":{"type":"string"},"period":{"type":"integer","format":"int32"},"atr":{"type":"number","format":"double"}}},"ATRTradeLevelsResponse":{"type":"object","properties":{"pair":{"type":"string"},"entryPrice":{"type":"number","format":"double"},"atr":{"type":"number","format":"double"},"buyStopLoss":{"type":"number","format":"double"},"buyTakeProfit":{"type":"number","format":"double"},"sellStopLoss":{"type":"number","format":"double"},"sellTakeProfit":{"type":"number","format":"double"}}},"TrendAnalysisResponse":{"type":"object","properties":{"pair":{"type":"string"},"trend":{"type":"string"},"rsi":{"type":"number","format":"double"},"macd":{"type":"number","format":"double"},"summary":{"type":"string"}}},"MarketAnalysisResponse":{"type":"object","properties":{"signal":{"type":"string"},"confidence":{"type":"integer","format":"int32"},"trend":{"type":"string"},"rsi":{"type":"string"},"movingAverage":{"type":"string"},"priceAction":{"type":"string"},"risk":{"type":"string"},"recommendation":{"type":"string"},"explanation":{"type":"string"},"tradeQuality":{"type":"string"}}},"TradeStatisticsResponse":{"type":"object","properties":{"totalTrades":{"type":"integer","format":"int64"},"openTrades":{"type":"integer","format":"int64"},"closedTrades":{"type":"integer","format":"int64"},"winningTrades":{"type":"integer","format":"int64"},"losingTrades":{"type":"integer","format":"int64"},"winRate":{"type":"number","format":"double"},"totalProfit":{"type":"number","format":"double"},"totalLoss":{"type":"number","format":"double"},"netProfit":{"type":"number","format":"double"},"profitFactor":{"type":"number","format":"double"},"averageWin":{"type":"number","format":"double"},"averageLoss":{"type":"number","format":"double"},"expectancy":{"type":"number","format":"double"},"averageRiskMultiple":{"type":"number","format":"double"},"largestWin":{"type":"number","format":"double"},"largestLoss":{"type":"number","format":"double"}}},"DashboardResponse":{"type":"object","properties":{"openTrades":{"type":"integer","format":"int64"},"totalTrades":{"type":"integer","format":"int64"},"wins":{"type":"integer","format":"int64"},"losses":{"type":"integer","format":"int64"},"winRate":{"type":"number","format":"double"},"bestPair":{"type":"string"}}},"DailyTradeGuardStatusResponse":{"type":"object","properties":{"enabled":{"type":"boolean"},"allowed":{"type":"boolean"},"status":{"type":"string"},"message":{"type":"string"},"tradesToday":{"type":"integer","format":"int32"},"maxTrades":{"type":"integer","format":"int32"},"winsToday":{"type":"integer","format":"int32"},"lossesToday":{"type":"integer","format":"int32"},"openToday":{"type":"integer","format":"int32"},"closedToday":{"type":"integer","format":"int32"},"expiredToday":{"type":"integer","format":"int32"},"checkpointTrades":{"type":"integer","format":"int32"},"checkpointMinWins":{"type":"integer","format":"int32"},"checkpointWins":{"type":"integer","format":"int32"},"checkpointLosses":{"type":"integer","format":"int32"},"checkpointClosed":{"type":"integer","format":"int32"},"checkpointStatus":{"type":"string"},"nextTradeNumber":{"type":"integer","format":"int32"},"accountCurrency":{"type":"string"},"accountBalance":{"type":"number","format":"double"},"riskPercentPerTrade":{"type":"number","format":"double"},"riskAmountPerTrade":{"type":"number","format":"double"},"maxDailyRiskPercent":{"type":"number","format":"double"},"dailyRiskUsed":{"type":"number","format":"double"},"dailyRiskLimit":{"type":"number","format":"double"},"dailyRiskRemaining":{"type":"number","format":"double"},"maxOpenRiskPercent":{"type":"number","format":"double"},"openRisk":{"type":"number","format":"double"},"openRiskLimit":{"type":"number","format":"double"},"openRiskRemaining":{"type":"number","format":"double"}}},"Mt5WatchlistRateResponse":{"type":"object","properties":{"pair":{"type":"string"},"symbol":{"type":"string"},"timeframe":{"type":"string"},"rate":{"type":"number","format":"double"},"open":{"type":"number","format":"double"},"high":{"type":"number","format":"double"},"low":{"type":"number","format":"double"},"change":{"type":"number","format":"double"},"changePercent":{"type":"number","format":"double"},"tickVolume":{"type":"integer","format":"int64"},"spread":{"type":"integer","format":"int32"},"candleTime":{"type":"string","format":"date-time"},"available":{"type":"boolean"}}},"H4TrendConfirmation":{"type":"object","properties":{"pair":{"type":"string"},"signal":{"type":"string"},"price":{"type":"number","format":"double"},"ema20":{"type":"number","format":"double"},"sma50":{"type":"number","format":"double"},"sma200":{"type":"number","format":"double"},"rsi":{"type":"number","format":"double"},"atr":{"type":"number","format":"double"},"atrPercent":{"type":"number","format":"double"},"averageAtr":{"type":"number","format":"double"},"volatility":{"type":"string"},"marketStructure":{"type":"string"},"latestSwingHigh":{"type":"number","format":"double"},"previousSwingHigh":{"type":"number","format":"double"},"latestSwingLow":{"type":"number","format":"double"},"previousSwingLow":{"type":"number","format":"double"},"bullishScore":{"type":"integer","format":"int32"},"bearishScore":{"type":"integer","format":"int32"},"candleCount":{"type":"integer","format":"int32"},"available":{"type":"boolean"}}},"H1SetupDetection":{"type":"object","properties":{"pair":{"type":"string"},"signal":{"type":"string"},"setupExists":{"type":"boolean"},"price":{"type":"number","format":"double"},"ema20":{"type":"number","format":"double"},"rsi":{"type":"number","format":"double"},"previousRsi":{"type":"number","format":"double"},"breakoutResistance":{"type":"number","format":"double"},"breakoutSupport":{"type":"number","format":"double"},"bullishPullbackToEma20":{"type":"boolean"},"bearishPullbackToEma20":{"type":"boolean"},"bullishBreakout":{"type":"boolean"},"bearishBreakout":{"type":"boolean"},"bullishRsiRecovery":{"type":"boolean"},"bearishRsiRecovery":{"type":"boolean"},"bullishCandleConfirmation":{"type":"boolean"},"bearishCandleConfirmation":{"type":"boolean"},"volumeIncreasing":{"type":"boolean"},"buyScore":{"type":"integer","format":"int32"},"sellScore":{"type":"integer","format":"int32"},"candleCount":{"type":"integer","format":"int32"},"available":{"type":"boolean"}}},"SchedulerStatusResponse":{"type":"object","properties":{"name":{"type":"string"},"enabled":{"type":"boolean"},"lastStartedAt":{"type":"string","format":"date-time"},"lastFinishedAt":{"type":"string","format":"date-time"},"lastStatus":{"type":"string"},"lastMessage":{"type":"string"},"itemsScanned":{"type":"integer","format":"int32"},"signalsCreated":{"type":"integer","format":"int32"},"errors":{"type":"integer","format":"int32"}}},"RiskManagementResponse":{"type":"object","properties":{"pair":{"type":"string"},"signal":{"type":"string"},"accountBalance":{"type":"number","format":"double"},"riskPercent":{"type":"number","format":"double"},"riskAmount":{"type":"number","format":"double"},"entryPrice":{"type":"number","format":"double"},"stopLoss":{"type":"number","format":"double"},"takeProfit":{"type":"number","format":"double"},"stopDistancePips":{"type":"number","format":"double"},"positionSizeLots":{"type":"number","format":"double"},"riskReward":{"type":"string"},"expectedProfit":{"type":"number","format":"double"},"expectedLoss":{"type":"number","format":"double"},"leverageRequired":{"type":"number","format":"double"},"recommendation":{"type":"string"}}},"OpenSignal":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"pair":{"type":"string"},"timeframe":{"type":"string"},"signal":{"type":"string"},"entryPrice":{"type":"number","format":"double"},"stopLoss":{"type":"number","format":"double"},"takeProfit":{"type":"number","format":"double"},"atr":{"type":"number","format":"double"},"score":{"type":"integer","format":"int32"},"grade":{"type":"string"},"riskReward":{"type":"string"},"explanation":{"type":"string"},"scoreBreakdown":{"type":"string"},"status":{"type":"string"},"source":{"type":"string"},"executionStatus":{"type":"string"},"executionMessage":{"type":"string"},"mt5Ticket":{"type":"integer","format":"int64"},"detectedAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"processedAt":{"type":"string","format":"date-time"}}},"Mt5ReconciliationItemResponse":{"type":"object","properties":{"status":{"type":"string"},"appTradeId":{"type":"integer","format":"int64"},"appPair":{"type":"string"},"appSignal":{"type":"string"},"appStatus":{"type":"string"},"mt5Ticket":{"type":"integer","format":"int64"},"mt5Symbol":{"type":"string"},"mt5Side":{"type":"string"},"mt5Volume":{"type":"number","format":"double"},"mt5OpenPrice":{"type":"number","format":"double"},"mt5CurrentPrice":{"type":"number","format":"double"},"mt5Profit":{"type":"number","format":"double"},"appOpenedAt":{"type":"string","format":"date-time"},"message":{"type":"string"}}},"Mt5ReconciliationResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"appOpenTrades":{"type":"integer","format":"int32"},"mt5OpenPositions":{"type":"integer","format":"int32"},"matched":{"type":"integer","format":"int32"},"appOnly":{"type":"integer","format":"int32"},"mt5Only":{"type":"integer","format":"int32"},"noTicket":{"type":"integer","format":"int32"},"timestamp":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Mt5ReconciliationItemResponse"}}}},"Mt5PositionResponse":{"type":"object","properties":{"ticket":{"type":"integer","format":"int64"},"symbol":{"type":"string"},"side":{"type":"string"},"volume":{"type":"number","format":"double"},"openPrice":{"type":"number","format":"double"},"currentPrice":{"type":"number","format":"double"},"stopLoss":{"type":"number","format":"double"},"takeProfit":{"type":"number","format":"double"},"profit":{"type":"number","format":"double"},"swap":{"type":"number","format":"double"},"magic":{"type":"integer","format":"int32"},"comment":{"type":"string"},"openedAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Mt5PositionsResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"count":{"type":"integer","format":"int32"},"positions":{"type":"array","items":{"$ref":"#/components/schemas/Mt5PositionResponse"}},"timestamp":{"type":"string","format":"date-time"},"message":{"type":"string"}}},"Mt5ClosedPositionResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"closed":{"type":"boolean"},"message":{"type":"string"},"ticket":{"type":"integer","format":"int64"},"positionTicket":{"type":"integer","format":"int64"},"orderTicket":{"type":"integer","format":"int64"},"symbol":{"type":"string"},"closeSide":{"type":"string"},"volume":{"type":"number","format":"double"},"closePrice":{"type":"number","format":"double"},"profit":{"type":"number","format":"double"},"commission":{"type":"number","format":"double"},"swap":{"type":"number","format":"double"},"reasonCode":{"type":"integer","format":"int32"},"reason":{"type":"string"},"comment":{"type":"string"},"closedAt":{"type":"string","format":"date-time"},"timestamp":{"type":"string","format":"date-time"}}},"Mt5CandleBase":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"pair":{"type":"string"},"symbol":{"type":"string"},"candleTime":{"type":"string","format":"date-time"},"openPrice":{"type":"number","format":"double"},"highPrice":{"type":"number","format":"double"},"lowPrice":{"type":"number","format":"double"},"closePrice":{"type":"number","format":"double"},"tickVolume":{"type":"integer","format":"int64"},"spread":{"type":"integer","format":"int32"},"realVolume":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"}}},"DailyMarketBias":{"type":"object","properties":{"pair":{"type":"string"},"bias":{"type":"string"},"price":{"type":"number","format":"double"},"ema200":{"type":"number","format":"double"},"sma200":{"type":"number","format":"double"},"marketStructure":{"type":"string"},"support":{"type":"number","format":"double"},"resistance":{"type":"number","format":"double"},"rangePosition":{"type":"number","format":"double"},"distanceToSupportPercent":{"type":"number","format":"double"},"distanceToResistancePercent":{"type":"number","format":"double"},"nearSupport":{"type":"boolean"},"nearResistance":{"type":"boolean"},"bullishScore":{"type":"integer","format":"int32"},"bearishScore":{"type":"integer","format":"int32"},"candleCount":{"type":"integer","format":"int32"},"available":{"type":"boolean"}}},"LiveRateCandle":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"pair":{"type":"string"},"source":{"type":"string"},"timeframe":{"type":"string"},"openPrice":{"type":"number","format":"double"},"highPrice":{"type":"number","format":"double"},"lowPrice":{"type":"number","format":"double"},"closePrice":{"type":"number","format":"double"},"tickVolume":{"type":"integer","format":"int64"},"spread":{"type":"integer","format":"int32"},"realVolume":{"type":"integer","format":"int64"},"candleTime":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}},"EntryTiming":{"type":"object","properties":{"pair":{"type":"string"},"timeframe":{"type":"string"},"signal":{"type":"string"},"entryReady":{"type":"boolean"},"price":{"type":"number","format":"double"},"ema9":{"type":"number","format":"double"},"ema20":{"type":"number","format":"double"},"previousEma9":{"type":"number","format":"double"},"previousEma20":{"type":"number","format":"double"},"rsi":{"type":"number","format":"double"},"atr":{"type":"number","format":"double"},"minorResistance":{"type":"number","format":"double"},"minorSupport":{"type":"number","format":"double"},"bullishEngulfing":{"type":"boolean"},"bearishEngulfing":{"type":"boolean"},"bullishEmaCrossover":{"type":"boolean"},"bearishEmaCrossover":{"type":"boolean"},"breakMinorResistance":{"type":"boolean"},"breakMinorSupport":{"type":"boolean"},"bullishMomentum":{"type":"boolean"},"bearishMomentum":{"type":"boolean"},"buyScore":{"type":"integer","format":"int32"},"sellScore":{"type":"integer","format":"int32"},"candleCount":{"type":"integer","format":"int32"},"available":{"type":"boolean"}}},"Mt5ChartCandleResponse":{"type":"object","properties":{"time":{"type":"integer","format":"int64"},"candleTime":{"type":"string"},"open":{"type":"number","format":"double"},"high":{"type":"number","format":"double"},"low":{"type":"number","format":"double"},"close":{"type":"number","format":"double"},"tickVolume":{"type":"integer","format":"int64"}}},"BacktestDiagnosticSummaryResponse":{"type":"object","properties":{"category":{"type":"string"},"bucket":{"type":"string"},"trades":{"type":"integer","format":"int32"},"wins":{"type":"integer","format":"int32"},"losses":{"type":"integer","format":"int32"},"timeExits":{"type":"integer","format":"int32"},"winRate":{"type":"number","format":"double"},"netR":{"type":"number","format":"double"},"averageR":{"type":"number","format":"double"},"averageDurationMinutes":{"type":"number","format":"double"},"averageMaxFavorableR":{"type":"number","format":"double"},"averageMaxAdverseR":{"type":"number","format":"double"}}},"BacktestPairSummaryResponse":{"type":"object","properties":{"pair":{"type":"string"},"trades":{"type":"integer","format":"int32"},"wins":{"type":"integer","format":"int32"},"losses":{"type":"integer","format":"int32"},"timeExits":{"type":"integer","format":"int32"},"winRate":{"type":"number","format":"double"},"netR":{"type":"number","format":"double"},"netPips":{"type":"number","format":"double"}}},"BacktestTradeResponse":{"type":"object","properties":{"pair":{"type":"string"},"signal":{"type":"string"},"result":{"type":"string"},"entryTime":{"type":"string","format":"date-time"},"exitTime":{"type":"string","format":"date-time"},"entryPrice":{"type":"number","format":"double"},"stopLoss":{"type":"number","format":"double"},"takeProfit":{"type":"number","format":"double"},"exitPrice":{"type":"number","format":"double"},"pnlR":{"type":"number","format":"double"},"pnlPips":{"type":"number","format":"double"},"maxFavorableR":{"type":"number","format":"double"},"maxAdverseR":{"type":"number","format":"double"},"maxFavorablePips":{"type":"number","format":"double"},"maxAdversePips":{"type":"number","format":"double"},"durationMinutes":{"type":"integer","format":"int64"},"score":{"type":"integer","format":"int32"},"grade":{"type":"string"},"scoreBucket":{"type":"string"},"session":{"type":"string"},"exitReason":{"type":"string"},"entryTimeframe":{"type":"string"},"entryConfirmation":{"type":"string"},"dailyBias":{"type":"string"},"h4Signal":{"type":"string"},"h1Signal":{"type":"string"},"notes":{"type":"string"}}},"StrategyBacktestResponse":{"type":"object","properties":{"strategyVersion":{"type":"string"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"days":{"type":"integer","format":"int32"},"pairsScanned":{"type":"integer","format":"int32"},"evaluations":{"type":"integer","format":"int32"},"skippedInsufficientHistory":{"type":"integer","format":"int32"},"trades":{"type":"integer","format":"int32"},"wins":{"type":"integer","format":"int32"},"losses":{"type":"integer","format":"int32"},"timeExits":{"type":"integer","format":"int32"},"winRate":{"type":"number","format":"double"},"netR":{"type":"number","format":"double"},"netPips":{"type":"number","format":"double"},"averageR":{"type":"number","format":"double"},"maxDrawdownR":{"type":"number","format":"double"},"bestPair":{"type":"string"},"worstPair":{"type":"string"},"diagnosticSummaries":{"type":"array","items":{"$ref":"#/components/schemas/BacktestDiagnosticSummaryResponse"}},"pairSummaries":{"type":"array","items":{"$ref":"#/components/schemas/BacktestPairSummaryResponse"}},"tradesList":{"type":"array","items":{"$ref":"#/components/schemas/BacktestTradeResponse"}}}},"AiMarketDecisionResponse":{"type":"object","properties":{"pair":{"type":"string"},"technicalTrend":{"type":"string"},"newsSentiment":{"type":"string"},"tradeQuality":{"type":"string"},"recommendation":{"type":"string"},"confidence":{"type":"integer","format":"int32"},"risk":{"type":"string"},"entryPrice":{"type":"number","format":"double"},"stopLoss":{"type":"number","format":"double"},"takeProfit":{"type":"number","format":"double"},"aiExplanation":{"type":"string"}}}}}}