1.0.0 • Published 2 years ago
tracker-v2 v1.0.0
DCA Tracker
Tracks DCA Program activities such as open DCA position, close DCA position, withdrawal, deposits, order fills.
Runs a forever loop to loop through events emitted by the program via Anchor's event CPI. Stores events in a Postgres DB.
Data is retrieved through DCA API
Development
- You will need a Postgres DB
- Environment Variables
RPC="https://api.devnet.solana.com" EVENT_AUTHORITY="7KFbFLJ3MY74ecp65aSNmY79EKpBxbQEJ1MdQehcapuV" POSTGRES_USER="abc" POSTGRES_PASSWORD="abc" POSTGRES_DB="dca-tracker" POSTGRES_PORT="5443" DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:${POSTGRES_PORT}/${POSTGRES_DB}?schema=public" SENTRY_DSN="" BETTER_UPTIME_MONITOR="" JUP_TG_BOT_USERNAME="Hello" JUP_TG_BOT_PASSWORD="World"
- Install dependencies
pnpm i
- Database Migrations
npx prisma migrate dev # or npx prisma migrate deploy or if testing against a ready DB npm run prisma:generate
- Run
npm run dev
- Build
npm run build
Production
Hosted on fly.io
fly auth login
fly secrets set .... # Set env vars if necessary. (already set)
fly deploy # see fly.toml for more details
1.0.0
2 years ago