Skip to content

Fetch accurate prices for tokens solely using on-chain data.

License

Notifications You must be signed in to change notification settings

crebsy/ypricemagic

 
 

Repository files navigation

Use this tool to extract historical on-chain price data from an archive node.

Shoutout to Banteg (@bantg) and nymmrx (@nymmrx) for their awesome work on yearn-exporter that made this library possible.

To install:

pip install ypricemagic

To use:

from ypricemagic import magic
magic.get_price(token,block)

Or:

from ypricemagic.magic import get_price
get_price(token,block)

You can also import protocol specific modules. For example:

from ypricemagic import uniswap
uniswap.get_price(token, block)
from ypricemagic.compound import get_price
get_price(compoundToken, block)

About

Fetch accurate prices for tokens solely using on-chain data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%