MCPcopy Create free account

hub / github.com/aitradingbotspro/cryto-trading-ai-assistant / functions

Functions93 in github.com/aitradingbotspro/cryto-trading-ai-assistant

↓ 28 callersFunctioniso
(minsAgo: number)
dashboard/src/mockData.ts:7
↓ 7 callersFunctionget_settings
()
app/config.py:45
↓ 7 callersFunctionmockDelay
(ms = 200)
dashboard/src/mockData.ts:240
↓ 4 callersMethod_get_client
(self)
modules/exchange_connector/bybit.py:31
↓ 4 callersMethod_get_client
(self)
modules/exchange_connector/binance.py:31
↓ 4 callersFunctionformatUsd
(n: number)
dashboard/src/pages/Trades.tsx:26
↓ 4 callersFunctionwithFallback
(real: () => Promise<T>, mock: () => T)
dashboard/src/api.ts:71
↓ 3 callersFunctionget_connector
(exchange: str)
app/guardian.py:21
↓ 3 callersFunctionload
(isRefresh = false)
dashboard/src/pages/Trades.tsx:38
↓ 3 callersFunctionload
(isRefresh = false)
dashboard/src/pages/Alerts.tsx:21
↓ 2 callersFunction_run_guardian_and_persist
Load settings from DB, run guardian, persist alerts and trade.
app/main.py:119
↓ 2 callersFunctiongetMockChartData
()
dashboard/src/mockData.ts:278
↓ 2 callersMethodget_account_snapshot
(self)
modules/exchange_connector/bybit.py:41
↓ 2 callersFunctionget_risk_rules
(db: AsyncSession, user_id: str = USER_ID)
app/db/repository.py:23
↓ 2 callersFunctionget_settings
(db: AsyncSession, user_id: str = USER_ID)
app/db/repository.py:18
↓ 2 callersFunctionsend_alerts
Send all alerts to Telegram and Discord.
app/guardian.py:63
↓ 2 callersFunctionsend_telegram_alert
Send a single alert to Telegram. Returns True if sent.
modules/alerts/telegram_alerts.py:11
↓ 1 callersFunctionappendMockChartPoint
(series: ChartPoint[])
dashboard/src/mockData.ts:283
↓ 1 callersFunctionbuildInitialChartData
()
dashboard/src/mockData.ts:256
↓ 1 callersFunctioncheck
()
dashboard/src/App.tsx:61
↓ 1 callersFunctioncheck_daily_drawdown
Alert if daily PnL (e.g. from exchange or stored session) exceeds max daily loss %. Caller should pass daily_pnl (negative = loss). account.e
modules/risk_engine/drawdown_monitor.py:9
↓ 1 callersFunctioncheck_leverage
Alert if leverage exceeds max allowed.
modules/risk_engine/leverage_check.py:9
↓ 1 callersFunctioncheck_position_risk
Check if this trade violates max risk per trade or position size vs balance.
modules/risk_engine/position_risk.py:9
↓ 1 callersFunctiondetect_emotional_patterns
Analyze recent_trades + current_trade for emotional patterns. - Revenge: many trades shortly after a loss. - Overtrading: too many trades
modules/emotion_detector/behavior_model.py:11
↓ 1 callersFunctionformatDate
(iso: string)
dashboard/src/pages/Trades.tsx:17
↓ 1 callersFunctionformatRelativeTime
(iso: string)
dashboard/src/pages/Alerts.tsx:6
↓ 1 callersFunctiongenerate_trade_feedback
Generate feedback for a closed trade. Can be extended with ML later. For now uses heuristics: R-multiple if exit/entry known, size vs typical
modules/ai_analysis/trade_feedback.py:18
↓ 1 callersFunctiongetAccount
(exchange: string)
dashboard/src/api.ts:136
↓ 1 callersFunctiongetAlerts
(limit = 100)
dashboard/src/api.ts:112
↓ 1 callersFunctiongetMockCandles
(count = 60)
dashboard/src/mockData.ts:313
↓ 1 callersFunctiongetSettings
()
dashboard/src/api.ts:84
↓ 1 callersFunctiongetTrades
(exchange?: string, limit = 100)
dashboard/src/api.ts:123
↓ 1 callersFunctionget_engine
()
app/database.py:11
↓ 1 callersMethodget_open_positions
(self)
modules/exchange_connector/bybit.py:61
↓ 1 callersMethodget_recent_trades
(self, symbol: Optional[str] = None, limit: int = 50)
modules/exchange_connector/bybit.py:89
↓ 1 callersFunctionhealth
()
dashboard/src/api.ts:162
↓ 1 callersFunctioninit_db
Create tables. Call on startup.
app/database.py:34
↓ 1 callersFunctionlist_alerts
(db: AsyncSession, limit: int = 100)
app/db/repository.py:79
↓ 1 callersFunctionlist_trades
( db: AsyncSession, exchange: Optional[str] = None, limit: int = 100, )
app/db/repository.py:125
↓ 1 callersFunctionload
()
dashboard/src/pages/Risk.tsx:19
↓ 1 callersFunctionon_market_scan
Run market risk scanner and optionally send alerts.
app/guardian.py:103
↓ 1 callersFunctionon_trade_opened
Main entry: call when a new trade is opened. Optionally fetches account from exchange.
app/guardian.py:70
↓ 1 callersFunctionputSettings
(risk?: Partial<RiskSettings>, strategy?: Partial<StrategySettings>)
dashboard/src/api.ts:95
↓ 1 callersFunctionrun_guardian_checks
Run full pipeline: risk, leverage, drawdown, strategy, emotion. Returns list of alerts (caller or this function can send them).
app/guardian.py:30
↓ 1 callersFunctionscan_market_risk
Scan market conditions before entry. Returns result + alerts if high risk.
modules/ai_analysis/market_risk_scanner.py:20
↓ 1 callersFunctionsend_discord_alert
Send a single alert to Discord via webhook. Returns True if sent.
modules/alerts/discord_alerts.py:10
↓ 1 callersFunctionstore_alert
(db: AsyncSession, alert: GuardianAlert)
app/db/repository.py:64
↓ 1 callersFunctionstore_trade
(db: AsyncSession, trade: Trade)
app/db/repository.py:104
↓ 1 callersFunctiontickMockCandle
(candles: Candle[])
dashboard/src/mockData.ts:336
↓ 1 callersFunctionupsert_settings
( db: AsyncSession, risk_rule: Optional[RiskRule] = None, strategy_name: Optional[str] = None,
app/db/repository.py:35
↓ 1 callersFunctionvalidate_trade_against_rules
Check if the trade matches strategy entry rules using market_context. market_context can include: rsi, near_support, btc_trend, etc.
modules/strategy_validator/rule_engine.py:27
FunctionAlerts
()
dashboard/src/pages/Alerts.tsx:16
FunctionApp
()
dashboard/src/App.tsx:56
FunctionCandlestickChart
()
dashboard/src/components/CandlestickChart.tsx:8
FunctionIconAlerts
()
dashboard/src/App.tsx:16
FunctionIconList
()
dashboard/src/App.tsx:34
FunctionIconLogo
()
dashboard/src/App.tsx:47
FunctionIconShield
()
dashboard/src/App.tsx:26
FunctionRisk
()
dashboard/src/pages/Risk.tsx:6
FunctionTrades
()
dashboard/src/pages/Trades.tsx:30
Method__init__
( self, api_key: Optional[str] = None, api_secret: Optional[str] = None, testn
modules/exchange_connector/bybit.py:15
Method__init__
( self, api_key: Optional[str] = None, api_secret: Optional[str] = None, testn
modules/exchange_connector/binance.py:15
Method__init__
( self, entry_conditions: Optional[Dict[str, Any]] = None, exit_conditions: Optional[D
modules/strategy_validator/rule_engine.py:13
Function_trade_to_snapshot
(t: Trade)
app/db/repository.py:87
Functionapi_get_account
Get account snapshot from exchange (for dashboard).
app/main.py:205
Functionapi_get_positions
Get open positions (for dashboard).
app/main.py:217
Functionapi_get_settings
Get current risk and strategy settings (for dashboard).
app/main.py:229
Functionapi_list_alerts
List recent alerts (for dashboard feed).
app/main.py:278
Functionapi_list_trades
List stored trades (for dashboard history).
app/main.py:296
Functionapi_market_scan
Run market risk scan (liquidation cluster, funding, volatility).
app/main.py:169
Functionapi_on_trade_opened
Simulate or forward a trade open event. Runs risk + strategy + emotion checks and sends alerts. Persists alerts and trade for the dashboard.
app/main.py:151
Functionapi_put_settings
Update risk and/or strategy settings.
app/main.py:253
Functionapi_trade_feedback
Get AI feedback for a closed trade.
app/main.py:186
Methodexchange_name
(self)
modules/exchange_connector/bybit.py:28
Methodexchange_name
(self)
modules/exchange_connector/binance.py:28
Methodexchange_name
(self)
modules/exchange_connector/base.py:16
FunctiongetPositions
(exchange: string)
dashboard/src/api.ts:147
Methodget_account_snapshot
(self)
modules/exchange_connector/binance.py:41
Methodget_account_snapshot
Current balance and equity.
modules/exchange_connector/base.py:20
Methodget_current_price
(self, symbol: str)
modules/exchange_connector/bybit.py:120
Methodget_current_price
(self, symbol: str)
modules/exchange_connector/binance.py:110
Methodget_current_price
Current mark/mid price for the symbol.
modules/exchange_connector/base.py:35
Functionget_db
()
app/database.py:29
Methodget_open_positions
(self)
modules/exchange_connector/binance.py:57
Methodget_open_positions
All open positions (converted to Trade models).
modules/exchange_connector/base.py:25
Methodget_recent_trades
(self, symbol: Optional[str] = None, limit: int = 50)
modules/exchange_connector/binance.py:85
Methodget_recent_trades
Recent closed trades for behavior and feedback.
modules/exchange_connector/base.py:30
FunctionhandleResize
()
dashboard/src/components/CandlestickChart.tsx:63
Functionhealth
()
app/main.py:115
Functionlifespan
(app: FastAPI)
app/main.py:93
Functionsave
()
dashboard/src/pages/Risk.tsx:40
Functionsend_telegram_alert_sync_fallback
Fallback using sync run if needed.
modules/alerts/telegram_alerts.py:37
Functionwebhook_trade
Receive new trade from exchange webhook or TradingView alert. Runs full guardian pipeline and persists alerts + trade.
app/main.py:324