Skip to main content

Create Wallet

POST
/wallets/

Creates a new wallet (sub-account) in the system. Each wallet has a unique identifier and can hold balances in multiple cryptocurrencies.

Request Parameters

ParameterTypeRequiredDescription
namestringYesCustom name for the wallet
external_idstringYesYour unique identifier for this wallet (must be unique across your tenant)

Authentication

This endpoint requires authentication using one of the following methods:

Authentication TypeHeaderDescription
OAuth 2.0AuthorizationBearer your_access_token
API KeyX-API-Keyyour_api_key

Example Request

curl -X POST "{{BASE_URL}}/wallets/" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Player 12345",
"external_id": "player-12345"
}'

Response

A successful response returns the details of the newly created wallet.

FieldTypeDescription
idstringUnique wallet identifier (UUID)
namestringCustom name for the wallet
external_idstringYour unique identifier for this wallet
wallet_idstringSystem-assigned wallet identifier (read-only)
createdstringISO 8601 timestamp of wallet creation
updatedstringISO 8601 timestamp of last wallet update
balancesarrayArray of balance objects (empty for newly created wallets)

Example Response

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Player 12345",
"external_id": "player-12345",
"wallet_id": "w_abc123def456",
"created": "2025-04-30T12:34:56.789Z",
"updated": "2025-04-30T12:34:56.789Z",
"balances": []
}

Error Codes

Status CodeError CodeDescription
400invalid_requestMissing or invalid parameters
400duplicate_external_idA wallet with this external_id already exists
401unauthorizedAuthentication failed
403forbiddenUser doesn't have required permissions
500server_errorInternal server error

Error Response Format

{
"error": {
"code": "duplicate_external_id",
"message": "A wallet with this external_id already exists",
"details": {}
}
}

Notes

  • The wallet id is automatically generated by the system (UUID).
  • The external_id must be unique across your tenant and is used to identify wallets in your system.
  • Each wallet can hold balances in multiple cryptocurrencies.
  • You can create multiple wallets for different purposes (e.g., one per player).
  • Required scopes: read, write.