Getting solana-trading-bot on IPFS and Solana blockchain
|
1 жил өмнө | |
---|---|---|
liquidity | 1 жил өмнө | |
market | 1 жил өмнө | |
utils | 1 жил өмнө | |
.env.copy | 1 жил өмнө | |
.gitignore | 1 жил өмнө | |
.prettierrc | 1 жил өмнө | |
LICENSE.md | 1 жил өмнө | |
README.md | 1 жил өмнө | |
buy.ts | 1 жил өмнө | |
output.png | 1 жил өмнө | |
package-lock.json | 1 жил өмнө | |
package.json | 1 жил өмнө | |
snipe-list.txt | 1 жил өмнө | |
tsconfig.json | 1 жил өмнө | |
wsol.png | 1 жил өмнө |
This code is written as proof of concept for demonstrating how we can buy new tokens immediately after liquidity pool is open for trading.
Script listens to new raydium USDC/SOL pools and buys token for a fixed amount in USDC/SOL.
Depending on speed of RPC node, the purchase usually happens before token is available on Raydium UI for swapping.
In order to run the script you need to:
.env.copy
file (remove the .copy from the file name when done).
npm install
npm run buy
in terminalYou should see the following output:
By default, script buys each token which has new liquidity pool created and open for trading. There are scenarios when you want to buy one specific token as soon as possible during the launch event. To achieve this, you'll have to use snipe list.
USE_SNIPE_LIST
to true
snipe-list.txt
file
This will prevent script from buying everything, and instead it will buy just listed tokens.
You can update the list while script is running. Script will check for new values in specified interval (SNIPE_LIST_REFRESH_INTERVAL
).
Pool must not exist before the script starts. It will buy only when new pool is open for trading. If you want to buy token that will be launched in the future, make sure that script is running before the launch.
If you have an error which is not listed here, please create a new issue in this repository.
finalized
.Error: 410 Gone: {"jsonrpc":"2.0","error":{"code": 410, "message":"The RPC call or parameters have been disabled."}, "id": "986f3599-b2b7-47c4-b951-074c19842bad" }
Error: No SOL token account found in wallet:
If you want to support my work, you can donate to my Solana wallet:
DM5buFVo7Fc3h6fb9W2f43RNARxWAmpkA3eSRQGDDQfw