MCPcopy Create free account
hub / github.com/Drakkar-Software/OctoBot / get_debug_state

Function get_debug_state

packages/node/octobot_node/protocol/debug.py:43–63  ·  view source on GitHub ↗
(user_id: str)

Source from the content-addressed store, hash-verified

41
42
43async 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 )

Callers

nothing calls this directly

Tested by

no test coverage detected