bigmacman1129
solana-trading-platform
Pythonโœจ New

A Python-powered Solana arbitrage trading platform that detects and executes cross-DEX opportunities in real time using Jupiter, with portfolio tracking, live analytics, and automated trading features.

Last updated Jul 10, 2026
34
Stars
28
Forks
0
Issues
+8
Stars/day
Attention Score
77
Language breakdown
No language data available.
โ–ธ Files click to expand
README

โšก Vireonix Trading Platform

A modern Solana arbitrage & trading desktop application built with Python and CustomTkinter. Detects cross-DEX price imbalances in real time using Jupiter's v6 quote API and executes circular arbitrage trades (A โ†’ B โ†’ A) automatically or on demand.


Demo

Vireonix Demo


Features

Arbitrage Engine

  • Circular arbitrage detection โ€” queries Jupiter v6 for Aโ†’B then Bโ†’A quotes on every monitored pair simultaneously
  • Cross-DEX coverage โ€” Jupiter routes through Raydium, Orca, Meteora, Phoenix, and more automatically
  • 8 default pairs pre-loaded: SOL/USDC, SOL/USDT, SOL/JUP, SOL/RAY, SOL/BONK, SOL/WIF, USDC/USDT, USDC/RAY
  • Configurable risk controls โ€” min profit %, max position size (SOL), slippage BPS, scan interval
  • Auto-execute mode โ€” engine executes the best opportunity each scan cycle automatically
  • Manual execute โ€” select any detected opportunity and trigger the swap yourself

Dashboard & UI

  • 6-view navigation โ€” Dashboard, Arbitrage Scanner, Portfolio, Trade, History, Settings
  • Live stats cards โ€” total profit, opportunities found, trades executed, scan count
  • Spread monitor โ€” shows price impact and mid-amounts for every scanned pair
  • Portfolio view โ€” live wallet holdings with token logos, balances, and USD estimates
  • Live price chart โ€” real-time price graph with color-coded up/down segments
  • Price change table โ€” 1m / 5m / 15m / 30m / 1h / 6h / 24h changes per token
  • Telegram channel feed โ€” live messages from any Telegram chat/channel inside the app
  • Trade history โ€” separate tabs for arbitrage trades and manual swaps with Solscan links

Notifications

  • Telegram bot alerts โ€” sends a message when an arbitrage trade executes
  • Twilio phone call โ€” calls you when a token hits a configured price target

Tech Stack

| Layer | Technology | |---|---| | UI | Python 3, CustomTkinter, Matplotlib | | Blockchain | solana-py, solders, Jupiter Python SDK | | Arbitrage | aiohttp + Jupiter v6 Quote API | | Swap execution | SolanaTracker DEX aggregator | | Notifications | Telethon (Telegram), Twilio | | Storage | SQLite (vireonix.db) | | Config | python-dotenv |


Getting Started

1. Clone the repo

git clone https://github.com/meat29/Solanatradingplatform.git
cd Solanatradingplatform

2. Create a virtual environment

python -m venv venv

Windows

venv\Scripts\activate

macOS / Linux

source venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

4. Configure environment variables

Copy .env.example to .env and fill in your values:

cp .env.example .env
# Solana wallet public address (for portfolio display)
walletaddress=YOURWALLETPUBLICKEY

Solana RPC endpoint

solana_endpoint=https://api.mainnet-beta.solana.com

Optional: QuikNode URL for token price data (faster)

QUIKNODEURL=https://your-endpoint.quiknode.pro/YOURKEY/addon/912

Telegram feed (get apiid / apihash from https://my.telegram.org)

apiid=YOURTELEGRAMAPIID apihash=YOURTELEGRAMAPIHASH TELEGRAMBOTTOKEN=YOURBOTTOKEN TELEGRAMUSERID=YOURUSERID CHATIDENTIFIER=@yourchannel

Twilio (optional, for phone call alerts)

TWILIOACCOUNTSID=TWILIOACCOUNTSID TWILIOAUTHTOKEN=yourauthtoken TWILIO_FROM=+12025550100 TWILIO_TO=+19175550100
Never commit your .env file. It is already in .gitignore.

5. Run the app

python main.py

How Arbitrage Works

1. Engine sends Jupiter v6 quote requests for every monitored pair in parallel
  • For pair SOL โ†’ USDC:
โ€ข Quote Aโ†’B: how many USDC do I get for 0.05 SOL? โ€ข Quote Bโ†’A: how much SOL do I get back for that USDC?
  • Net profit = outputlamports โˆ’ inputlamports โˆ’ tx_fees (~0.000025 SOL)
  • If profit % โ‰ฅ threshold โ†’ opportunity flagged
  • Jupiter's best-route selection means Aโ†’B may route through Raydium
while Bโ†’A routes through Orca, capturing a real price imbalance.
  • Execute: first leg swap via SolanaTracker aggregator

Navigation Guide

| View | Description | |---|---| | Dashboard | Overview stats + recent opportunities table. Start/stop engine here. | | Arbitrage Scanner | Full scanner controls, pair management, live opportunities, spread monitor | | Portfolio | Wallet token holdings fetched live from chain | | Trade | Manual swap by entering input/output mint addresses, with live chart | | History | All arbitrage trades and manual swaps with Solscan deep-links | | Settings | Wallet key import, RPC, Telegram/Twilio credentials, risk controls |


Database

The app uses a local SQLite database vireonix.db with three tables:

| Table | Contents | |---|---| | wallet | Encrypted-at-rest private key (one row) | | token_purchases | Manual swap history with weighted avg price | | arbitrage_trades | Every executed arbitrage: pair, profit, DEX routes, TX id |


Security Notes

  • Private key is stored in vireonix.db locally โ€” never pushed to any server
  • Use a dedicated trading wallet with only the funds you intend to trade; never use your main wallet
  • All credentials (Twilio, Telegram, QuikNode) are loaded from .env โ€” no secrets in source code
  • Add .env and vireonix.db to .gitignore before committing

Troubleshooting

| Problem | Fix | |---|---| | aiohttp import error | pip install aiohttp | | Jupiter quotes returning errors | Check your internet connection; Jupiter API has rate limits | | Swap fails with "insufficient funds" | Ensure wallet has enough SOL for the trade + priority fees (~0.001 SOL) | | Telegram feed not loading | Verify apiid and apihash in .env; run python main.py and check the Settings โ†’ Telegram Feed tab | | Price chart blank | Enter the token's mint address and click Chart; requires Raydium to list the token | | Private key rejected | Must be base58 encoded (Phantom export format) |


Project Structure

Solanatradingplatform/
โ”œโ”€โ”€ main.py              # Desktop UI โ€” 6-view navigation app
โ”œโ”€โ”€ arbitrage.py         # Async arbitrage engine (Jupiter v6)
โ”œโ”€โ”€ solanatracker.py     # Swap execution via SolanaTracker aggregator
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ .env.example         # Template โ€” copy to .env
โ””โ”€โ”€ vireonix.db          # Auto-created on first run (gitignored)

License

MIT License โ€” see LICENSE for details.



Contributing

Pull requests are welcome. For major changes, open an issue first. Please use a testnet wallet when developing swap-related features.

๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท bigmacman1129/solana-trading-platform ยท Updated daily from GitHub