Skip to main content

Wallet Operations

Manage wallets and check balances programmatically.

Get Wallet Balance

Retrieve the current balance of a wallet.

Endpoint

GET /v1/wallets/:wallet_id/balance

Response

{
"wallet_id": "wallet_1234567890",
"balances": [
{
"currency": "BTC",
"amount": "0.12345678",
"usd_value": 5234.56
},
{
"currency": "ETH",
"amount": "2.5",
"usd_value": 4500.00
}
],
"total_usd_value": 9734.56
}

Create Wallet

Create a new wallet for a customer.

Endpoint

POST /v1/wallets

Request

{
"customer_id": "cust_1234567890",
"currencies": ["BTC", "ETH", "USDC"]
}

Response

{
"wallet_id": "wallet_1234567890",
"addresses": {
"BTC": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
"ETH": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"USDC": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
},
"created_at": "2024-01-01T10:00:00Z"
}

Get Wallet Transactions

List all transactions for a specific wallet.

Endpoint

GET /v1/wallets/:wallet_id/transactions

Query Parameters

  • limit - Number of results
  • offset - Pagination offset
  • currency - Filter by cryptocurrency
  • type - Filter by type (payment, withdrawal, refund)

Response

{
"data": [
{
"id": "txn_1234567890",
"type": "payment",
"currency": "BTC",
"amount": "0.001",
"usd_value": 42.50,
"status": "completed",
"created_at": "2024-01-01T11:00:00Z"
}
],
"total": 25,
"has_more": false
}

Send from Wallet

Send cryptocurrency from a wallet.

Endpoint

POST /v1/wallets/:wallet_id/send

Request

{
"currency": "BTC",
"amount": "0.001",
"destination": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
"note": "Payment for services"
}

Response

{
"transaction_id": "txn_1234567890",
"status": "pending",
"transaction_hash": "0x...",
"estimated_confirmation": "2024-01-01T11:10:00Z"
}

Error Handling

All API errors follow a consistent format:

{
"error": {
"code": "insufficient_funds",
"message": "Wallet balance too low for this transaction",
"details": {
"required": "0.001 BTC",
"available": "0.0005 BTC"
}
}
}

Common Error Codes

  • invalid_api_key - API key is invalid or expired
  • insufficient_funds - Not enough balance
  • invalid_address - Destination address is invalid
  • rate_limit_exceeded - Too many requests
  • wallet_not_found - Wallet doesn't exist

View Full API Reference →