Skip to main content

Jupiter-Solana

Jupiter-Solana is a Python library for interacting with the Jupiter aggregator on the Solana blockchain.

Features

  • Token swapping
  • Limit orders

Installation

pip install jupiter

Quick Start

from solana.rpc.api import Client
from jupiter-solana import Jupiter

# Initialize Solana client
client = Client("YOUR_CUSTOM_RPC_URL")

# Initialize Jupiter
jupiter = Jupiter(client)

# Get a quote
quote = jupiter.quote(
    input_mint="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",  # USDC
    output_mint="So11111111111111111111111111111111111111112",  # SOL
    amount=1000000  # 1 USDC
)

# Execute a swap
transaction_hash = jupiter.execute_swap(
    input_mint="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",  # USDC
    output_mint="So11111111111111111111111111111111111111112",  # SOL
    amount=1000000  # 1 USDC
)

Features

Quoting

Get the best swap route for a token pair:

quote = jupiter.quote(input_mint, output_mint, amount)

Swapping

Execute a token swap:

transaction_hash = jupiter.execute_swap(input_mint, output_mint, amount)

Limit Orders

Place a limit order:

transaction_hash = jupiter.execute_limit_order(input_mint, output_mint, in_amount, out_amount)

Cancel limit orders:

transaction_hash = jupiter.cancel_limit_orders(orders)

Refer to the method docstrings for detailed information on parameters and usage.

Disclaimer

This library is in alpha and is not stable - it should not be used in production. By using this library you assume all risks of loss of your funds.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License and is a hard-fork of 0xtaodev jupiter-solana-sdk

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupiter_solana-0.0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jupiter_solana-0.0.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file jupiter_solana-0.0.1.tar.gz.

File metadata

  • Download URL: jupiter_solana-0.0.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for jupiter_solana-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0fadae4bdff827e6a07d2aeb078f581c62edccfa3152040985dcd80f92f5b282
MD5 8363b71b3c56584188f12158a998332a
BLAKE2b-256 0001551461549989832e67bde426d5cb4a02e9247232cc2e84c64660cadc8d22

See more details on using hashes here.

File details

Details for the file jupiter_solana-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: jupiter_solana-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for jupiter_solana-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 263a91654fbbb41781d0d045cbb7b3dfb6cded6f85e41fd32f4637b152acd264
MD5 2efec4608b1fa35fc22450fb0efb0908
BLAKE2b-256 9caee47de1812930d4bacbab5bb8cc6869d42dcec7f134653b6c9c3d5b5ea1b8

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page