I am creating a program in Java to send a swap transaction, but I keep receiving this error.
Transactions examples:
https://solscan.io/tx/46mZJDZFB9LeBnf8Vvq17JYemYPBBQhsqwZ68kmbGaTNGBbuppM6xmcYQFpBqMYSrr973xFyhYtEnNRQSGK3aQPC https://solscan.io/tx/2PtGw2uDo59pwc8voHqsmBCDA2pQYtc1hBXivyKBAmeC8pGCmARN6jUWyGSUyBD7D5hkRzeJgHgzGAkG3wRcT3TT
Basically, what I am doing:
- set ComputeUnitLimit
- set ComputeUnitPrice
- create WSol associated account
- transfer amount to wsol associated account to pay for the swap and rent
- create tokens associated account
- Raydium swap
- close Wsol associated account created in 3.
I am trying to swap 0.0001 SOL and the wallet has 0.038632336 SOL. The rent is 0.00203928.
Any help would be more than great!!
Thanks all!!