Documentation | Build Status | Code Coverage | License |
---|---|---|---|
N/A | N/A |
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.
git clone https://github.com/Zaydo123/Solana-RPC-Listener
cd Solana-RPC-Listener
pip install -r requirements.txt
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
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.
uvicorn main:app --reload --port 3000 --host 0.0.0.0
gunicorn -k uvicorn.workers.UvicornWorker main:app