Prerequisites
Before you begin, ensure that you have:- Obtained an API key from the OpenXSwitch Console.
The Plan
We’ll go through:- Creating a User via the API: Provision a user record scoped to your workspace.
- Linking Wallets to Users: Associate chain-specific wallets directly with your
userId. - Fetching User Wallets: Retrieve all blockchain wallet instances associated with the user.
- Fetching User Balances: View real-time asset holdings across the user’s wallets.
- Checking User Stats: Retrieve operational activity metrics for the user.
Step 1: Create a User via the API
To provision a user identity in your application account, execute aPOST request to the /v2/users endpoint.
Request Payload Fields
email(string, optional): The user’s primary email address.displayName(string, optional): Human-readable display label for the user.refId(string, optional): External client reference ID to map back to your application database.
Sample Response
Step 2. 💡 Linking Wallets to Users
Creating a user automatically establishes an identity context within your application account. Once created, you can deploy or link chain-specific smart wallets directly to thisuserId. For complete details on wallet provisioning, see the Create and Manage Wallets Guide.
Step 3: Fetch User Wallets
Once a user is created, retrieve all deployed wallet addresses across supported blockchain networks using theGET endpoint /v2/users/{userId}/wallets
Sample Response
Step 4: Fetch User Balances
To inspect the real-time token and native balances across a user’s wallets, query the balances endpoint.Sample Response
Step 5: Fetch User Stats
You can retrieve aggregated activity statistics (such as total deposits, withdrawals, and 30-day transaction volume) for reporting or risk monitoring purposes.Sample Response
Next Steps
- Create and Manage Wallets: Deploy new chain-specific smart wallets or fetch deposit addresses bound to your user entity.
.png?fit=max&auto=format&n=ML35RDblT1Ol-zJb&q=85&s=062e79ad9c4540929eec204aff020178)
.png?fit=max&auto=format&n=ML35RDblT1Ol-zJb&q=85&s=f6328956931c9664a2a070c2edb6e9b3)