Skip to main content

cryprum client, for Python 3.

Project description

Cryprum client, for Python 3

PyPI PyPI - Python Version

Installation

pip install cryprum

Usage

Create a token at https://cryprum.com/tokens and copy "Access key"

from cryprum import Client

client = Client(token="<ACCESS_KEY>")

# Get balances
balances = client.balances("ethereum", "0xYourAddress")
print(balances)  # {"ETH": 1000000000000000000, "USDT": 500000}

# Create transaction (returns immediately with operation ID)
result = client.transaction(
    "ethereum",
    amount=1.0,
    currency="ETH",
    private_key="0x...",
    to_address="0xRecipient"
)
print(result)  # {"id": "...", "status": "pending"}

# Poll for operation status
status = client.operation_status(result["id"])
print(status)  # {"id": "...", "status": "C", "external_id": "0xtxhash..."}

# Get transaction info
tx = client.transaction_info("tron", "5de813c815a3b9feb393318b7985ff57217ea53bd7944373447406c6b918e51f")
print(tx)
# {
#     "block_number": 69056553,
#     "from_address": "TYDzsYUEpvnYmQk4zGP9sWWcTEd2MiAtW6",
#     "to_address": "TMG9ZrB4kvCyJwdyw9wiUV8mnw5qhEdjjU",
#     "txid": "5de813c815a3b9feb393318b7985ff57217ea53bd7944373447406c6b918e51f",
#     "currency_code": "USDT",
#     "value": 169310000,
#     "value_human": 169.31,
#     "confirmations": 100
# }

Async client

from cryprum import AsyncClient

async with AsyncClient(token="<ACCESS_KEY>") as client:
    balances = await client.balances("ethereum", "0xYourAddress")

API Methods

Method Description
balances(vendor, address) Get wallet balances
transaction(vendor, amount, currency, private_key, to_address) Create withdrawal
transaction_info(vendor, txid) Get transaction details
operation_status(operation_id) Poll operation status
subscribe(vendor, addresses) Subscribe to address notifications

Supported vendors: tron, ethereum, bsc, polygon

Development

Run tests

pytest -v

Build and publish to PyPI

# Install uv if not already
pip install uv

# Build package
uv build

# Publish to PyPI
uv publish --token $PYPI_TOKEN

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cryprum-1.2.1.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cryprum-1.2.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file cryprum-1.2.1.tar.gz.

File metadata

  • Download URL: cryprum-1.2.1.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for cryprum-1.2.1.tar.gz
Algorithm Hash digest
SHA256 8e088dd19fd468436cf3d4c53386954bbcbb820132a8e00ba3c1396b50636fb9
MD5 b9addb05a6386fe7fe772e415ac83850
BLAKE2b-256 d6c97f36dc71447009170d46af53c2c43ca1e3fda25a1cca60bdefdf594e9019

See more details on using hashes here.

File details

Details for the file cryprum-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: cryprum-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for cryprum-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fcf47c0ae6738cfdfd4eba5e7ba7ee1de3ca18386e61dcd3d39b65e33445a203
MD5 5bb81aa5627f813632ea0c448c46c67c
BLAKE2b-256 2343dba0b61dc746dbe51502e01342f40ccefe57d87204aecbb3e6fc54b44e9f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page