Skip to main content

Pools

Tests PyPI version

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 20201024

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pools 20201024
File Size Uploaded
pools-20201024.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pools 20201024
File Interpreter ABI Platform
pools-20201024-py3-none-any.whl Python 3 none any Details

Total release size: 17.5 kB

Release files / pools-20201024.tar.gz

Download URL pools-20201024.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2d76ce28bedc2366de744ed1076e14032ee446bda4aa93c0245212106891702c
BLAKE2b-256 checksum
How to use checksums
0a4fc7b3866932c460b34d4dbc8cd604230f7dc7504f69c017678aa86374f7c5
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-20201024-py3-none-any.whl

Download URL pools-20201024-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b489d753980f393753874e0084381842acafdb96896d8b6c625372a36b487020
BLAKE2b-256 checksum
How to use checksums
4b099340fb9f45629818c161d8a413ba3a9bca8cb4e7ccd1ad355c5f7a6fdeec
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 history Release notifications | RSS feed

This release

20201024 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page