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

Function get_debug_state

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

Source from the content-addressed store, hash-verified

35
36
37async def get_debug_state(user_id: str) -> protocol_models.DebugState:
38 automations = await scheduler_api.get_automation_states(user_id)
39 user_actions = await scheduler_api.list_user_actions(user_id, active_only=False)
40 account_state = accounts_protocol.get_accounts_state(user_id)
41 strategies_state = strategies_protocol.get_strategies_state(user_id)
42 account_tradings = accounts_trading_protocol.get_account_trading_summaries(
43 user_id,
44 _wallet_account_ids(account_state.accounts),
45 )
46 return protocol_models.DebugState(
47 version=sync_constants.DEBUG_STATE_VERSION,
48 debug=protocol_models.Debug(
49 automations=automations,
50 user_actions=user_actions,
51 accounts=account_state.accounts,
52 exchange_configs=account_state.exchange_configs,
53 account_tradings=account_tradings,
54 local_strategies=strategies_state.strategies,
55 ),
56 )

Callers

nothing calls this directly

Calls 3

_wallet_account_idsFunction · 0.85
get_automation_statesMethod · 0.80
list_user_actionsMethod · 0.80

Tested by

no test coverage detected