Skip to main content

xRocket

xRocket Python SDK.

Description

Pay and Trading xRocket API.

Getting Started

Dependencies

  • httpx

Installing

pip install xrocket

Using PayAPI

import asyncio
from xrocket import PayAPI

async def main():
    api = PayAPI(api_key='your api key here')

    cheque = await api.cheque_create(currency='BOLT', amount=1, enable_captcha=False)
    await api.cheque_delete(cheque['data']['id'])

    invoice = await api.invoice_create(currency='BOLT', amount=1)
    await api.invoice_delete(invoice_id=invoice['data']['id'])

    await api.transfer(user_id=6037851294, currency='TONCOIN', amount=0.1)

    await api.withdrawal(network='TON', currency='TONCOIN', amount=0.1,
                         address='EQAsl59qOy9C2XL5452lGbHU9bI3l4lhRaopeNZ82NRK8nlA')

asyncio.run(main())

Using TradeAPI

import asyncio
from xrocket import TradeAPI

async def main():
    api = TradeAPI(api_key='your api key here')

    balance = await api.balance()
    print(balance)

    await api.order_execute(pair='BOLT-TONCOIN', order_type='BUY', execute_type='LIMIT',
                            rate=0.02, amount=5, currency='BOLT')

    price = await api.rates_crypto_in_fiat(crypto='BOLT', fiat='USD')
    print(f"1 BOLT = {price['data']['rate']} USD")

asyncio.run(main())

Authors

@shibdev @VladPavly

Version History

  • 0.2.1
    • Added testnet support
  • 0.2.0
    • Additions
  • 0.1.0
    • Initial version

License

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

Donate

If you like the library, I will be glad to accept donations.

  • TON: EQCgphx8rTI0PukwmgpVqiPgqguTujhQscg2h7jgc4U0t347

Acknowledgments

Metadata

Release files for xrocket 0.2.1

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

Source distribution (sdist)

Source distribution for xrocket 0.2.1
File Size Uploaded Provenance Actions
xrocket-0.2.1.tar.gz 7.9 kB Without provenance Details for xrocket-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xrocket 0.2.1
File Interpreter ABI Platform Actions
xrocket-0.2.1-py2.py3-none-any.whl Python 3, Python 2 none any Details for xrocket-0.2.1-py2.py3-none-any.whl

Total release size: 19.8 kB

Release files / xrocket-0.2.1.tar.gz

Download URL xrocket-0.2.1.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bf924918e34de91f663bf2a5b6bede2bbe36f4c1fc1fc49c41d1e006619ce7b8
BLAKE2b-256 checksum
How to use checksums
05ba5e2cb6e65d82d2eb637936ada4e17ca7760e767daaa906ee2a1046a30454
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / xrocket-0.2.1-py2.py3-none-any.whl

Download URL xrocket-0.2.1-py2.py3-none-any.whl
Size 11.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
b97bd5adcb5c1bd34e66251370dcce27afd2d060ce65615a8f53e714fbc890d5
BLAKE2b-256 checksum
How to use checksums
e4d89489b99d519ebf9f81e6f64a08f91356b371f9ba95046764922f48f568fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Security for xrocket 0.2.1

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