Skip to main content

Create Wallet

Create a new wallet in the Fermata ledger.

Endpoint

POST /api/v3/fermata/wallet/create

Description

Creates a new client wallet under the caller's trading account. Client wallets hold multi-currency balances and participate in double-entry settlement for RFQ trades.

Authentication

Requires Bearer token authentication.

Authorization: Bearer {access_token}

Request Body

FieldTypeRequiredDescription
nicknamestringNoNickname for the new wallet

Response

Returns the created wallet object.

FieldTypeDescription
walletIdstringWallet ID (same as the backing trading account ID)
walletTypestringWallet type (CLIENT)
statusstringWallet status (ACTIVE)
allowNegativebooleanWhether negative balances are allowed
metadataobjectAdditional attributes
createdAtintegerCreation timestamp (milliseconds)
updatedAtintegerLast update timestamp (milliseconds)

Usage

import requests

headers = {"Authorization": f"Bearer {access_token}"}

response = requests.post(
"https://cadenza-api.algo724.com/api/v3/fermata/wallet/create",
headers=headers,
json={"nickname": "Trading Wallet"}
)

wallet = response.json()["data"]
print(f"Wallet created: {wallet['walletId']}")
curl -X POST https://cadenza-api.algo724.com/api/v3/fermata/wallet/create \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
-H "Content-Type: application/json" \
-d '{"nickname": "Trading Wallet"}'

Example Response

{
"data": {
"walletId": "880e8400-e29b-41d4-a716-446655440000",
"walletType": "CLIENT",
"status": "ACTIVE",
"allowNegative": false,
"metadata": {
"nickname": "Trading Wallet"
},
"createdAt": 1711929600000,
"createdAtDateTime": "2025-04-01T00:00:00.000Z",
"updatedAt": 1711929600000,
"updatedAtDateTime": "2025-04-01T00:00:00.000Z"
},
"success": true,
"errno": 0,
"error": null
}

Error Responses

HTTP CodeErrorDescription
400Invalid requestInvalid parameters
401UnauthorizedInvalid or expired access token
403ForbiddenInsufficient permissions

Example Error

{
"data": null,
"success": false,
"errno": -140001,
"error": "Failed to create wallet"
}

Notes

  • Each user gets a default client wallet on connection to a dealer
  • Additional wallets can be created for profile segregation or accounting
  • Client wallets do not allow negative balances
  • The wallet consists of two Formance sub-accounts: {walletId}:available and {walletId}:locked