This is not 100% risk-free as transactions may fail but it's a proof of concept to use Jupiter API to do arbitrage on Solana.
Feel free to replace SOL with other assets, it is advisable to open token accounts in advance.
Profitability can be adjusted based on a PROFITABILITY_THRESHOLD, but it's best to account for platform and lp provider fees.
- Install dependencies
npm install
-
Create a
.env
file with your PRIVATE_KEY and ENDPOINT -
run the file
npm start
- Alternatively, you can run it by naming the assets to arb from the CLI
npm start BTC USDC
- Can run it in Docker:
docker build -t jupiter-arb .