### Quick Start: Fetch and Execute Ultra Order Source: https://github.com/jupiter-devrel/jup-python-sdk/blob/main/README.md Example of fetching and executing an Ultra order using the Jup Python SDK. Ensure environment variables are loaded and the client is initialized. ```python from dotenv import load_dotenv from jup_python_sdk.clients.ultra_api_client import UltraApiClient from jup_python_sdk.models.ultra_api.ultra_order_request_model import UltraOrderRequest load_dotenv() client = UltraApiClient() order_request = UltraOrderRequest( input_mint="So11111111111111111111111111111111111111112", # WSOL output_mint="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", # USDC amount=10000000, # 0.01 WSOL taker=client._get_public_key(), ) try: client_response = client.order_and_execute(order_request) 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() ``` -------------------------------- ### Install Jup Python SDK Source: https://github.com/jupiter-devrel/jup-python-sdk/blob/main/README.md Install the SDK using pip. This is the first step to using the library in your project. ```sh pip install jup-python-sdk ``` -------------------------------- ### Install SDK in Editable Mode Source: https://github.com/jupiter-devrel/jup-python-sdk/blob/main/README-dev.md Install the package in editable mode within the project's directory. This is the primary step for local development. ```sh pip install -e . ``` -------------------------------- ### Install SDK from Local Path Source: https://github.com/jupiter-devrel/jup-python-sdk/blob/main/README-dev.md Use this command to install the SDK from its local path in another project. Replace the placeholder path with the actual path to the SDK directory. ```sh pip install -e /path/to/jup-python-sdk ``` -------------------------------- ### Initialize UltraApiClient with Custom Env Var Source: https://github.com/jupiter-devrel/jup-python-sdk/blob/main/README.md Initialize the UltraApiClient, specifying a custom environment variable name for the private key if it's not 'PRIVATE_KEY'. ```python from jup_python_sdk.clients.ultra_api_client import UltraApiClient client = UltraApiClient(private_key_env_var="YOUR_CUSTOM_ENV_VAR") ``` -------------------------------- ### Set Private Key Environment Variable Source: https://github.com/jupiter-devrel/jup-python-sdk/blob/main/README.md Configure your private key for authentication. Supports base58 format or a uint8 array. ```sh # Base58 format export PRIVATE_KEY=your_base58_private_key_here # OR as a uint8 array (advanced) export PRIVATE_KEY=[10,229,131,132,213,96,74,22,...] ``` -------------------------------- ### Initialize UltraApiClient with API Key Source: https://github.com/jupiter-devrel/jup-python-sdk/blob/main/README.md Initialize the UltraApiClient using an API key obtained from the Jupiter Portal for enhanced access. This directs calls to the main API endpoint. ```python from jup_python_sdk.clients.ultra_api_client import UltraApiClient client = UltraApiClient(api_key="YOUR_API_KEY") ``` -------------------------------- ### Create and Push Git Tag Source: https://github.com/jupiter-devrel/jup-python-sdk/blob/main/README-release.md Tag the commit with the new version number and push the tag to the origin. Replace vX.Y.Z with the actual version number. ```shell git tag vX.Y.Z git push origin vX.Y.Z ``` -------------------------------- ### Commit Version Update Source: https://github.com/jupiter-devrel/jup-python-sdk/blob/main/README-release.md Commit the version update in pyproject.toml to the main branch. Ensure you replace vX.Y.Z with your actual version number. ```shell git add pyproject.toml git commit -m "Bump version to vX.Y.Z" git push origin main ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.