prediction-market-agent-tooling 0.63.6__py3-none-any.whl → 0.63.7__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 +3 -1
- prediction_market_agent_tooling/markets/markets.py +1 -0
- prediction_market_agent_tooling/markets/omen/data_models.py +12 -17
- {prediction_market_agent_tooling-0.63.6.dist-info → prediction_market_agent_tooling-0.63.7.dist-info}/METADATA +1 -1
- {prediction_market_agent_tooling-0.63.6.dist-info → prediction_market_agent_tooling-0.63.7.dist-info}/RECORD +8 -8
- {prediction_market_agent_tooling-0.63.6.dist-info → prediction_market_agent_tooling-0.63.7.dist-info}/LICENSE +0 -0
- {prediction_market_agent_tooling-0.63.6.dist-info → prediction_market_agent_tooling-0.63.7.dist-info}/WHEEL +0 -0
- {prediction_market_agent_tooling-0.63.6.dist-info → prediction_market_agent_tooling-0.63.7.dist-info}/entry_points.txt +0 -0
@@ -439,7 +439,9 @@ class DeployablePredictionAgent(DeployableAgent):
|
|
439
439
|
verify_market: bool = True,
|
440
440
|
) -> ProcessedMarket | None:
|
441
441
|
self.update_langfuse_trace_by_market(market_type, market)
|
442
|
-
logger.info(
|
442
|
+
logger.info(
|
443
|
+
f"Processing market {market.question=} from {market.url=} with liquidity {market.get_liquidity()}."
|
444
|
+
)
|
443
445
|
|
444
446
|
answer: ProbabilisticAnswer | None
|
445
447
|
if verify_market and not self.verify_market(market_type, market):
|
@@ -115,6 +115,7 @@ def have_bet_on_market_since(
|
|
115
115
|
for b in OmenSubgraphHandler().get_bets(
|
116
116
|
better_address=keys.bet_from_address,
|
117
117
|
start_time=start_time,
|
118
|
+
market_id=market.market_maker_contract_address_checksummed,
|
118
119
|
)
|
119
120
|
)
|
120
121
|
if isinstance(market, OmenAgentMarket)
|
@@ -36,7 +36,6 @@ from prediction_market_agent_tooling.tools.utils import (
|
|
36
36
|
should_not_happen,
|
37
37
|
utcnow,
|
38
38
|
)
|
39
|
-
from prediction_market_agent_tooling.tools.web3_utils import is_valid_wei
|
40
39
|
|
41
40
|
OMEN_TRUE_OUTCOME = OutcomeStr("Yes")
|
42
41
|
OMEN_FALSE_OUTCOME = OutcomeStr("No")
|
@@ -239,22 +238,18 @@ class OmenMarket(BaseModel):
|
|
239
238
|
|
240
239
|
@model_validator(mode="after")
|
241
240
|
def _model_validator(self) -> "OmenMarket":
|
242
|
-
if
|
243
|
-
# Sometimes we receive markets with outcomeTokenAmounts as `model.outcomeTokenAmounts=[OutcomeWei(24662799387878572), OutcomeWei(-24750000000000000)]`,
|
244
|
-
#
|
245
|
-
#
|
246
|
-
#
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
else:
|
255
|
-
raise ValueError(
|
256
|
-
f"Market {self.url} has invalid {self.outcomeTokenAmounts=}: {self.model_dump()=}"
|
257
|
-
)
|
241
|
+
if any(number < 0 for number in self.outcomeTokenAmounts):
|
242
|
+
# Sometimes we receive markets with outcomeTokenAmounts as `model.outcomeTokenAmounts=[OutcomeWei(24662799387878572), OutcomeWei(-24750000000000000)]`,
|
243
|
+
# which should be impossible.
|
244
|
+
# Current huntch is that it's a weird transitional status or bug after withdrawing liquidity.
|
245
|
+
# Because so far, it always happened on markets with withdrawn liquidity,
|
246
|
+
# so we just set them to zeros, as we expect them to be.
|
247
|
+
logger.warning(
|
248
|
+
f"Market {self.url} has invalid {self.outcomeTokenAmounts=}. Setting them to zeros."
|
249
|
+
)
|
250
|
+
self.outcomeTokenAmounts = [OutcomeWei(0) for _ in self.outcomes]
|
251
|
+
self.outcomeTokenMarginalPrices = None
|
252
|
+
self.liquidityParameter = Wei(0)
|
258
253
|
|
259
254
|
return self
|
260
255
|
|
@@ -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=So5l8KbgmzcCpxzzf13TNrEJPu_4iQnUDhzus6XRvSc,10151
|
24
|
-
prediction_market_agent_tooling/deploy/agent.py,sha256=
|
24
|
+
prediction_market_agent_tooling/deploy/agent.py,sha256=tEYX133rSsZ6b9kx-RtZSHxkdN8LZvn0P6CVz6KOJlc,26531
|
25
25
|
prediction_market_agent_tooling/deploy/agent_example.py,sha256=dIIdZashExWk9tOdyDjw87AuUcGyM7jYxNChYrVK2dM,1001
|
26
26
|
prediction_market_agent_tooling/deploy/betting_strategy.py,sha256=p25t7VU7I4hSkSl6SpzI_W55kLbYEySQdBqeschmARY,12918
|
27
27
|
prediction_market_agent_tooling/deploy/constants.py,sha256=M5ty8URipYMGe_G-RzxRydK3AFL6CyvmqCraJUrLBnE,82
|
@@ -45,12 +45,12 @@ prediction_market_agent_tooling/markets/manifold/data_models.py,sha256=DWNvK6Qdx
|
|
45
45
|
prediction_market_agent_tooling/markets/manifold/manifold.py,sha256=TakZ0SqyDFal0QECKCkKkuqqeUm1o3mTpesQIuYInig,4800
|
46
46
|
prediction_market_agent_tooling/markets/manifold/utils.py,sha256=_gGlWid0sPF127Omx5qQ1fq17frLInv0wdyXJBMGVzM,670
|
47
47
|
prediction_market_agent_tooling/markets/market_fees.py,sha256=YeK3ynjYIguB0xf6sO5iyg9lOdW_HD4C6nbJfiGyRCU,1351
|
48
|
-
prediction_market_agent_tooling/markets/markets.py,sha256=
|
48
|
+
prediction_market_agent_tooling/markets/markets.py,sha256=Aseaflknwqsqg6wsCSnWU2Aoc5jH4g0aomnCI3VYRRU,4125
|
49
49
|
prediction_market_agent_tooling/markets/metaculus/api.py,sha256=4TRPGytQQbSdf42DCg2M_JWYPAuNjqZ3eBqaQBLkNks,2736
|
50
50
|
prediction_market_agent_tooling/markets/metaculus/data_models.py,sha256=FaBCTPPezXbBwZ9p791CiVgQ4vB696xnMbz9XVXmiVI,3267
|
51
51
|
prediction_market_agent_tooling/markets/metaculus/metaculus.py,sha256=86TIx6cavEWc8Cv4KpZxSvwiSw9oFybXE3YB49pg-CA,4377
|
52
52
|
prediction_market_agent_tooling/markets/omen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
53
|
-
prediction_market_agent_tooling/markets/omen/data_models.py,sha256=
|
53
|
+
prediction_market_agent_tooling/markets/omen/data_models.py,sha256=dtWbRy9tpasssQP80ZFYxAc_9pnVD-zUpVjenBqurnA,30221
|
54
54
|
prediction_market_agent_tooling/markets/omen/omen.py,sha256=Jf2qSJJn0UUISpi24xYRwoVycGuYE42kZ2z1HRGl43w,51927
|
55
55
|
prediction_market_agent_tooling/markets/omen/omen_constants.py,sha256=D9oflYKafLQiHYtB5sScMHqmXyzM8JP8J0yATmc4SQQ,233
|
56
56
|
prediction_market_agent_tooling/markets/omen/omen_contracts.py,sha256=bCC9A7ZTJxMDJcPbl3jof6HcAGGHv1BrFq3RRWbkQ_c,28739
|
@@ -121,8 +121,8 @@ prediction_market_agent_tooling/tools/tokens/usd.py,sha256=yuW8iPPtcpP4eLH2nORMD
|
|
121
121
|
prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
|
122
122
|
prediction_market_agent_tooling/tools/utils.py,sha256=1xsyBBJfiEdSoMlceB2F8o2sCb6Z8-qNz11pEJFrdyE,6566
|
123
123
|
prediction_market_agent_tooling/tools/web3_utils.py,sha256=zRq-eeBGWt8uUGN9G_WfjmJ0eVvO8aWE9S0Pz_Y6AOA,12342
|
124
|
-
prediction_market_agent_tooling-0.63.
|
125
|
-
prediction_market_agent_tooling-0.63.
|
126
|
-
prediction_market_agent_tooling-0.63.
|
127
|
-
prediction_market_agent_tooling-0.63.
|
128
|
-
prediction_market_agent_tooling-0.63.
|
124
|
+
prediction_market_agent_tooling-0.63.7.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
|
125
|
+
prediction_market_agent_tooling-0.63.7.dist-info/METADATA,sha256=Ew8t2bQiz--H5gDpt6pYHSSJG1j6Hbn-FSg5Ey2CvIk,8689
|
126
|
+
prediction_market_agent_tooling-0.63.7.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
127
|
+
prediction_market_agent_tooling-0.63.7.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
|
128
|
+
prediction_market_agent_tooling-0.63.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|