We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0761cbf commit 8634806Copy full SHA for 8634806
eth_defi/uniswap_v2/fees.py
@@ -1,4 +1,7 @@
1
-"""Uniswap v2 price impact and fee calculations.
+"""Uniswap v2 token price, fee and price impact calculations.
2
+
3
+- To get a price in Uniswap v2 pool in human-readable format see
4
+ :py:func:`estimate_sell_price` and :py:func:`estimate_buy_price`.
5
6
`Mostly lifted from Uniswap-v2-py MIT licensed by Asynctomatic <https://github.com/nosofa/uniswap-v2-py>`_.
7
"""
@@ -284,9 +287,9 @@ def estimate_sell_price(
284
287
)
285
288
286
289
# Estimate the price of selling 1 ETH
- usdc_per_eth = estimate_price(
290
+ usdc_per_eth = estimate_sell_price(
291
uniswap_v2,
- weth,user_1
292
+ weth,
293
usdc,
294
1 * 10**18, # 1 ETH
295
0 commit comments