Pools
Python library for Ethereum pools liquidity providers.
Install
pip install pools
Usage
The pools library relies on web3 which requires the WEB3_INFURA_PROJECT_ID environment variable to be set.
export WEB3_INFURA_PROJECT_ID=00000000000000000000000000000000
Then use the library to fetch portfolio data.
>>> from pools import uniswap
>>> address = "0x000000000000000000000000000000000000dEaD"
>>> portfolio_data = uniswap.portfolio(address)
>>> portfolio_data.keys()
dict_keys(['address', 'pairs', 'balance_usd'])
>>> portfolio_data["balance_usd"]
Decimal('1234.56')
A Command line interface is also available.
pools --help
Consider installing rusty-rlp to improve pyrlp performance with a rust based backend
usage: pools [-h] address
Liquidity provider portfolio stats.
positional arguments:
address Address
optional arguments:
-h, --help show this help message and exit
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pools-20210424.tar.gz
(11.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pools-20210424-py3-none-any.whl
(10.7 kB
view details)
File details
Details for the file pools-20210424.tar.gz.
File metadata
- Download URL: pools-20210424.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05ff7bffacc50085b6a81d77652aa41e882e342c6dff3312b6d3426adcffe46d
|
|
| MD5 |
d62a04db2860a7748227d8aafb347235
|
|
| BLAKE2b-256 |
36f3f3379121e9748c8549019e1277f49cb4157d8e2722eff27f12eeb29ae73a
|
File details
Details for the file pools-20210424-py3-none-any.whl.
File metadata
- Download URL: pools-20210424-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
955e3c3201f25bd70c38e261f163ddf1ce789ad6c9695471c452ae585e09f1ad
|
|
| MD5 |
814e3756283b6255e2e8bd91e5d8fcdd
|
|
| BLAKE2b-256 |
ae73f6cb51a5afde10956c415e6ac9abda34f3dd17ef60b6ad3f5386f09d1b09
|