Git Product home page Git Product logo

yield_explorer's Introduction

Introduction

Yield explorer isn't usable anymore because of a critical API change thank you for trying it out!

I needed a tool that would show me historical data and performance of my staked crypto but was unable to find a tool that I liked. I was finding my self going to yieldwatch a couple of times during the day and this wasn't cool because it was only showing me information on my stake at that particular time. There wasn't any historical data that would be charted, analyzed , or show the increase/decrease of the performance in percentage in daily-weekly times etc. I thought that rather than going to yieldwatch every hour or so, let me write a code to automate this. Not only it would show me what's up with my investment at a particular time. It would save the data in the database so that I can have historical data on my investment as well. And with this data that I saved, I can use the frontend application to see my data in informational graphs. Please feel free to use this. But don't send many requests because that wouldn't be nice to the folks at yieldwatch. I send one request every hour.

What to come

The priority was to add a frontend that shows graphs of the data in the database. As of now I added this feature. In the future I plan to add enhancements to the frontend to shows a couple more graphs and some utilies. If you have an idea let me know. Also currently only Autofarm and PancakeSwap are tested. If you use any of the other providers below and it's not working correctly, let me know.

How to use

Add your wallet address, deposit, and AAM provider as environment variables like

export WALLET_ADDRESS=<crypto wallet address>
export DEPOSIT=300 (as in 300 dollars, every time you buy more you should update this to figure out if you're losing or not)
export PROVIDER=<provider>

Options for provider, currently supporting only one provider at a time. If you use multiple providers, run the script for each of them. "Acryptos", "Autofarm", "StreetSwap", "PancakeSwap", "BeefyFinance", "Jetfuel", "CreamFinance", "Venus", "bDollar"

Install the required dependencies such as requests, schedule etc.

Run the database.py script to initialize the yield_db(create this before) database. You can then run the yield_explorer.py script's main method to get the current information on your investment. This will print out the information and also save it in the database. If you like to you can run a cron job every hour using the cron.py script. I use pm2 tool to run my processes automatically in my server.

How to use the frontend application

To run the frontend application you need to run both the server that takes the data from the database and the frontend application itself.

First you need to have nodejs and npm available in your system. You can look at it online. First, go to the backend folder and run the command npm install to download all dependencies. After this change the mysql name and password in app.js according to your mysql credentials. Now you can run npm run start to start your server.

After starting your server go to the frontend folder. Like last time run the command npm install. After installing the dependencies you can run the command npm run dev. This command will open the frontend application in http://localhost:5000/. Use your browser to go to this URL and your graphs will be there.

If you find this work useful you can tip me here BSC address: 0x878BC5bC7cBc369dffC00cdc6e1718478dc1D639. You can also contact me if you want a new feature.

yield_explorer's People

Contributors

sedat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

yield_explorer's Issues

No data

I have changed the wallet address and provider to PanckakeSwap, but getting no response

Add a frontend that shows the data in a graph.

For starters, it can be only one graph that shows the value over time. After this, we can add multiple graphs for yield, if the user holds multiple tokens, a graph per token, etc.

The only requirement I would ask, for now, a good charting library that would support many nice features, fast, and plug & play. As in you only need to open a .html file and it fetches everything with scripts. So that someone who doesn't know much programming can easily use it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.