https://github.com/solguru310/raydium-tx-telegram-bot
This is a Telegram Bot for MonitorFi to get a wallet SOL balance and show the JSON parse data of Raydium AMM and Raydium CP Swap transactions.
https://github.com/solguru310/raydium-tx-telegram-bot
raydium raydium-amm raydium-cp-swap solana spl-token telegram-bot transaction
Last synced: 6 months ago
JSON representation
This is a Telegram Bot for MonitorFi to get a wallet SOL balance and show the JSON parse data of Raydium AMM and Raydium CP Swap transactions.
- Host: GitHub
- URL: https://github.com/solguru310/raydium-tx-telegram-bot
- Owner: solguru310
- Created: 2024-11-03T06:23:49.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-12-11T09:15:00.000Z (6 months ago)
- Last Synced: 2024-12-11T10:23:29.210Z (6 months ago)
- Topics: raydium, raydium-amm, raydium-cp-swap, solana, spl-token, telegram-bot, transaction
- Language: TypeScript
- Homepage:
- Size: 84 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Raydium Transaction Parse Telegram Bot
Main objective: create a telegram bot with a user flow, described on a schema below.

## Contact me
Telegram: [@dwlee918](https://t.me/@dwlee918)X: [@derricklee918](https://x.com/derricklee918)
## Key Points / Requirements:
- ONLY SOLANA BLOCKCHAIN
- Only parse Raydium swap transactions, ignore all other.
Also, ignore swaps without SOL being used as either IN or OUT token.
The output of parsed transaction should be of the following type:```
export type TradeType = 'BUY' | 'SELL';export interface Swap {
// transaction signature
signature: string;
// ms since epoch when the transaction was processed
timestamp: number;
// mint of the alt token being traded
tokenMint: string;
// decimals of the alt token being traded
tokenDecimals: number;
// type of trade (BUY or SELL)
type: TradeType;
// UI amount of the input token, without decimals
amountIn: number;
// UI amount of the output token, without decimals
amountOut: number;
// raydium amm pool id which was used for the swap
poolId: string;
// address of the user who signed the transaction
signer: string;
}
```- Try to optimize it to only ONE rpc call per user input (applies both for parse tx and get balance), that’s important.
- You mustn’t use any third-party API’s for parsing swap transaction, only solana json rpc.
- Get balance should work only with System Program accounts. Use any API you’re most comfortable with for converting SOL balance to USD.
- Code should be as clean and understandable as possible. Try avoiding using any at all, unknown as much as possible.## Tech Stack:
- NodeJs+TypeScript
- GrammyJs as a telegram bot api wrapper
- @solana/web3.js as a solana network json rpc wrapper
- Any other 3rd party package of your choice (but don’t overcomplicate things)## How to run
### Install Dependencies
```
npm install
```### Run Project
```
npm start
```### Screenshots


