Jupiter-DevRel
jup-python-sdk
Python

Python SDK for Jupiter Exchange APIs.

Last updated May 13, 2026
21
Stars
8
Forks
3
Issues
0
Stars/day
Attention Score
46
Language breakdown
No language data available.
Files click to expand
README

Jup Python SDK

A Python SDK designed for seamless interaction with the Jupiter Ultra API, the simplest and safest way to trade on Solana.
With Ultra API, you don't need to manage or connect to any RPC endpoints, or deal with complex configurations.
Everything from getting quotes to transaction execution happens directly through the API.

Or as we like to say around here:
"RPCs are for NPCs."

For a deeper understanding of the Ultra API, including its features and benefits, check out the Ultra API Docs.

Installation

To install the SDK in your project, run:

pip install jup-python-sdk

Quick Start

Below is a simple example that shows how to fetch and execute an Ultra order with the Jup Python SDK:

from dotenv import load_dotenv from juppythonsdk.clients.ultraapiclient import UltraApiClient from juppythonsdk.models.ultraapi.ultraorderrequestmodel import UltraOrderRequest

load_dotenv() client = UltraApiClient()

order_request = UltraOrderRequest( input_mint="So11111111111111111111111111111111111111112", # WSOL output_mint="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", # USDC amount=10000000, # 0.01 WSOL taker=client.getpublic_key(), )

try: clientresponse = client.orderandexecute(orderrequest) signature = str(client_response["signature"])

print("Order and Execute API Response:") print(f" - Status: {client_response.get('status')}") if client_response.get("status") == "Failed": print(f" - Code: {client_response.get('code')}") print(f" - Error: {client_response.get('error')}")

print(f" - Transaction Signature: {signature}") print(f" - View on Solscan: https://solscan.io/tx/{signature}")

except Exception as e: print("Error occurred while processing the swap:", str(e)) finally: client.close()

You can find additional code examples and advanced usage scenarios in the examples folder. These examples cover every Ultra API endpoint and should help you get up and running quickly.

Setup Instructions

Before using the SDK, please ensure you have completed the following steps:

  • Environment Variables:
Set up your required environment variables. Example (base58 string or uint8 array supported):
# Base58 format
   export PRIVATEKEY=yourbase58privatekey_here

# OR as a uint8 array (advanced) export PRIVATE_KEY=[10,229,131,132,213,96,74,22,...]

Note: PRIVATE_KEY can be either a base58-encoded string (default Solana format), or a uint8 array (e.g. [181,99,240,...]). The SDK will automatically detect and parse the format.

  • Optional Configuration:
Depending on your credentials and setup, you have a couple of options for initializing the UltraApiClient:

- Custom Private Key Environment Variable: By default, the SDK looks for your private key in an environment variable named PRIVATE_KEY. If you use a different environment variable name, you can specify it explicitly:

from juppythonsdk.clients.ultraapiclient import UltraApiClient

client = UltraApiClient(privatekeyenvvar="YOURCUSTOMENVVAR")

This tells the SDK to read your private key from the environment variable you want.

- Using an API Key for Enhanced Access: If you have an API key from the Jupiter Portal, you can pass it directly when creating the client:

from juppythonsdk.clients.ultraapiclient import UltraApiClient

client = UltraApiClient(apikey="YOURAPI_KEY")

When you supply an API key, the library will call the https://api.jup.ag/ API rather than the default https://lite-api.jup.ag/ API.

Disclaimer

🚨 This project is actively worked on. While we don't expect breaking changes as the SDK evolves, we recommend you stay updated with the latest releases. Any important updates will be announced in the Discord server.

© 2026 GitRepoTrend · Jupiter-DevRel/jup-python-sdk · Updated daily from GitHub