Skip to main content

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

FieldTypeRequiredDescription
walletIdstringYesWallet 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 CodeErrorDescription
400Invalid requestWallet is already frozen or closed
401UnauthorizedInvalid or expired access token
403ForbiddenRequires admin role
404Not foundWallet 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.unfreeze to restore transaction capability