(user_id: str)
| 41 | |
| 42 | |
| 43 | async def get_debug_state(user_id: str) -> protocol_models.DebugState: |
| 44 | automations = await scheduler_api.get_automation_states(user_id) |
| 45 | user_actions = await scheduler_api.list_user_actions(user_id, active_only=False) |
| 46 | account_state = accounts_protocol.get_accounts_state(user_id) |
| 47 | strategies_state = strategies_protocol.get_strategies_state(user_id) |
| 48 | bound_account_ids = _account_ids_bound_to_running_automations(automations) |
| 49 | account_tradings = accounts_trading_protocol.get_account_trading_summaries( |
| 50 | user_id, |
| 51 | bound_account_ids, |
| 52 | ) |
| 53 | return protocol_models.DebugState( |
| 54 | version=sync_constants.DEBUG_STATE_VERSION, |
| 55 | debug=protocol_models.Debug( |
| 56 | automations=automations, |
| 57 | user_actions=user_actions, |
| 58 | accounts=account_state.accounts, |
| 59 | exchange_configs=account_state.exchange_configs, |
| 60 | account_tradings=account_tradings, |
| 61 | local_strategies=strategies_state.strategies, |
| 62 | ), |
| 63 | ) |
nothing calls this directly
no test coverage detected