Skip to main content
Version: v0.9

Custody Accounts

POST
/custody/accounts

Creates a new custody account that can be used for managing cryptocurrency assets. The custody account is associated with the current tenant and can be used for deposits, withdrawals, and transfers.

Request Parameters

ParameterTypeDescription
name requiredstringA descriptive name for the custody account
provider optionalstringThe custody provider to use.
account_type optionalstringType of account (e.g., "standard", "hot", "cold"). Default is "standard"
metadata optionalobjectAdditional metadata for the account in key-value format

Example Request

POST /custody/accounts
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

{
"name": "Main Trading Account",
"account_type": "standard",
"metadata": {
"description": "Primary account for processing customer payments"
}
}

Response Parameters

ParameterTypeDescription
account_idstringUnique identifier for the custody account
namestringThe name of the custody account
providerstringThe custody provider being used
account_typestringThe type of account
statusstringCurrent status of the account (e.g., "active")
created_atstringISO 8601 timestamp of when the account was created
metadataobjectAdditional metadata for the account

Example Response

{
"account_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Main Trading Account",
"account_type": "standard",
"status": "active",
"created_at": "2025-04-16T13:30:25.123Z",
"metadata": {
"description": "Primary account for processing customer payments"
}
}

Error Codes

Status CodeError CodeDescription
400invalid_requestThe request was malformed or contained invalid parameters
401authentication_failedAuthentication failed. Check your API key or JWT token
403insufficient_permissionsYou do not have permission to create custody accounts
429rate_limit_exceededYou have exceeded the rate limit for this endpoint
500custody_provider_errorAn error occurred with the custody provider

Notes

  • A tenant can have multiple custody accounts for different purposes
  • Each custody account can hold balances across multiple blockchains
  • The account will be immediately available for generating deposit addresses
GET
/custody/accounts

Returns a list of all custody accounts belonging to the current tenant.

Query Parameters

ParameterTypeDescription
skip optionalintegerNumber of records to skip for pagination. Default: 0
limit optionalintegerMaximum number of records to return. Default: 10, Maximum: 100
status optionalstringFilter by account status (e.g., "active", "inactive")

Example Request

GET /custody/accounts?limit=5&skip=0&status=active
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Example Response

[
{
"account_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Main Trading Account",
"account_type": "standard",
"status": "active",
"created_at": "2025-04-16T13:30:25.123Z",
"metadata": {
"description": "Primary account for processing customer payments"
}
},
{
"account_id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Secondary Account",
"account_type": "hot",
"status": "active",
"created_at": "2025-04-16T14:45:30.456Z",
"metadata": {
"description": "Secondary account for automated withdrawals"
}
}
]

Error Codes

Status CodeError CodeDescription
401authentication_failedAuthentication failed. Check your API key or JWT token
403insufficient_permissionsYou do not have permission to list custody accounts
429rate_limit_exceededYou have exceeded the rate limit for this endpoint
GET
/custody/accounts/:accountId

Returns detailed information about a specific custody account.

Path Parameters

ParameterTypeDescription
accountId requiredstringThe unique identifier of the custody account

Example Request

GET /custody/accounts/550e8400-e29b-41d4-a716-446655440000
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Example Response

{
"account_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Main Trading Account",
"account_type": "standard",
"status": "active",
"created_at": "2025-04-16T13:30:25.123Z",
"updated_at": "2025-04-16T14:45:30.456Z",
"metadata": {
"description": "Primary account for processing customer payments"
},
"balances_summary": {
"total_usd": 15240.50,
"blockchains": [
{
"blockchain": "ETH",
"token": "USDT",
"balance": 10000.00,
"usd_value": 10000.00
},
{
"blockchain": "BSC",
"token": "USDT",
"balance": 5240.50,
"usd_value": 5240.50
}
]
}
}

Error Codes

Status CodeError CodeDescription
401authentication_failedAuthentication failed. Check your API key or JWT token
403insufficient_permissionsYou do not have permission to view this custody account
404account_not_foundCustody account with the specified ID was not found
429rate_limit_exceededYou have exceeded the rate limit for this endpoint