Skip to main content

Account Service

Manages user accounts.


Endpoints


Create Account

POST /accounts

Create a new account for a customer.

Request Body

FieldTypeRequiredDescriptionExample
customerIdstringNoCustomer UUID. Must be a valid UUID."eac6de80-8a71-4dc3-abee-240214cea9d5"
customerExternalIdstringNoExternal customer ID for integration with external systems."external-customer-id-123"
walletAccountIdstringNoWallet account UUID. Must be a valid UUID."wallet-uuid-123"
accountExternalIdstringNoExternal account ID for integration with external systems."external-account-id-456"
typeenumYesType of account. Must be one of: STABLECOINS, ... (see AccountType enum)."STABLECOINS"
statusenumYesAccount status. Must be one of: active, inactive, deleted, suspended."active"
namestringYesAccount name. Must be 1-100 characters."Main Account"
customerNamestringNoCustomer name."John Doe"

Example Request:

{
"customerId": "eac6de80-8a71-4dc3-abee-240214cea9d5",
"customerExternalId": "external-customer-id-123",
"walletAccountId": "wallet-uuid-123",
"accountExternalId": "external-account-id-456",
"type": "STABLECOINS",
"status": "active",
"name": "Main Account",
"customerName": "John Doe"
}

Success Response

Returns the created account object.

{
"id": "b2c3d4e5-f678-90ab-cd12-34567890abcd",
"customerId": "eac6de80-8a71-4dc3-abee-240214cea9d5",
"customerExternalId": "external-customer-id-123",
"walletAccountId": "wallet-uuid-123",
"accountExternalId": "external-account-id-456",
"type": "STABLECOINS",
"status": "active",
"name": "Main Account",
"customerName": "John Doe",
"createdAt": "2025-11-18T12:34:56.789Z"
}

Error Responses

  • 400 Bad Request: Validation failed (missing or invalid fields)
  • 409 Conflict: Duplicate external/customer/account ID
  • 404 Not Found: Referenced customer or wallet does not exist

List Accounts

GET /accounts

Retrieve all accounts, with optional filters.

Query Parameters

ParameterTypeDescription
filterobjectFilter object. Supports address, id, externalId fields.

Example:

/accounts?filter[address]=in:0x123,0x456&filter[id]=in:uuid1,uuid2&filter[externalId]=eq:ext-12345

Success Response

Returns an array of account objects.

[
{
"id": "b2c3d4e5-f678-90ab-cd12-34567890abcd",
"customerId": "eac6de80-8a71-4dc3-abee-240214cea9d5",
"customerExternalId": "external-customer-id-123",
"walletAccountId": "wallet-uuid-123",
"accountExternalId": "external-account-id-456",
"type": "STABLECOINS",
"status": "active",
"name": "Main Account",
"customerName": "John Doe",
"createdAt": "2025-11-18T12:34:56.789Z"
}
// ...more accounts
]

Get or Create Omnibus Account

GET /accounts/omnibus

Get or create the omnibus account for the authenticated participant.

Success Response

Returns the omnibus account object (same fields as above).

Error Responses

  • 401 Unauthorized: Participant not found in request

Get or Create Fee Payer Account

GET /accounts/fee-payer

Get or create the fee payer account for the authenticated participant.

Success Response

Returns the fee payer account object (same fields as above).

Error Responses

  • 401 Unauthorized: Participant not found in request

Get Account

GET /accounts/:id

Retrieve details for a specific account.

Path Parameters

ParameterTypeRequiredDescription
iduuidYesAccount unique ID

Success Response

{
"id": "b2c3d4e5-f678-90ab-cd12-34567890abcd",
"customerId": "eac6de80-8a71-4dc3-abee-240214cea9d5",
"customerExternalId": "external-customer-id-123",
"walletAccountId": "wallet-uuid-123",
"accountExternalId": "external-account-id-456",
"type": "STABLECOINS",
"status": "active",
"name": "Main Account",
"customerName": "John Doe",
"createdAt": "2025-11-18T12:34:56.789Z"
}

Error Responses

  • 404 Not Found: Account not found

Update Account

PUT /accounts/:id

Update the status of an existing account.

Path Parameters

ParameterTypeRequiredDescription
iduuidYesAccount unique ID

Request Body

FieldTypeRequiredDescriptionExample
statusenumYesAccount status to update. Must be one of: active, inactive, deleted, suspended."active"

Example Request:

{
"status": "active"
}

Success Response

Returns the updated account object.

{
"id": "b2c3d4e5-f678-90ab-cd12-34567890abcd",
"customerId": "eac6de80-8a71-4dc3-abee-240214cea9d5",
"customerExternalId": "external-customer-id-123",
"walletAccountId": "wallet-uuid-123",
"accountExternalId": "external-account-id-456",
"type": "STABLECOINS",
"status": "active",
"name": "Main Account",
"customerName": "John Doe",
"createdAt": "2025-11-18T12:34:56.789Z"
}

Error Responses

  • 400 Bad Request: Validation failed
  • 404 Not Found: Account not found

Get All Addresses for Account

GET /accounts/:id/addresses

Retrieve all blockchain addresses associated with an account.

Path Parameters

ParameterTypeRequiredDescription
iduuidYesAccount unique ID

Success Response

Returns an array of addresses.

[
"0x1234567890abcdef...",
"0xabcdef1234567890..."
]

Error Responses

  • 404 Not Found: Account not found
  • 400 Bad Request: Invalid account ID format

Get Account Balance

GET /accounts/:id/balance

Get the account's balance, with asset breakdown in USD.

Path Parameters

ParameterTypeRequiredDescription
iduuidYesAccount unique ID

Success Response

{
"accountId": "eac6de80-8a71-4dc3-abee-240214cea9d5",
"currency": "USD",
"totalBalance": 1000,
"assets": [
{
"asset": { "symbol": "USDC", "name": "USD Coin", "decimals": 6 },
"quantity": 1000,
"usdValue": 1000,
"usdQuoteTimestamp": "2025-10-31T12:00:00Z",
"usdQuoteRate": 1
},
{
"asset": { "symbol": "ETH", "name": "Ethereum", "decimals": 18 },
"quantity": 0.25,
"usdValue": 500,
"usdQuoteTimestamp": "2025-10-31T12:00:00Z",
"usdQuoteRate": 2000
}
],
"timestamp": "2025-10-31T12:00:00Z"
}

Error Responses

  • 404 Not Found: Account not found
  • 400 Bad Request: Invalid account ID format
  • 500 Internal Server Error: Failed to retrieve account balance

Delete Account

DELETE /accounts/:id

Note: Account deletion is not permitted. This endpoint will always return a 405 Method Not Allowed error.

Error Response

  • 405 Method Not Allowed: Account deletion is not permitted

Error Format

All error responses follow this format:

{
"error": {
"code": "ERROR_CODE",
"message": "Description of the error",
"details": [
{
"field": "fieldName",
"message": "Field-specific error message"
}
]
}
}

Field Descriptions

FieldTypeDescription
iduuidUnique identifier for the account
customerIduuidCustomer UUID
customerExternalIdstringExternal customer ID
walletAccountIduuidWallet account UUID
accountExternalIdstringExternal account ID
typeenumAccount type (see AccountType enum)
statusenumAccount status (see AccountStatus enum)
namestringAccount name
customerNamestringCustomer name
createdAtstringISO8601 timestamp of account creation

For enum values, see AccountType and AccountStatus definitions.