Getting solana-trading-bot on IPFS and Solana blockchain

Filip Dunđer fe71335cef Merge pull request #14 from Al366io/master 1 năm trước cách đây
common d22b1dc261 feat: create buy script for solana tokens 1 năm trước cách đây
liquidity 2ad4f93e84 feat: add console logging 1 năm trước cách đây
market d22b1dc261 feat: create buy script for solana tokens 1 năm trước cách đây
utils 4d204bf251 Add logic to use env variables 1 năm trước cách đây
.env.copy 4d204bf251 Add logic to use env variables 1 năm trước cách đây
.gitignore d22b1dc261 feat: create buy script for solana tokens 1 năm trước cách đây
.prettierrc d22b1dc261 feat: create buy script for solana tokens 1 năm trước cách đây
LICENSE.md d22b1dc261 feat: create buy script for solana tokens 1 năm trước cách đây
README.md 7e6c68309b Update README.md 1 năm trước cách đây
buy.ts 9ee545d59b Refactors / Cleaning 1 năm trước cách đây
package-lock.json 35a6e1a19a Update wallet configuration and dependencies 1 năm trước cách đây
package.json 35a6e1a19a Update wallet configuration and dependencies 1 năm trước cách đây
tsconfig.json d22b1dc261 feat: create buy script for solana tokens 1 năm trước cách đây

README.md

Solana Sniper Bot

Proof of concept - 2023-04-20

This code is written as proof of concept for demonstrating how we can buy new tokens immediately after liquidity pool is created.

Script listens to new raydium USDC pools and buys token for a fixed amount in USDC. Depending on speed of RPC node, the purchase usually happens before token is available on Raydium for swapping.

Setup

In order to run the script you need to:

  • Create a new empty Solana wallet
  • Transfer some SOL to it.
  • Convert some SOL to USDC.
    • We need USDC because the script is buying USDC pairs.
  • Set your PRIVATE_KEY, RPC_ENDPOINT and RPC_WEBSOCKET_ENDPOINT in the .env file (remove the .copy from the file name when done)
  • Install dependencies by typing: npm install
  • Run the script by typing: npm run buy in terminal