Skip to main content

Pools

Tests Coverage Status PyPI version

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)

Source distribution for pools 20210424
File Size Uploaded
pools-20210424.tar.gz 11.2 kB Details

Built distribution (wheel)

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

Release history Release notifications | RSS feed

This release

20210424 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