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
Release files for pools 20210424
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pools-20210424.tar.gz | 11.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pools-20210424-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.9 kB
Release files / pools-20210424.tar.gz
| Download URL | pools-20210424.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05ff7bffacc50085b6a81d77652aa41e882e342c6dff3312b6d3426adcffe46d
|
|
BLAKE2b-256 checksum How to use checksums |
36f3f3379121e9748c8549019e1277f49cb4157d8e2722eff27f12eeb29ae73a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / pools-20210424-py3-none-any.whl
| Download URL | pools-20210424-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
955e3c3201f25bd70c38e261f163ddf1ce789ad6c9695471c452ae585e09f1ad
|
|
BLAKE2b-256 checksum How to use checksums |
ae73f6cb51a5afde10956c415e6ac9abda34f3dd17ef60b6ad3f5386f09d1b09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|