Skip to main content

Jito Async SDK

PyPI version Python License: MIT Code style: black

🚀 A modern, async Python SDK for interacting with Jito Block Engine

Features

  • 🔄 Full async/await support with proper resource management
  • 🛡️ Type hints for better IDE support and code safety
  • 🎯 Simple, intuitive API for all Block Engine endpoints
  • 🔒 Built-in authentication via environment variables
  • 🐛 Comprehensive error handling with custom exceptions
  • 📦 Zero configuration needed - works out of the box with mainnet

Installation

pip install jito-async

Or with Poetry (recommended):

poetry add jito-async

Quick Start

import asyncio
from jito_async import JitoJsonRpcSDK

async def main():
    # Initialize with default mainnet URL
    async with JitoJsonRpcSDK() as jito:
        # Get tip accounts
        tip_accounts = await jito.get_tip_accounts()
        print(f"Found {len(tip_accounts['data']['result'])} tip accounts")
        
        # Get a random tip account
        random_account = await jito.get_random_tip_account()
        print(f"Random tip account: {random_account}")

if __name__ == "__main__":
    asyncio.run(main())

Authentication

To use authentication, pass an environment variable name containing your UUID:

# Set your UUID in environment
import os
os.environ["JITO_AUTH_TOKEN"] = "your-uuid-here"

# Use it in the SDK
jito = JitoJsonRpcSDK(uuid_var="JITO_AUTH_TOKEN")

API Reference

Initialization

JitoJsonRpcSDK(
    url: Optional[str] = None,  # Defaults to mainnet: https://mainnet.block-engine.jito.wtf
    uuid_var: Optional[str] = None  # Environment variable name for auth token
)

Methods

Get Tip Accounts

async def get_tip_accounts() -> Dict:
    """Get tip accounts from the Block Engine."""

Get Random Tip Account

async def get_random_tip_account() -> Optional[str]:
    """Get a random tip account."""

Get Bundle Statuses

async def get_bundle_statuses(bundle_uuids: Union[str, List[str]]) -> Dict:
    """Get bundle statuses."""

Send Bundle

async def send_bundle(params: Any = None) -> Dict:
    """Send a bundle to the Block Engine."""

Get Inflight Bundle Statuses

async def get_inflight_bundle_statuses(bundle_uuids: Union[str, List[str]]) -> Dict:
    """Get inflight bundle statuses."""

Send Transaction

async def send_txn(params: Any = None, bundle_only: bool = False) -> Dict:
    """Send a transaction to the Block Engine."""

Error Handling

The SDK provides custom exceptions for better error handling:

from jito_async import JitoError, JitoConnectionError, JitoResponseError

try:
    result = await jito.send_bundle(params={"your": "bundle_data"})
except JitoConnectionError as e:
    print(f"Connection error: {e}")
except JitoResponseError as e:
    print(f"API error: {e}")
except JitoError as e:
    print(f"General error: {e}")

Development

Clone the repository and install dependencies:

git clone https://github.com/ChefJodlak/jito-async.git
cd jito-async
poetry install

Run tests:

poetry run pytest

Format code:

poetry run black .
poetry run isort .

Type check:

poetry run mypy .

Contributing

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

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for jito-async 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jito-async 0.1.4
File Size Uploaded Provenance
jito_async-0.1.4.tar.gz 5.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for jito-async 0.1.4
File Interpreter ABI Platform
jito_async-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 11.1 kB

Release files / jito_async-0.1.4.tar.gz

Download URL jito_async-0.1.4.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
aad93aa94faf34b39fa36a654a21c98c4c5d37a98b83ad9ec17241b672e41238
BLAKE2b-256 checksum
How to use checksums
2dbcb51c16152437657a57f5cb6e097ed0e70b905ae19a330d61f2d628e8143d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.13.1 Darwin/24.2.0

Release files / jito_async-0.1.4-py3-none-any.whl

Download URL jito_async-0.1.4-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56efe161a5959e451c7d9a5b219485975c6b204b5e8fbe1b2be11661225f95cc
BLAKE2b-256 checksum
How to use checksums
9bc00d4e564ab42dd0fc527a3fcb1a3fdf9a170ae13cb61187506c5a92f14c43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.13.1 Darwin/24.2.0

Security for jito-async 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page