Skip to content

Commit

Permalink
Bump PMAT version (#35)
Browse files Browse the repository at this point in the history
* Bump PMAT version
  • Loading branch information
evangriffiths authored Apr 2, 2024
1 parent c02be15 commit cf3c2a1
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 95 deletions.
13 changes: 9 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

import typer
from prediction_market_agent_tooling.markets.agent_market import SortBy
from prediction_market_agent_tooling.markets.markets import MARKET_TYPE_MAP, MarketType
from prediction_market_agent_tooling.tools.utils import check_not_none
from prediction_market_agent_tooling.markets.markets import (
MarketType,
get_binary_markets,
)

import prediction_market_agent as pma
from prediction_market_agent.agents.all_agents import AgentType, get_agent
Expand All @@ -18,8 +20,11 @@ def main(
Picks one market and answers it, optionally placing a bet.
"""
# Pick a market
cls = check_not_none(MARKET_TYPE_MAP.get(market_type))
market = cls.get_binary_markets(limit=1, sort_by=SortBy.NEWEST)[0]
market = get_binary_markets(
limit=1,
sort_by=SortBy.NEWEST,
market_type=market_type,
)[0]

# Create the agent and run it
agent = get_agent(agent_type)
Expand Down
Loading

0 comments on commit cf3c2a1

Please sign in to comment.