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
Release history Release notifications | RSS feed
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.3.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for py_plugin_feeds-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55426f0252b030465619178c579f90c7395bef9550f76d9f8af31541409cf961 |
|
MD5 | 5bbf4edfff556ef88ad9bdc23e278c71 |
|
BLAKE2b-256 | 657fe48bf6d69dc21943661c37c5a8e37ae31fde3b798cd7aaf679efc7242afd |