Skip to content

nm-de/jupter_swap_example_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages