Skip to main content

PyPI - defi-analytics-py v4

Project description

defi-analytics-py v4

DeFi analytics library for NEAR Protocol.

Python: 3.9+ | PyPI: pypi-defi-analytics-py-v4

Installation

pip install pypi-defi-analytics-py-v4

Quick Start

from pypi_defi_analytics_py_v4 import PypiDefiAnalyticsPyV4Client

client = PypiDefiAnalyticsPyV4Client()

Network

status = client.get_network_status() block = client.get_block()

Accounts & Pricing

account = client.get_account("alice.near") price = client.get_near_price()

Pools

pools = client.get_pools() pool = client.get_pool(pool_id=1) top_pools = client.get_top_pools_by_tvl(limit=10)

Tokens

token_price = client.get_token_price("wrap.near") tokens = client.get_tokens()

Farms

farms = client.get_farm_list()

API Reference

Method Description
get_network_status() Current NEAR network status
get_block() Latest block info
get_account(account_id) Account details
get_near_price() NEAR token USD price
get_pools() All Ref Finance pools
get_pool(pool_id) Single pool by ID
get_top_pools_by_tvl(limit) Top pools ranked by TVL
get_token_price(token_id) Token price by contract ID
get_tokens() All tracked tokens
get_farm_list() Active farm list

Custom Configuration

client = PypiDefiAnalyticsPyV4Client( rpc_url="https://rpc.mainnet.near.org", timeout=60, )

License

MIT

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

pypi_defi_analytics_py_v4-1.0.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pypi_defi_analytics_py_v4-1.0.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file pypi_defi_analytics_py_v4-1.0.0.tar.gz.

File metadata

File hashes

Hashes for pypi_defi_analytics_py_v4-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4add58213f473a6e2d43fbdd02d3cbad9e864fc5044fb3b8653f78de9dc29baa
MD5 ebb2f829ce6bc9a6584fbf78d13b0e51
BLAKE2b-256 868790f41287fb512822f36073f528677a2769731fb547df9d40ff1080cca1f9

See more details on using hashes here.

File details

Details for the file pypi_defi_analytics_py_v4-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pypi_defi_analytics_py_v4-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31d21bf775a705d103299a53b3d14a75454aa286e647a3c5c0afe8ff2bdd3ebb
MD5 e9cb9917fb699a9ffe80ac607b730845
BLAKE2b-256 9675028aca8afa802c96167e0b5e36da4d71b9d4bb663393989c42f60696820b

See more details on using hashes here.

Supported by

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