{"repo":"BobTheBuidler/ypricemagic","free":true,"listed":false,"github":"https://github.com/BobTheBuidler/ypricemagic","clone":"git clone https://github.com/BobTheBuidler/ypricemagic.git","description":"Fetch accurate prices for tokens solely using on-chain data.","language":"C","stars":76,"topics":["erc20-tokens","ethereum-contract","evm","python","python3","web3","web3py","async-python","crypto","cryptocurrencies"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"ypricemagic Use this tool to extract historical on-chain price data from an archive node. ypricemagic is built to work seamlessly with both sync and async Python codebases using the ez-a-sync framework. Requirements - Python 3.9 or higher. - At least 16GB of RAM. Prerequisites - First, you will need to bring your own archive node. This can be one you run yourself, or one from one of the common providers (Tenderly, Alchemy, QuickNode, etc.) - You will also need an auth token for Etherscan's API. Follow their guide to get your key, and set env var ETHERSCAN TOKEN with its value. Installation ypricemagic is published on PyPI. Simply install it just as you would any other library. Network Configuration ypricemagic utilizes the Brownie framework for Ethereum smart contract interactions. As such, it's essential that users configure a Brownie network to use their chosen RPC. Ensure you have access to an Ethereum node (e.g., through Infura or Alchemy) and add the provided API endpoint to your Brownie network configuration. Refer to the Brownie documentation on network management for detailed guidance on setting up your networks. This setup is critical, as without it, ypricemagic will not be able to communicate with your RPC. Usage There are 2 main entrypoints to ypricemagic, y.get price and y.get prices. You can also use ypricemagic asynchronously: See the docs for more usage information. Debug logging If you need to spot long-running async calls, enable the y.stuck? logger at DEBUG ","default_branch":null,"files":null,"tree":[],"storefront":"/r/BobTheBuidler","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/BobTheBuidler/ypricemagic/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}