prediction-market-agent-tooling 0.59.1__py3-none-any.whl → 0.59.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- prediction_market_agent_tooling/deploy/agent.py +12 -2
- {prediction_market_agent_tooling-0.59.1.dist-info → prediction_market_agent_tooling-0.59.2.dist-info}/METADATA +1 -1
- {prediction_market_agent_tooling-0.59.1.dist-info → prediction_market_agent_tooling-0.59.2.dist-info}/RECORD +6 -6
- {prediction_market_agent_tooling-0.59.1.dist-info → prediction_market_agent_tooling-0.59.2.dist-info}/LICENSE +0 -0
- {prediction_market_agent_tooling-0.59.1.dist-info → prediction_market_agent_tooling-0.59.2.dist-info}/WHEEL +0 -0
- {prediction_market_agent_tooling-0.59.1.dist-info → prediction_market_agent_tooling-0.59.2.dist-info}/entry_points.txt +0 -0
@@ -619,11 +619,19 @@ class DeployableTraderAgent(DeployablePredictionAgent):
|
|
619
619
|
existing_position=existing_position,
|
620
620
|
)
|
621
621
|
|
622
|
+
# It can take quite some time before agent processes all the markets, recheck here if the market didn't get closed in the meantime, to not error out completely.
|
623
|
+
# Unfortunately, we can not just add some room into closing time of the market while fetching them, because liquidity can be removed at any time by the liquidity providers.
|
624
|
+
still_tradeable = market.can_be_traded()
|
625
|
+
if not still_tradeable:
|
626
|
+
logger.warning(
|
627
|
+
f"Market {market.question=} ({market.url}) was selected to processing, but is not tradeable anymore."
|
628
|
+
)
|
629
|
+
|
622
630
|
placed_trades = []
|
623
631
|
for trade in trades:
|
624
632
|
logger.info(f"Executing trade {trade} on market {market.id} ({market.url})")
|
625
633
|
|
626
|
-
if self.place_trades:
|
634
|
+
if self.place_trades and still_tradeable:
|
627
635
|
match trade.trade_type:
|
628
636
|
case TradeType.BUY:
|
629
637
|
id = market.buy_tokens(
|
@@ -637,7 +645,9 @@ class DeployableTraderAgent(DeployablePredictionAgent):
|
|
637
645
|
raise ValueError(f"Unexpected trade type {trade.trade_type}.")
|
638
646
|
placed_trades.append(PlacedTrade.from_trade(trade, id))
|
639
647
|
else:
|
640
|
-
logger.info(
|
648
|
+
logger.info(
|
649
|
+
f"Trade execution skipped because, {self.place_trades=} or {still_tradeable=}."
|
650
|
+
)
|
641
651
|
|
642
652
|
traded_market = ProcessedTradedMarket(
|
643
653
|
answer=processed_market.answer, trades=placed_trades
|
@@ -21,7 +21,7 @@ prediction_market_agent_tooling/benchmark/agents.py,sha256=B1-uWdyeN4GGKMWGK_-Cc
|
|
21
21
|
prediction_market_agent_tooling/benchmark/benchmark.py,sha256=MqTiaaJ3cYiOLUVR7OyImLWxcEya3Rl5JyFYW-K0lwM,17097
|
22
22
|
prediction_market_agent_tooling/benchmark/utils.py,sha256=D0MfUkVZllmvcU0VOurk9tcKT7JTtwwOp-63zuCBVuc,2880
|
23
23
|
prediction_market_agent_tooling/config.py,sha256=owJ3goDbH1aeX8PzeJCeGK5pitYJqqk7yFOkaTbDarY,9209
|
24
|
-
prediction_market_agent_tooling/deploy/agent.py,sha256=
|
24
|
+
prediction_market_agent_tooling/deploy/agent.py,sha256=rvBPubAjZu9WACayT4q4ERxINOayBJte9ZPi7yFlnNQ,24872
|
25
25
|
prediction_market_agent_tooling/deploy/agent_example.py,sha256=dIIdZashExWk9tOdyDjw87AuUcGyM7jYxNChYrVK2dM,1001
|
26
26
|
prediction_market_agent_tooling/deploy/betting_strategy.py,sha256=Y6Pb8OfSb6galRbfdNBvvNTgO-4dR2ybJ4o5GKJcMoM,12894
|
27
27
|
prediction_market_agent_tooling/deploy/constants.py,sha256=M5ty8URipYMGe_G-RzxRydK3AFL6CyvmqCraJUrLBnE,82
|
@@ -117,8 +117,8 @@ prediction_market_agent_tooling/tools/tokens/main_token.py,sha256=5iHO7-iehSlXuu
|
|
117
117
|
prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
|
118
118
|
prediction_market_agent_tooling/tools/utils.py,sha256=jLG4nbEoIzzJiZ4RgMx4Q969Zdl0p0s63p8uET_0Fuw,6440
|
119
119
|
prediction_market_agent_tooling/tools/web3_utils.py,sha256=2PXZfGRrDVZD60agVpBN4JkOF0YsNBXgTEH1y-V71uQ,12723
|
120
|
-
prediction_market_agent_tooling-0.59.
|
121
|
-
prediction_market_agent_tooling-0.59.
|
122
|
-
prediction_market_agent_tooling-0.59.
|
123
|
-
prediction_market_agent_tooling-0.59.
|
124
|
-
prediction_market_agent_tooling-0.59.
|
120
|
+
prediction_market_agent_tooling-0.59.2.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
|
121
|
+
prediction_market_agent_tooling-0.59.2.dist-info/METADATA,sha256=MqNzGgXLVbHhIWejKukTi6hRsjK0nr5TRbax5iiyLn8,8629
|
122
|
+
prediction_market_agent_tooling-0.59.2.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
123
|
+
prediction_market_agent_tooling-0.59.2.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
|
124
|
+
prediction_market_agent_tooling-0.59.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|