Git Product home page Git Product logo

solana-rpc-listener's Introduction

Solana Token Data Ingestor

Documentation Build Status Code Coverage License
Documentation N/A N/A License

Description

This project, which is in progress, is a Solana RPC listener that listens for token transactions and stores, caches, and serves the data in a RESTful API. The ingested primarily focuses on token transactions and token mints, and will be used to power a trading bot that will be able to make trades based on the data it receives.

Program Flow

Program Flow

Installation

Clone the repository

git clone https://github.com/Zaydo123/Solana-RPC-Listener

Change directory

cd Solana-RPC-Listener

Install dependencies

pip install -r requirements.txt

Environment Variables

Create a .env file in the root directory and add the following environment variables like so:

echo -e "DATABASE_URL=postgresql://user:password@localhost:5432/dbname
POSTGRES_DB = postgres
POSTGRES_USER = postgres
POSTGRES_PASSWORD = postgres" > .env

Database Setup

Use the following commands to run the database in a docker container:

docker compose up -d

make env file in prisma folder like so:

echo "DATABASE_URL=postgresql://user:password@localhost:5432/dbname" > prisma/.env

and then run the following commands to create the database tables and generate the prisma client:

cd prisma
prisma generate
prisma migrate dev --name init

Your database should now be set up and ready to go.

Running the server (Note: The server is not yet fully functional)

Development command

uvicorn main:app --reload --port 3000 --host 0.0.0.0

Production command

gunicorn -k uvicorn.workers.UvicornWorker main:app

solana-rpc-listener's People

Contributors

zaydo123 avatar

Stargazers

 avatar Daniel wu avatar  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.