Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1001 Bytes

File metadata and controls

50 lines (36 loc) · 1001 Bytes

Jupiter Swap Bot

A simple Python script to buy and sell tokens on Solana using Jupiter Exchange.

Features

  • Buy tokens with SOL
  • Sell tokens for SOL
  • USDC default option (just press Enter)
  • Direct Jupiter integration
  • No additional fees

Setup

  1. Install dependencies:
pip install requests python-dotenv solders
  1. Create a .env file:
WALLET_PRIVATE_KEY=your_base58_private_key_here
RPC_URL=https://mainnet.helius-rpc.com/?api-key=your_helius_api_key

Getting Helius RPC

  1. Sign up at helius.xyz (free tier available)
  2. Create a new project
  3. Copy your RPC URL from the dashboard
  4. Add it to your .env file

Usage

python swap_memecoin.py

Follow the prompts to:

  • Choose buy or sell
  • Enter token contract (or press Enter for USDC)
  • Enter amount

Requirements

  • Python 3.7+
  • Solana wallet with some SOL for fees
  • Helius RPC endpoint (recommended)

⚠️ Warning: Always test with small amounts first!