Freeze Wallet
Freeze a wallet to block all transactions.
Endpoint
POST /api/v3/fermata/wallet/freeze
Description
Freezes a wallet, blocking all transactions until unfrozen. Used for compliance holds or admin interventions. Admin only.
Authentication
Requires Bearer token authentication with admin role.
Authorization: Bearer {access_token}
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
walletId | string | Yes | Wallet ID to freeze |
Response
Returns the updated wallet object with status: "FROZEN".
Usage
import requests
headers = {"Authorization": f"Bearer {access_token}"}
response = requests.post(
"https://cadenza-api.algo724.com/api/v3/fermata/wallet/freeze",
headers=headers,
json={"walletId": "880e8400-e29b-41d4-a716-446655440000"}
)
wallet = response.json()["data"]
print(f"Wallet {wallet['walletId']} is now {wallet['status']}")
curl -X POST https://cadenza-api.algo724.com/api/v3/fermata/wallet/freeze \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
-H "Content-Type: application/json" \
-d '{"walletId": "880e8400-e29b-41d4-a716-446655440000"}'
Example Response
{
"data": {
"walletId": "880e8400-e29b-41d4-a716-446655440000",
"walletType": "CLIENT",
"status": "FROZEN",
"allowNegative": false,
"metadata": {},
"createdAt": 1711929600000,
"createdAtDateTime": "2025-04-01T00:00:00.000Z",
"updatedAt": 1711930200000,
"updatedAtDateTime": "2025-04-01T00:10:00.000Z"
},
"success": true,
"errno": 0,
"error": null
}
Error Responses
| HTTP Code | Error | Description |
|---|---|---|
| 400 | Invalid request | Wallet is already frozen or closed |
| 401 | Unauthorized | Invalid or expired access token |
| 403 | Forbidden | Requires admin role |
| 404 | Not found | Wallet not found |
Example Error
{
"data": null,
"success": false,
"errno": -140005,
"error": "Wallet is already frozen"
}
Notes
- Only ACTIVE wallets can be frozen
- All transactions are blocked while frozen (trades, transfers, withdrawals)
- Use
fermata.wallet.unfreezeto restore transaction capability