aiorocket2 is an asynchronous Python client for the xRocket Pay API, providing full access to all methods and parameters of the payment system.
All types, enums, and data structures are mirrored as closely as possible to the original API.
- Complete wrapper for all xRocket API methods
- Asynchronous access via
asyncio - Full typing support and enums
- Direct parameter mapping from API
- Production-ready and test-friendly
pip install aiorocket2Requires Python 3.7+
- Open the bot @xRocket or @xrocket_testnet_bot for the testnet
- Go to: xRocket API -> xRocket Pay → Create App → API token
- Copy the token and use it in your code
import asyncio
from aiorocket2 import xRocketClient
async def main():
client = xRocketClient(api_key="YOUR_API_KEY")
# Get application info
info = await client.get_info()
print(info)
# Example: create a invoice
invoice = await client.create_invoice(
amount=10, # 10 USDT to pay
min_payment=0, # For single payment pass 0
num_payments=1, # For single payment pass 1
currency="USDT",
description="Buy some products",
hidden_message="Thanks for payment!", # this will appear to the payer after payment
comments_enabled=True
)
print(invoice.link)
asyncio.run(main())All library methods mirror the xRocket API exactly, including types, required and optional parameters.
Full documentation is available online: aiorocket2 Docs Includes:
- Description of all API methods
- Usage examples
- List of all enums and data structures
This project is licensed under GNU GPLv3. Full license text

