Coder Social home page Coder Social logo

uni_graphql_ax's Introduction

Uni_GraphQL_Ax

I was approached on Telegram by an anonymous individual to build them a program that queries for live swap events and then saves them to a database. They requested it to be without any api keys, so I decided to use TheGraph. This was my first attempt at building such a program, and I would probably just write it all in python next time.

I built the codebase and managed a remote Linux server for them to store the data.

Live swaps scraper that creates csv files and uploads into sql database.

You will need to have the latest version of node.js and python installed, also it is using My SQL database.

Create a new folder on your desktop and transfer all the files into the new folders.

Database configuration settings will be prompted if none are found and a new config file will be created.

Open up the command line and change directory to the newly created project folder that contains the files.

Run the python script to initiate the automated program, by typing "python3 program.py".

This will initiate the program. The majority of the operations are done by time_check.py as it creates new directories and queries the current time stamps in batches of (50), and then compares the first, middle and last for changes. If time changes are noticed, then the full swap data is queried, prepared and stored in the SQL database.

After a few runs, batches of (50) seemed like an adequate comparison, as the csv reports are only in batches of (100), and after monitoring of the database, the uploaded swaps are queried at up to current datetime.

If you need to quit the program, press ctrl+c. If there are errors upon running it again after an abrupt halt, delete the "/newtimesets" and "/oldtimesets" directories and contents, and try to restart the program.

uni_graphql_ax's People

Contributors

starkeyjon avatar

Watchers

 avatar

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.