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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pools-20201026.tar.gz
(10.9 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-20201026-py3-none-any.whl
(10.4 kB
view details)
File details
Details for the file pools-20201026.tar.gz.
File metadata
- Download URL: pools-20201026.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0ac13a709848b0f732e058f45c7d010ae6a76fba7a9606550d8d96aec9c82bf
|
|
| MD5 |
99abce7b5bb58a32ba5a95d2dcec2600
|
|
| BLAKE2b-256 |
8343e6d309c58bd480c1c29bccaf0fbaf55f0f6187cae3b476131b4c810444fa
|
File details
Details for the file pools-20201026-py3-none-any.whl.
File metadata
- Download URL: pools-20201026-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59b4735cac8b215e290a9453c4050002b0cee53624bfc2c5cc1252f0fd76ae79
|
|
| MD5 |
d318414ec58997fb299e0c3bb28f947d
|
|
| BLAKE2b-256 |
06f4b0d54459f6cac66026f973ef79143fee8cab5658286e88458e9dd297a8b9
|