OpenXSwitch - Wallet as a service (usecase and integration)
Major API functions in OpenXSwitch
1. Wallet Creation
- Support the creation of Main Wallets for organizational-level management (
via the OpenXSwitch dashboard
) and - Sub-wallets for end-users or internal departmental structures (
via API
).
Relevant APIs:
- API for creating a sub-wallet : Used to manage end-users' wallets.
2. Deposit Flow
- Facilitate blockchain deposit management for clients by providing dedicated deposit addresses for both Wallets and sub-wallets.
- Support auto-collection rule to Wallets for streamlined fund management.
- Allow querying deposit history for reconciliation and analytics.
Relevant APIs:
- API for generating address of a sub-wallet : Issue deposit addresses for sub-wallets to support end-user deposits.
- API for getting deposit history of a wallet : Aggregate deposits at the Main Wallet level.
- API for getting deposit history of a sub-wallet : Track deposits for individual sub-wallets.
3. Withdrawal Flow
- Implement secure withdrawals from Main Wallets and sub-wallets to external wallet addresses.
- Streamline the withdrawal approval process with OpenXSwitch's withdrawal policies.
Relevant APIs:
- API for requesting withdrawal from main wallet : Facilitate withdrawals from Main Wallets, including network fee calculations.
- API for requesting withdrawal from sub-wallet : Facilitate withdrawals from Sub Wallets, including network fee calculations.
4. Check Wallet Balance
- Provide clients with real-time wallet and sub-wallet balances for financial oversight.
- Enable visibility into both organizational (Main Wallet) and end-user (sub-wallet) asset holdings.
Relevant APIs:
- API for getting asset list of a wallet : Access balances of Main Wallets for overall fund management.
- API for getting asset list of a sub-wallet : View balances for specific sub-wallets.
5. Transfer Flow
- Offer clients
fee less
comprehensive transfer capabilities for Main Wallets and sub-wallets to ensure transparency and support business needs.
Relevant APIs:
- API for transferring assets between sub-wallets : Transfers from one sub-wallet to another sub-wallet
- API for transferring assets from sub-wallet and Main Wallet : Transfers from sub-wallet to main wallet
6. Trade Flow
- Use the Get Trading Pairs API to fetch available trading pairs, their price precision, and trading limits.
- Call the Get Trade Fee API to dynamically calculate the fees for the trade.
- Initiate a trade by specifying order details, including:
- Coin Pair: Base and quote assets (e.g., BTC/USDT).
- Order Type: Market or Limit.
- Quantity/Price: Amount of the base asset to trade.
Relevant APIs:
- API for getting valid trading pairs
- API for getting trade fee for trading pairs
- API for executing trade
OpenXSwitch-Specific Features to Integrate
- Sub-Wallet API Enhancements:
- Enable direct API access for sub-Wallet creation and management
- Webhook Notifications:
- Implement webhook support to notify clients about wallet events (deposits, withdrawals, transfers).
- Auto-Collection Rule:
- Configure auto-collection rule for businesses that manage large-scale main wallet operations.