prediction-market-agent-tooling 0.63.8__py3-none-any.whl → 0.63.9__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/tools/utils.py +7 -3
- {prediction_market_agent_tooling-0.63.8.dist-info → prediction_market_agent_tooling-0.63.9.dist-info}/METADATA +1 -1
- {prediction_market_agent_tooling-0.63.8.dist-info → prediction_market_agent_tooling-0.63.9.dist-info}/RECORD +6 -6
- {prediction_market_agent_tooling-0.63.8.dist-info → prediction_market_agent_tooling-0.63.9.dist-info}/LICENSE +0 -0
- {prediction_market_agent_tooling-0.63.8.dist-info → prediction_market_agent_tooling-0.63.9.dist-info}/WHEEL +0 -0
- {prediction_market_agent_tooling-0.63.8.dist-info → prediction_market_agent_tooling-0.63.9.dist-info}/entry_points.txt +0 -0
@@ -194,15 +194,19 @@ def calculate_sell_amount_in_collateral(
|
|
194
194
|
fees: MarketFees,
|
195
195
|
) -> CollateralToken:
|
196
196
|
"""
|
197
|
-
Computes the amount of collateral that needs to be sold to get `shares`
|
198
|
-
amount of shares. Returns None if the amount can't be computed.
|
197
|
+
Computes the amount of collateral that needs to be sold to get `shares` amount of shares.
|
199
198
|
|
200
199
|
Taken from https://github.com/protofire/omen-exchange/blob/29d0ab16bdafa5cc0d37933c1c7608a055400c73/app/src/util/tools/fpmm/trading/index.ts#L99
|
201
200
|
Simplified for binary markets.
|
202
201
|
"""
|
202
|
+
if shares_to_sell == 0:
|
203
|
+
return CollateralToken(0)
|
204
|
+
|
203
205
|
for v in [shares_to_sell, holdings, other_holdings]:
|
204
206
|
if v <= 0:
|
205
|
-
raise ValueError(
|
207
|
+
raise ValueError(
|
208
|
+
f"All share args must be greater than 0, got {[shares_to_sell, holdings, other_holdings]=}"
|
209
|
+
)
|
206
210
|
|
207
211
|
def f(r: float) -> float:
|
208
212
|
R = OutcomeToken((r + fees.absolute) / (1 - fees.bet_proportion))
|
@@ -120,10 +120,10 @@ prediction_market_agent_tooling/tools/tokens/main_token.py,sha256=1rbwpdCusPgQIV
|
|
120
120
|
prediction_market_agent_tooling/tools/tokens/token_utils.py,sha256=fhs-FH9m9IbzGa-30R3ZleSKLeKfLEDoJ7F5Om285Vk,1369
|
121
121
|
prediction_market_agent_tooling/tools/tokens/usd.py,sha256=yuW8iPPtcpP4eLH2nORMDAfztcq0Nv2ascSrCquF1f8,3115
|
122
122
|
prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
|
123
|
-
prediction_market_agent_tooling/tools/utils.py,sha256=
|
123
|
+
prediction_market_agent_tooling/tools/utils.py,sha256=AC2a68jwASMWuQi-w8twl8b_M52YwrEJ81abmuEaqMY,6661
|
124
124
|
prediction_market_agent_tooling/tools/web3_utils.py,sha256=zRq-eeBGWt8uUGN9G_WfjmJ0eVvO8aWE9S0Pz_Y6AOA,12342
|
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.
|
129
|
-
prediction_market_agent_tooling-0.63.
|
125
|
+
prediction_market_agent_tooling-0.63.9.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
|
126
|
+
prediction_market_agent_tooling-0.63.9.dist-info/METADATA,sha256=8GI888jIBmKnNzupIIL7Pem4RTVhl8-QO4J8-drwdJ4,8689
|
127
|
+
prediction_market_agent_tooling-0.63.9.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
128
|
+
prediction_market_agent_tooling-0.63.9.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
|
129
|
+
prediction_market_agent_tooling-0.63.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|