cryprum client, for Python 3.
Project description
Cryprum client, for Python 3
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
Release history Release notifications | RSS feed
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.2.tar.gz
(9.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cryprum-1.2.2.tar.gz.
File metadata
- Download URL: cryprum-1.2.2.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdb8aabac9212eead37271bfd00caf8a534c8beefe0243a09bed6c3fc197ab36
|
|
| MD5 |
ef5ceb0b69d9ea27ce0351c33577d331
|
|
| BLAKE2b-256 |
a316b246c0c28eed0ad3389b2c8062b0f82a82d1e1f982d1fcf1ac4cb75de563
|
File details
Details for the file cryprum-1.2.2-py3-none-any.whl.
File metadata
- Download URL: cryprum-1.2.2-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
badfffef02adabfd61444282da76a043e277b977e0fe5033cf43b3f8b2bce579
|
|
| MD5 |
1f7a6e8eb5b93d1144adf2a9a7a5548d
|
|
| BLAKE2b-256 |
80fa84691cb9366550a1645aaf4bf91e45f834277f40cc54ddc7f81b10752285
|