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 년 전 | |
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 created.
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:
If you have an error which is not listed here, please create a new issue in this repository.
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