Skip to main content

Plugin Decentralized Oracle Price Feed Python Package

Project description

Plugin Feeds : Python Package

Install

pip install py-plugin-feeds

Example to pull the price CIFI/USDT

from web3 import HTTPProvider, Web3
from py_plugin_feeds import get_token_price

def main():
    json_rpc_url = "https://rpc-amoy.polygon.technology"
    pair = "CIFI/USDT"
    web3 = Web3(HTTPProvider(json_rpc_url))
    web3.middleware_onion.clear()
    result= get_token_price(web3,pair,"latestAnswer")
    print("result:::",result)

if __name__ == "__main__":
    main()

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

py_plugin_feeds-1.0.4.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

py_plugin_feeds-1.0.4-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file py_plugin_feeds-1.0.4.tar.gz.

File metadata

  • Download URL: py_plugin_feeds-1.0.4.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for py_plugin_feeds-1.0.4.tar.gz
Algorithm Hash digest
SHA256 204ed2bad6b48e4cebaa930c1520b8fe27776272ce770f27c277999107916727
MD5 402b7a1550f9e4fed522543f18c67a94
BLAKE2b-256 cbbb046d560a0039830462b795853fc8c13bd3e408c3bdf5d9dc1331c45a2a36

See more details on using hashes here.

Provenance

File details

Details for the file py_plugin_feeds-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for py_plugin_feeds-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a11e45c5aafd7201f8f323b90bbe190664cb826198d7261be1f79c5851848fd1
MD5 197213bf17fcad11c0f2ca560204f1cf
BLAKE2b-256 5eb40cecb10285143a01c5c5b2e5f9b0018a5507337984ea0929d9782ce9a0e4

See more details on using hashes here.

Provenance

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