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
Metadata
Release files for jupiter-solana 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jupiter_solana-0.0.1.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jupiter_solana-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.4 kB
Release files / jupiter_solana-0.0.1.tar.gz
| Download URL | jupiter_solana-0.0.1.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0fadae4bdff827e6a07d2aeb078f581c62edccfa3152040985dcd80f92f5b282
|
|
BLAKE2b-256 checksum How to use checksums |
0001551461549989832e67bde426d5cb4a02e9247232cc2e84c64660cadc8d22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|
Release files / jupiter_solana-0.0.1-py3-none-any.whl
| Download URL | jupiter_solana-0.0.1-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
263a91654fbbb41781d0d045cbb7b3dfb6cded6f85e41fd32f4637b152acd264
|
|
BLAKE2b-256 checksum How to use checksums |
9caee47de1812930d4bacbab5bb8cc6869d42dcec7f134653b6c9c3d5b5ea1b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|