dojo.vis package
Runners.
- class dojo.vis.Plotter(port: int = 8051)
Bases:
object
Sending data to the dashboard for plotting.
- send_param(key, value)
Send info to the dashboard.
- send_post(method: str, url: str, headers: dict, payload: str)
Helper function.
- send_progress(progress: int)
Send progress to the dashboard.
Submodules
Dashboard to visualize simulation.
- class dojo.vis.dashboard.ActionType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- Quote = 2
- Trade = 1
- dojo.vis.dashboard.run_app(port: int = 8051, mode: Literal['prod', 'dev', 'demo'] = 'prod', jupyter=False)
Start the dashboard.
- Parameters:
mode – ‘prod’ for production.
port – The port on which the dashboard is running. The plotter must send data to this port.
jupyter – Set this to true if you want to run the dashboard inline within a Jupyter notebook.
- Raises:
ValueError – Temporarily removed Jupyter support.
Dashboard to visualize simulation.
- dojo.vis.dashboard_api.register_api(server: Flask) Flask
Helper function.
Callbacks for the dashboard.
- class dojo.vis.dashboard_interactions.ActionType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- Quote = 2
- Trade = 1
- dojo.vis.dashboard_interactions.register_interactions(app: Dash)
Helper function.
Plotly graphs for the dashboard.
- class dojo.vis.graphs.ActionType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- Quote = 2
- Trade = 1
- dojo.vis.graphs.custom_figure(v1, v2)
TODO.
- dojo.vis.graphs.positions_graph()
Plots the current positions of the agent.
- dojo.vis.graphs.price_graph(pool: str)
Plot price graph.
- dojo.vis.graphs.reward_graph(agent_name)
Plot reward graph.
Sending data to the Dashboard.
- class dojo.vis.plotter.Plotter(port: int = 8051)
Bases:
object
Sending data to the dashboard for plotting.
- send_param(key, value)
Send info to the dashboard.
- send_post(method: str, url: str, headers: dict, payload: str)
Helper function.
- send_progress(progress: int)
Send progress to the dashboard.
Global variables for the dashboard.
- class dojo.vis.variables.Action(info: str = None)
Bases:
object
Holds information about taken actions.
- info: str = None
- class dojo.vis.variables.AgentData(reward: float | None, actions: List[Action] | None, liquidities: Liquidities | None)
Bases:
object
TODO.
- liquidities: Liquidities | None
- reward: float | None
- class dojo.vis.variables.BlockData(pooldata: Dict[str, PoolData], agentdata: List[AgentData], signals: Dict[str, float])
Bases:
object
Per block data.
- signals: Dict[str, float]
- class dojo.vis.variables.Bookmark(name: str, block: int)
Bases:
object
Users can create bookmarks by clicking in the graph.
- block: int
- name: str
- class dojo.vis.variables.Data(blockdata: Dict[int, BlockData], params: Params)
Bases:
object
Full data.
- class dojo.vis.variables.Liquidities(lp_quantities: Portfolio, lp_fees: Portfolio, wallet: Portfolio)
Bases:
object
Holds the wallet as well as the LP portfolio.
- class dojo.vis.variables.Params(progress_value: float | None, agents: ~typing.List[str] | None, pool_info: ~typing.List[~dojo.vis.variables.PoolInfo], start_date: ~datetime.datetime | str | None, end_date: ~datetime.datetime | str | None, signal_names: ~typing.Set[str] = <factory>)
Bases:
object
Simulation params.
- agents: List[str] | None
- end_date: datetime | str | None
- progress_value: float | None
- signal_names: Set[str]
- start_date: datetime | str | None
- class dojo.vis.variables.PoolData(price: float | None, liquidity: int | None)
Bases:
object
TODO.
- liquidity: int | None
- price: float | None
- class dojo.vis.variables.PoolInfo(name: str, token0: str, token1: str, fee: float)
Bases:
object
TODO.
- fee: float
- name: str
- token0: str
- token1: str
- class dojo.vis.variables.Portfolio(token0: float, token1: float)
Bases:
object
Holds information about an agents portfolio.
- token0: float
- token1: float
- dojo.vis.variables.random_continue(value)
TODO.
- dojo.vis.variables.reset()
Set back all variables to initial state.