Giter Club home page Giter Club logo

solana-sniper's Introduction

The lips of wisdom are closed, except to the ears of Understanding

** this is a fork of rust-websocket-server

RTFM <3

"Me cabe la de disparar, pero hay que apuntar un poquito..." - Emiliano Migliorata

Features:

  1. Analyzes holders and token distribution for a given SPL address. Follow this example to basically do anything you want.

  2. Track new tokens =>

    1. Subscribes to logs mentioning Raydium (more to come) and filter initialize2 events.
    2. Grabs the signature and fetch the transaction to find the main token address.
    3. Fetches new token metadata
  3. Track wallets => working! Checkout l179 of main. Input your wallet and start tracking (must run the project!

    1. Subscribes to the logs of the whale (l166)
    2. Receive transaction signatures after consuming and parsing websocket events.
    3. Fetches the transaction
    4. Parses transaction instructions (for now, only supports TransferChecked instructions) and pre/post token balances
    5. Outputs summary -> TODO: TELEGRAM BOT HERE
  4. WIP: Smart Whale tracking

    1. Manually input 10 wallets
    2. Track wallet transactions in 5/10 minute intervals.
    3. Persist a report for the given interval with Transaction Summaries
    4. Feed the summaries of each wallet to GPT to create a whale overall summary for the given interval
    5. Feed the each whale's summary of summaries to GPT to create an overal 10 minut summary.
    6. Persist, train, repeat, test, DBAB

Nice to have:

Technical Indicators

  • You receive alerts when there are some buy/sell signals following professional technical indicators. Recommended for professional users. (Example: "EMA of SOL/USD 1h cross up 70”)

Token Stats Performance

  • You receive alerts when token(s) changes its non-price parameters such as volume, number of trades, ect. in a certain time frames. (Example: "SOL Price Change % in 1h is greater than 30%”)

Trading Events

  • You receive alerts when specific actions happened, such as large buys, large sells or any trades by a wallet. (Example: "Wallet HhfmVzo...NxAFFKbWU2h (Solana) has a trade with value greater than $100k at Jupiter”)

Market Movements

You receive notifications following market events such as new trending tokens or new tokens listed. (Example: "SOL gets into Top10 Trending list")

Run

You will need to install Rust and Cargo. Pull the repo, cd into it and run:

  1. cargo build
  2. cargo run

This app uses Actix to expose an HTTP server, which you can test by making a request to http://localhost:8080/api/holders with the following body:

{
    "token_mint_addresses":["DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"] 
}
Endpoints

The list below summarizes the available endpoints through RPC aganst a public or private solana validator node:

  1. getLatestBlockhash Purpose: Fetches the latest block hash along with its validity period. Essential for ensuring transactions are recent and will be accepted by the network.
  2. getProgramAccounts Purpose: Retrieves all accounts owned by a specific program, useful for monitoring smart contracts, especially DeFi protocols, and NFT collections.
  3. getSignaturesForAddress Purpose: Returns the signatures of transactions that involve a specific account. This is crucial for tracking transactions related to specific tokens or wallets, providing insights into market activity.
  4. getTransaction Purpose: Fetches a confirmed transaction by its signature. Vital for analyzing transaction details, including participants, token amounts, and more.
  5. getAccountInfo Purpose: Retrieves information about a specific account, including its current balance and owner program. This can be used to monitor the balances of key accounts, such as token treasuries or large holders.
  6. getTokenAccountBalance Purpose: Returns the token balance of a specific SPL token account. It's useful for tracking the distribution and concentration of tokens among holders.
  7. getTokenAccountsByOwner Purpose: Finds all SPL token accounts owned by a specific account. This is useful for identifying all the tokens held by a particular investor or contract.
  8. getTokenSupply Purpose: Provides the total supply of an SPL token. Monitoring changes in token supply can offer insights into inflationary or deflationary pressures on a token's value.
  9. getSlot Purpose: Retrieves the current slot, which is a measure of time in the Solana blockchain. It's useful for understanding the blockchain's state and the timing of transactions.
  10. getSlotLeader Purpose: Identifies the current slot leader, which is the validator node responsible for producing blocks in the current slot. This can provide insights into network dynamics and validator performance.

Use Case

Identifying and Monitoring Top Traders

  • Use getSignaturesForAddress and getTransaction to track the activities of known wallets associated with top traders.

Token Holder Analysis for Decentralization and Whale Tracking

WebSocket Data:

  1. accountSubscribe: Monitor changes to specific accounts in real-time, such as token balances changing.
  2. logsSubscribe: Get real-time streaming of transaction logs, useful for live monitoring of contract interactions.
  3. signatureSubscribe: Subscribe to receive a notification when the transaction with the given signature reaches the specified commitment level.
  4. blockSubscribe: Subscribe to receive notification anytime a new block is confirmed or finalized.
  5. programSubscribe: Subscribe to a program to receive notifications when the lamports or data for an account owned by the given program changes

solana-sniper's People

Contributors

julianirigoyen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.