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 20201026

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 20201026
File Size Uploaded
pools-20201026.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pools 20201026
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

20201026 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