Python SDK
Installation
status and key_status are ACTIVE before creating accounts or transfers. The gateway derives account network automatically from the selected chain.
Quick Start
Configuration
Methods
The SDK provides direct methods on the client:| Category | Methods |
|---|---|
| Wallet | create_wallet, get_wallet, list_wallets |
| Account | create_account, get_account, list_accounts |
| Asset | create_asset, get_asset, list_assets |
| Transaction | get_transaction, list_transactions |
| Transfer | create_transfer |
Error Handling
The SDK raisesAPIError for API failures with structured error information:
Helper Functions
| Function | Description |
|---|---|
is_not_found(err) | Detects 404 responses |
is_rate_limited(err) | Identifies 429 rate-limit responses |
is_auth_error(err) | Catches 401/403 permission issues |
Pagination
List methods return aPaginatedResponse with items, total, and has_more:
Authentication
The SDK handles JWT authentication automatically:- On the first API call, the client exchanges your
api_keyandapi_secretfor a JWT token - The token is cached and reused for subsequent requests
- When the token approaches expiration (< 5 minutes remaining), it is automatically refreshed
- Token management is thread-safe for concurrent usage