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
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Custom name for the wallet |
external_id | string | Yes | Your unique identifier for this wallet (must be unique across your tenant) |
Authentication
This endpoint requires authentication using one of the following methods:
| Authentication Type | Header | Description |
|---|---|---|
| OAuth 2.0 | Authorization | Bearer your_access_token |
| API Key | X-API-Key | your_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.
| Field | Type | Description |
|---|---|---|
id | string | Unique wallet identifier (UUID) |
name | string | Custom name for the wallet |
external_id | string | Your unique identifier for this wallet |
wallet_id | string | System-assigned wallet identifier (read-only) |
created | string | ISO 8601 timestamp of wallet creation |
updated | string | ISO 8601 timestamp of last wallet update |
balances | array | Array 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 Code | Error Code | Description |
|---|---|---|
| 400 | invalid_request | Missing or invalid parameters |
| 400 | duplicate_external_id | A wallet with this external_id already exists |
| 401 | unauthorized | Authentication failed |
| 403 | forbidden | User doesn't have required permissions |
| 500 | server_error | Internal server error |
Error Response Format
{
"error": {
"code": "duplicate_external_id",
"message": "A wallet with this external_id already exists",
"details": {}
}
}
Notes
- The wallet
idis automatically generated by the system (UUID). - The
external_idmust 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.