defi
defi copied to clipboard
Tools for use in DeFi. Impermanent Loss calculations, staking and farming strategies, coingecko and pancakeswap API queries, liquidity pools and more
Could you add an option for custom pool weights such as Bancor or BeethovenX use like 80/20 instead of the traditional 50/50?
>>> pair = ['terra-luna','terrausd'] >>> apr = 30 >>> dft.farmSimulate(pair, apr, start='2021-01-01') Downloading terra-luna Downloading terrausd {'Token 1': 'terra-luna', 'Token 2': 'terrausd', 'start': '2021-01-01', 'fixed APR': '30%', 'Buy & Hold':...
CoinGecko - Farming Simulate section when I follow the example I do not get the graphics just the following below. How can I receive the additional data? >>> import defi.defi_tools...
Received the following error: >>> pair = ['ethereum','nexus-governance-token'] >>> apr = 553.94 >>> dft.farmSimulate(pair, apr, start='2021-11-30') Downloading ethereum Downloading nexus-governance-token Traceback (most recent call last): File "", line 1, in...
Buenas, intento correr el codigo en Spyder: dft.geckoHistorical('bitcoin') y me da el error dft.geckoHistorical('bitcoin') Traceback (most recent call last): File "", line 1, in dft.geckoHistorical('bitcoin') File "C:\Users\gmartinez\Anaconda3\lib\site-packages\defi\defi_tools.py", line 227, in...
I would like to retrieve the historical data for a liquidity pool on PancakeSwap. Is this possible using your defi package? If not would you mind giving me some pointers...
Many farms provide additional reward token. It would be great to consider the price evolution of this token too in the compare function.
I copy and run this code import defi.defi_tools as dft dft.value_f, iloss = dft.iloss_simulate('cake','bnb', value=1000, base_pct_chg=50, quote_pct_chg=-25) TypeError: unsupported operand type(s) for /: 'NoneType' and 'int' Last month it's worked....
Please note that the Pancakeswap API has an udptate. The new url is https://api.pancakeswap.info/api/v2/.
Thanks for sharing this great lib! It would be event better if there was more uses cases like borrowing, cascading borrowing, governance stacking, etc... when calling the compare function. See...