Driven by gRPC, collecting and analyzing all PumpFun transaction information
First, update balances of all tokens
During analysis, there are 4 situations:
- buy => Update token info
- sell => Update token info
- create => Update and create new token info
- complete => Delete token info
After analysis, if the price of the currently purchased token has been updated, it is transmitted through a channel; at the same time, if a token triggers purchase conditions, the data required for purchase is returned
Determine whether the token has been purchased before and whether it exists in token info
Start a new thread for buying and selling operations
-
Buy according to the information in token info
-
Monitor token info information in real time and analyze whether it needs to be sold
-
Sell when reaching the time threshold or selling conditions
-
Redis installation
Installation:
sudo apt update sudo apt install -y redisCheck if successful:
redis-server --versionA version output indicates success
Set to start automatically on boot:
sudo systemctl enable redis -
Configure relevant addresses in white_list.json and black_list.json
-
Set up the configuration file properly
-
Execute cargo run
以grpc驱动,收集所有pumpfun的交易信息进行分析
首先更新所有代币对应的balances
分析过程中有4种情况: 1. buy => 更新token info 2. sell => 更新token info 3. create => 更新并新建token info 4. complete => 删除token info
分析完毕后,如果当前购买的代币的价格出现了更新,则通过通道传递;同时,某个代币触发了购买条件,则返回购买所需数据
判断代币是否被购买过,是否存在token info中
开一个新的线程进行买入卖出操作
1. 根据token info的信息,进行买入
2. 实时监控token info的信息,并分析是否需要卖出
3. 到达时间阈值或卖出条件,进行卖出
-
redis 安装
安装: sudo apt update
sudo apt install -y redis检查是否成功: redis-server --version 有输出版本即可
设置开机自启
sudo systemctl enable redis
-
在white_list.json和black_list.json中配置相关的地址
-
在配置文件中配好
-
执行cargo run