Skip to main content

Python library for pools liquidity providers

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pools-20201024.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

pools-20201024-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file pools-20201024.tar.gz.

File metadata

  • Download URL: pools-20201024.tar.gz
  • Upload date:
  • Size: 9.0 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

Hashes for pools-20201024.tar.gz
Algorithm Hash digest
SHA256 2d76ce28bedc2366de744ed1076e14032ee446bda4aa93c0245212106891702c
MD5 b29f6960c889c2c2aa1ee52359f8372b
BLAKE2b-256 0a4fc7b3866932c460b34d4dbc8cd604230f7dc7504f69c017678aa86374f7c5

See more details on using hashes here.

File details

Details for the file pools-20201024-py3-none-any.whl.

File metadata

  • Download URL: pools-20201024-py3-none-any.whl
  • Upload date:
  • Size: 8.5 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

Hashes for pools-20201024-py3-none-any.whl
Algorithm Hash digest
SHA256 b489d753980f393753874e0084381842acafdb96896d8b6c625372a36b487020
MD5 11c326434c0ae6c67c0109562e02c945
BLAKE2b-256 4b099340fb9f45629818c161d8a413ba3a9bca8cb4e7ccd1ad355c5f7a6fdeec

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page