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.2.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for py_plugin_feeds-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79de3a36fff3b817153c3c7541ca0bc99927fc44f1850ccdba3ecd82b95b43bf |
|
MD5 | 9275b1406394dce0e1e60fa6430f27f4 |
|
BLAKE2b-256 | 35aed3af8741e74029fee5b42874e32afa44d2acd19e80f285a8dee3c84a7706 |