agent0.core.base.agent

Base implementation of agents.

Submodules

Classes

EthWallet

Stateful variable for storing what is in the agent's wallet.

BaseMarketAction

Market action specification

Package Contents

class agent0.core.base.agent.EthWallet

Stateful variable for storing what is in the agent’s wallet.

address: hexbytes.HexBytes

The associated agent’s eth address.

balance: agent0.core.base.types.Quantity

The base assets that held by the trader.

copy() EthWallet

Return a new copy of self.

Returns:

A deepcopy of the wallet.

Return type:

EthWallet

check_valid_wallet_state(dictionary: dict | None = None) None

Test that all wallet state variables are greater than zero.

Parameters:

dictionary (dict | None, optional) – The dictionary to check. If not provided, it will use self.__dict__.

class agent0.core.base.agent.BaseMarketAction

Bases: Generic[T]

Market action specification

action_type: T