πCreating a new trader agent
Clone the prediction-market-agent repository
prediction-market-agent repositorygit clone https://github.com/gnosis/prediction-market-agent.gitCopy .env.example as .env and fill in the variables
.env.example as .env and fill in the variablesStep-by-Step Guide to Creating and Registering a New Agent
Step 1: Import necessary modules:
# From https://github.com/gnosis/prediction-market-agent/blob/main/prediction_market_agent/agents/coinflip_agent/deploy.py
import random
import typing as t
from prediction_market_agent_tooling.deploy.agent import (
Answer,
DeployableTraderAgent,
Probability,
)
from prediction_market_agent_tooling.markets.agent_market import AgentMarketStep 2 : Create a new class DeployableCoinFlipAgent that inherits from DeployableTraderAgent:
DeployableCoinFlipAgent that inherits from DeployableTraderAgent:Step - 3 : Register your class in the file run_agent by editing the variables RUNNABLE_AGENTS and RunnableAgent
run_agent by editing the variables RUNNABLE_AGENTS and RunnableAgentStep - 4 : Run the agent with the following command
New Research Options or Betting Strategies
Last updated