Pools
Python library for 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
Metadata
Release files for pools 20201026
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-20201026.tar.gz | 10.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pools-20201026-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.4 kB
Release files / pools-20201026.tar.gz
| Download URL | pools-20201026.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0ac13a709848b0f732e058f45c7d010ae6a76fba7a9606550d8d96aec9c82bf
|
|
BLAKE2b-256 checksum How to use checksums |
8343e6d309c58bd480c1c29bccaf0fbaf55f0f6187cae3b476131b4c810444fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|
Release files / pools-20201026-py3-none-any.whl
| Download URL | pools-20201026-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
59b4735cac8b215e290a9453c4050002b0cee53624bfc2c5cc1252f0fd76ae79
|
|
BLAKE2b-256 checksum How to use checksums |
06f4b0d54459f6cac66026f973ef79143fee8cab5658286e88458e9dd297a8b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|