agent0.chainsync.dashboard.build_wallet_positions

Builds the position dataframe for the dashboard.

Functions

build_wallet_positions(→ pandas.DataFrame)

Builds the positions dataframe for the wallet page.

build_pnl_over_time(→ pandas.DataFrame)

Builds the pnl over time dataframe for the dashboard.

build_positions_over_time(→ pandas.DataFrame)

Builds the positions over time dataframe for the dashboard.

build_realized_value_over_time(→ pandas.DataFrame)

Builds the realized value over time dataframe for the dashboard.

Module Contents

agent0.chainsync.dashboard.build_wallet_positions.build_wallet_positions(positions_snapshot: pandas.DataFrame, user_map: pandas.DataFrame, hyperdrive_addr_map: pandas.DataFrame) pandas.DataFrame

Builds the positions dataframe for the wallet page.

Parameters:
  • positions_snapshot (pd.DataFrame) – The dataframe resulting from get_position_snapshot that contains the latest positions.

  • user_map (pd.DataFrame) – A dataframe containing the mapping of wallet addresses to usernames.

  • hyperdrive_addr_map (pd.DataFrame) – A dataframe containing the mapping of hyperdrive addresses to names.

Returns:

The wallet positions dataframe for the dashboard.

Return type:

pd.DataFrame

agent0.chainsync.dashboard.build_wallet_positions.build_pnl_over_time(pnl_over_time: pandas.DataFrame, block_to_timestamp: pandas.DataFrame) pandas.DataFrame

Builds the pnl over time dataframe for the dashboard.

Parameters:
  • pnl_over_time (pd.DataFrame) – The dataframe resulting from get_pnl_over_time.

  • block_to_timestamp (pd.DataFrame) – A dataframe containing the mapping of block number to timestamp.

Returns:

The pnl over time dataframe for the dashboard.

Return type:

pd.DataFrame

agent0.chainsync.dashboard.build_wallet_positions.build_positions_over_time(positions_over_time: pandas.DataFrame, block_to_timestamp: pandas.DataFrame) pandas.DataFrame

Builds the positions over time dataframe for the dashboard.

Parameters:
  • positions_over_time (pd.DataFrame) – The dataframe resulting from get_positions_over_time.

  • block_to_timestamp (pd.DataFrame) – A dataframe containing the mapping of block number to timestamp.

Returns:

The positions over time dataframe for the dashboard.

Return type:

pd.DataFrame

agent0.chainsync.dashboard.build_wallet_positions.build_realized_value_over_time(realized_value_over_time: pandas.DataFrame, block_to_timestamp: pandas.DataFrame) pandas.DataFrame

Builds the realized value over time dataframe for the dashboard.

Parameters:
  • realized_value_over_time (pd.DataFrame) – The dataframe resulting from get_realized_value_over_time.

  • block_to_timestamp (pd.DataFrame) – A dataframe containing the mapping of block number to timestamp.

Returns:

The realized value over time dataframe for the dashboard.

Return type:

pd.DataFrame