Skip to main content

Python library for pools liquidity providers

Project description

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

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-20210424.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

pools-20210424-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pools-20210424.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for pools-20210424.tar.gz
Algorithm Hash digest
SHA256 05ff7bffacc50085b6a81d77652aa41e882e342c6dff3312b6d3426adcffe46d
MD5 d62a04db2860a7748227d8aafb347235
BLAKE2b-256 36f3f3379121e9748c8549019e1277f49cb4157d8e2722eff27f12eeb29ae73a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pools-20210424-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for pools-20210424-py3-none-any.whl
Algorithm Hash digest
SHA256 955e3c3201f25bd70c38e261f163ddf1ce789ad6c9695471c452ae585e09f1ad
MD5 814e3756283b6255e2e8bd91e5d8fcdd
BLAKE2b-256 ae73f6cb51a5afde10956c415e6ac9abda34f3dd17ef60b6ad3f5386f09d1b09

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