This bot runs a simple dollar cost averaging strategy to buy assets over a period of time. It utilizes Jupiter Aggregator, a swap aggregator on Solana.
This code was made to experiment and learn. It has not been thoroughly tested and is unaudited. Please use at your own risk!
Based on the Jupiter Core Example
yarn install
- Create an
.env
file at the project root. See.env-example
. Private key can be obtained from Phantom via Settings -> Export Private Key. - Create your own
dcaconfig.ts
. Seedcaconfig-example.ts
for a template.
To see example cron expressions, check out crontab.guru. Note: the minimum interval is one minute.
yarn start
- transaction retries. Not great to fail on swaps that may occur once-a-week or biweekly.
- start and end dates.