# Wallet-as-a-Service Overview Source: https://docs.openxswitch.com/api-reference-v1/overview Wallet-as-a-Service (WaaS) is an infrastructure layer that allows you to create, manage, and operate blockchain wallets programmatically through APIs without handling private key management or blockchain infrastructure directly. It provides a unified wallet system for managing balances, transactions, and operations across multiple blockchain networks. ### What You Can Do With Wallet-as-a-Service APIs, you can: * Create and manage **wallets** and **sub-wallets** * Generate deposit addresses across supported chains * Process deposits, withdrawals, and internal transfers * Execute internal transfers between wallets and sub-wallets * Perform **instant swaps** across `240+` supported assets and` 500+` **trading pairs** * Track balances and transaction states in real time * Automate fund collection and treasury operations * Integrate webhooks for real-time event updates ## Key Concepts ### Wallets & Sub-Wallets Each wallet represents a managed account that can hold multiple assets across supported blockchains. Sub-wallets enable structured fund segregation under a single organization. ### Recharge Currency A digital asset used to fund wallets or sub-wallets. Users can deposit cryptocurrencies like Bitcoin, Ethereum, or stablecoins to maintain liquidity and enable transactions within the platform. 👍 You can only deposit and withdraw using a recharge currency or coin. ### WalletAsset A WalletAsset is a unified representation of a cryptocurrency or token in a multi-chain wallet system. It aggregates balances of the same asset across different blockchains, allowing users to deposit on one chain and withdraw on another seamlessly. #### Why WalletAsset Matters? * **Cross-Chain Balance Aggregation** – Instead of treating assets separately by chain, a WalletAsset combines them into a single view. * **Flexible Withdrawals** – Users can receive an asset on one chain and send it out on another, making transactions more efficient. * **Simplified User Experience** – Users don’t have to track different versions of the same token across multiple chains. ### Internal Transfer Internal transfers allow movement of funds between wallets and sub-wallets within the OpenXSwitch ecosystem without requiring onchain settlement. These transfers are processed off-chain for speed and efficiency. ### Instant Swap Instant Swap enables real-time conversion of supported assets within Wallet-as-a-Service without requiring external exchanges or manual onchain swaps. Swaps are executed off-chain through liquidity infrastructure and reflected instantly in wallet balances via event updates. ### Multi-Chain Support Wallet-as-a-Service supports multiple blockchain networks with unified balance abstraction across supported assets. ### Event-Driven Architecture All wallet operations emit webhook events, allowing you to track deposits, withdrawals, transfers, and balance updates in real time. ### Environment Support Wallet-as-a-Service supports two environments: * **Sandbox** - simulation environment for development and testing (API only) * **Live** - production environment with real assets and real transactions ### Balance & State Handling Wallet balances should always be treated as **event-driven state updates** using webhook payloads as the source of truth. ### Security & Access All API requests are authenticated using API keys, with optional additional security layers for sensitive operations such as transfers and withdrawals. It provides a unified wallet system for managing balances, transactions, and operations across multiple blockchain networks. # Create Account Source: https://docs.openxswitch.com/api-reference/accounts/create-account https://docs.openxswitch.com/openapi/wallet-infra/index.json post /v2/accounts Create a new account. # Get Account Source: https://docs.openxswitch.com/api-reference/accounts/get-account https://docs.openxswitch.com/openapi/wallet-infra/index.json get /v2/accounts Retrieve details of an existing account. # Get Account Stats Source: https://docs.openxswitch.com/api-reference/accounts/get-account-stats https://docs.openxswitch.com/openapi/wallet-infra/index.json get /v2/accounts/stats Retrieve stats of a specific account. # List Accounts Source: https://docs.openxswitch.com/api-reference/accounts/list-accounts https://docs.openxswitch.com/openapi/wallet-infra/index.json get /v2/accounts/list Retrieve a paginated list of accounts with optional filters. # Update Account Source: https://docs.openxswitch.com/api-reference/accounts/update-account https://docs.openxswitch.com/openapi/wallet-infra/index.json patch /v2/accounts Update settings of an existing account. # Get Supported Chains Source: https://docs.openxswitch.com/api-reference/chains-&-tokens/get-supported-chains https://docs.openxswitch.com/openapi/wallet-infra/index.json get /v2/chains Get all supported chains # Get Supported Tokens Source: https://docs.openxswitch.com/api-reference/chains-&-tokens/get-supported-tokens https://docs.openxswitch.com/openapi/wallet-infra/index.json get /v2/chains/tokens Get all supported tokens # Get Supported Tokens With Chains Source: https://docs.openxswitch.com/api-reference/chains-&-tokens/get-supported-tokens-with-chains https://docs.openxswitch.com/openapi/wallet-infra/index.json get /v2/chains/tokens-with-chains Get all supported tokens with their supported chains # Add a blockchain address to the watchlist Source: https://docs.openxswitch.com/api-reference/compliance/add-a-blockchain-address-to-the-watchlist https://docs.openxswitch.com/openapi/compliance-specs.json post /v1/compliance/watch-list Add a blockchain address to the watchlist for compliance risks. # Get watchlist item Source: https://docs.openxswitch.com/api-reference/compliance/get-watchlist-item https://docs.openxswitch.com/openapi/compliance-specs.json get /v1/compliance/watch-list Get watchlist item. # Get watchlist list Source: https://docs.openxswitch.com/api-reference/compliance/get-watchlist-list https://docs.openxswitch.com/openapi/compliance-specs.json get /v1/compliance/watch-list/list Get watchlist list. # Remove an address from the watchlist Source: https://docs.openxswitch.com/api-reference/compliance/remove-an-address-from-the-watchlist https://docs.openxswitch.com/openapi/compliance-specs.json delete /v1/compliance/watch-list Remove an address from the watchlist for compliance risks. # Get List of Prime Wallet Deposits Source: https://docs.openxswitch.com/api-reference/deposit-endpoints/get-list-of-prime-wallet-deposits https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/deposit/list Retrieve a paginated list of prime wallet deposits. # Get Prime Wallet Deposit Source: https://docs.openxswitch.com/api-reference/deposit-endpoints/get-prime-wallet-deposit https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/deposit Retrieve details of prime wallet deposit using its depositId. # Estimate Withdrawal Fee Source: https://docs.openxswitch.com/api-reference/fee-endpoints/estimate-withdrawal-fee https://docs.openxswitch.com/openapi/waas/developer-api.json post /v1/fee/withdraw Estimate the withdrawal fee for a specific transaction. # Create a new instant swap order Source: https://docs.openxswitch.com/api-reference/instant-swap-endpoints/create-a-new-instant-swap-order https://docs.openxswitch.com/openapi/waas/developer-instant-swap.json post /v1/instant-swap Executes an instant swap based on a previously fetched quote or directly using coin and amount inputs. Returns swap confirmation with details. # Get a specific instant swap order Source: https://docs.openxswitch.com/api-reference/instant-swap-endpoints/get-a-specific-instant-swap-order https://docs.openxswitch.com/openapi/waas/developer-instant-swap.json get /v1/instant-swap/order Returns the full details of a particular swap transaction using the swapId and walletId. # Get instant swap order history Source: https://docs.openxswitch.com/api-reference/instant-swap-endpoints/get-instant-swap-order-history https://docs.openxswitch.com/openapi/waas/developer-instant-swap.json get /v1/instant-swap/order/list Fetches the list of instant swaps performed by a wallet. You can optionally filter by fromCoin, toCoin, or swapId. # Get instant swap quote price Source: https://docs.openxswitch.com/api-reference/instant-swap-endpoints/get-instant-swap-quote-price https://docs.openxswitch.com/openapi/waas/developer-instant-swap.json get /v1/instant-swap/quote Returns a real-time quote for converting a given amount of a source coin into a target coin. Includes estimated fee, swap price, and output amount. # Get supported instant swap currencies Source: https://docs.openxswitch.com/api-reference/instant-swap-endpoints/get-supported-instant-swap-currencies https://docs.openxswitch.com/openapi/waas/developer-instant-swap.json get /v1/instant-swap/currencies Returns a list of all available coins and their minimum, maximum, and current available liquidity for instant swaps. # Sandbox Create a new instant swap order Source: https://docs.openxswitch.com/api-reference/instant-swap-endpoints/sandbox-create-a-new-instant-swap-order https://docs.openxswitch.com/openapi/waas/sandbox-api.json post /v1/sandbox/instant-swap Executes an instant swap based on a previously fetched quote or directly using coin and amount inputs. Returns swap confirmation with details. # Sandbox Get instant swap quote price Source: https://docs.openxswitch.com/api-reference/instant-swap-endpoints/sandbox-get-instant-swap-quote-price https://docs.openxswitch.com/openapi/waas/sandbox-api.json get /v1/sandbox/instant-swap/quote Returns a real-time quote for converting a given amount of a source coin into a target coin. Includes estimated fee, swap price, and output amount. # Get Fiat Prices Source: https://docs.openxswitch.com/api-reference/market-endpoints/get-fiat-prices https://docs.openxswitch.com/openapi/waas/developer-markets.json get /v1/markets/prices Retrieve fiat prices for a specific country and coin with pagination. # Get Ticker info Source: https://docs.openxswitch.com/api-reference/market-endpoints/get-ticker-info https://docs.openxswitch.com/openapi/waas/developer-markets.json get /v1/markets/ticker-info Fetch ticker information # Get Tickers Source: https://docs.openxswitch.com/api-reference/market-endpoints/get-tickers https://docs.openxswitch.com/openapi/waas/developer-markets.json get /v1/markets/tickers Retrieve market tickers with optional filters for pair symbols. # Get Fiat Prices Source: https://docs.openxswitch.com/api-reference/markets/get-fiat-prices https://docs.openxswitch.com/openapi/misc-specs.json get /v1/markets/prices Retrieve fiat prices for a specific country and coin with pagination. # Activate trading for a wallet/Sub-wallet Source: https://docs.openxswitch.com/api-reference/mix-endpoints/activate-trading-for-a-walletsub-wallet https://docs.openxswitch.com/openapi/waas/developer-api.json post /v1/mix/activate-trade Enables trading functionality on a specific wallet or sub-wallet. # Check addresses validity Source: https://docs.openxswitch.com/api-reference/mix-endpoints/check-addresses-validity https://docs.openxswitch.com/openapi/waas/developer-api.json post /v1/mix/validate-address Check the validity of a blockchain address. # Get List of Rechargeable Currencies Source: https://docs.openxswitch.com/api-reference/mix-endpoints/get-list-of-rechargeable-currencies https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/mix/currency/recharge Retrieve a list of currencies that support both `deposit` and `withdrawal` operations. You can only deposit funds into and withdraw funds from the `currencies` listed in this response. Other currencies are supported exclusively for `trading` (spot and futures) but do not support `deposit or withdrawal functionalities`. # Refresh wallet or sub-wallet assets Source: https://docs.openxswitch.com/api-reference/mix-endpoints/refresh-wallet-or-sub-wallet-assets https://docs.openxswitch.com/openapi/waas/developer-api.json post /v1/mix/refresh-assets Reconcile wallet or sub-wallet balances with system records to ensure accurate asset data. # Check addresses validity Source: https://docs.openxswitch.com/api-reference/mix/check-addresses-validity https://docs.openxswitch.com/openapi/misc-specs.json post /v1/mix/validate-address Check the validity of a blockchain address. # API Overview Source: https://docs.openxswitch.com/api-reference/overview Create wallets for users, agents, or company operations The APIs are **chain-agnostic** and take care of all wallet operations: creation, transaction execution, gas sponsorship, compliance tools, advanced policies and controls, and more; so you can get started in minutes and be ready to scale. # Where to Start > [card] [Wallet Infrastructure](https://docs.openxswitch.com/wallet-infrastructure/architecture) > [card] [Browse Guides](https://docs.openxswitch.com/guides) ## **Learn More** * [Authentication](/guides/authentication) * [**Architecture**](/wallet-infrastructure/architecture) * [Unified Evm Address](https://docs.openxswitch.com/wallet-infrastructure/unified-evm-address) * [Watchlist](https://docs.openxswitch.com/compliance/watchlists) * [API Permission](https://docs.openxswitch.com/platform/api-permissions) # Generate Wallet Address Source: https://docs.openxswitch.com/api-reference/prime-wallet-endpoints/generate-wallet-address https://docs.openxswitch.com/openapi/waas/developer-api.json post /v1/wallet/address

Generate a new wallet address or retrieve an existing one for prime wallet.

Addresses can only be generated for recharge coins. # Get List of Wallet Addresses Source: https://docs.openxswitch.com/api-reference/prime-wallet-endpoints/get-list-of-wallet-addresses https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/wallet/address/list Retrieve a paginated list of wallet addresses. # Get Prime Wallet Assets Source: https://docs.openxswitch.com/api-reference/prime-wallet-endpoints/get-prime-wallet-assets https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/wallet/assets Retrieve the assets(balance) of Prime Wallet with optional filters for coin. # Get Prime Wallet Details Source: https://docs.openxswitch.com/api-reference/prime-wallet-endpoints/get-prime-wallet-details https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/wallet Retrieve details of prime wallet. # Create Sub-Wallet Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/create-sub-wallet https://docs.openxswitch.com/openapi/waas/developer-api.json post /v1/sub-wallet/create Create a new sub-wallet with optional user and label information. # Freeze Sub-Wallet Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/freeze-sub-wallet https://docs.openxswitch.com/openapi/waas/developer-api.json post /v1/sub-wallet/freeze Freeze a sub-wallet to prevent transactions. # Generate Address for Sub-Wallet Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/generate-address-for-sub-wallet https://docs.openxswitch.com/openapi/waas/developer-api.json post /v1/sub-wallet/address

Generate a new wallet address or retrieve an existing one for the specified sub-wallet.

Addresses can only be generated for recharge coins. # Get List of sub-Wallet Addresses Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/get-list-of-sub-wallet-addresses https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/sub-wallet/address/list Retrieve a paginated list of sub-wallet addresses. # Get List of Sub-Wallet Deposits Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/get-list-of-sub-wallet-deposits https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/sub-wallet/deposit/list Retrieve a paginated list of sub-wallet deposits. # Get List of Sub-Wallet Transfers Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/get-list-of-sub-wallet-transfers https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/sub-wallet/transfer/list Retrieve a paginated list of sub-wallet transfers. # Get List of Sub-Wallet Withdrawals Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/get-list-of-sub-wallet-withdrawals https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/sub-wallet/withdraw/list Retrieve a paginated list of withdrawals made from a sub-wallet. # Get List of Sub Wallets Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/get-list-of-sub-wallets https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/sub-wallet/list Retrieve a paginated list of wallets, optionally filtered by subWalletId, chain, or coin. # Get Sub-Wallet Assets Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/get-sub-wallet-assets https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/sub-wallet/assets Retrieve the assets(balance) of a sub-wallet with optional filters for chain and coin. # Get Sub-Wallet Deposit Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/get-sub-wallet-deposit https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/sub-wallet/deposit Retrieve details of a specific sub-wallet deposit using its subWalletId, depositId. # Get Sub-Wallet Details Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/get-sub-wallet-details https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/sub-wallet Retrieve details of a specific sub-wallet using its subWalletId. # Get Sub-Wallet Transfer Details Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/get-sub-wallet-transfer-details https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/sub-wallet/transfer Retrieve transfer details of a specific sub-wallet using its subWalletId, transferId. # Get Sub-Wallet Withdrawal Details Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/get-sub-wallet-withdrawal-details https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/sub-wallet/withdraw Retrieve withdrawal details of a specific sub-wallet using its subWalletId, withdrawId. # Sandbox Create Sub-Wallet Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/sandbox-create-sub-wallet https://docs.openxswitch.com/openapi/waas/sandbox-api.json post /v1/sandbox/sub-wallet/create Create a new sub-wallet with optional user and label information. # Sandbox Generate Sub-wallet Address Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/sandbox-generate-sub-wallet-address https://docs.openxswitch.com/openapi/waas/sandbox-api.json post /v1/sandbox/sub-wallet/address

Generate a new wallet address or retrieve an existing one for the specified sub-wallet.

Addresses can only be generated for recharge coins. # Sandbox Get List of sub-Wallet Addresses Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/sandbox-get-list-of-sub-wallet-addresses https://docs.openxswitch.com/openapi/waas/sandbox-api.json get /v1/sandbox/sub-wallet/address/list Retrieve a paginated list of Sandbox sub-wallet addresses. # Sandbox Get List of Sub Wallets Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/sandbox-get-list-of-sub-wallets https://docs.openxswitch.com/openapi/waas/sandbox-api.json get /v1/sandbox/sub-wallet/list Retrieve a paginated list of Sub-wallets, optionally filtered by subWalletId, chain, or coin. # Sandbox Get Sub-Wallet Assets Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/sandbox-get-sub-wallet-assets https://docs.openxswitch.com/openapi/waas/sandbox-api.json get /v1/sandbox/sub-wallet/assets Retrieve the Sandbox assets(balance) of a sub-wallet with optional filters for chain and coin. # Sandbox Get Sub-Wallet Deposit Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/sandbox-get-sub-wallet-deposit https://docs.openxswitch.com/openapi/waas/sandbox-api.json get /v1/sandbox/sub-wallet/deposit Retrieve details of a specific sub-wallet deposit using its subWalletId, depositId. # Sandbox Get Sub-wallet Withdrawal Details Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/sandbox-get-sub-wallet-withdrawal-details https://docs.openxswitch.com/openapi/waas/sandbox-api.json get /v1/sandbox/sub-wallet/withdraw Retrieve withdrawal details of Sub-wallet using its subWalletId, withdrawId. # Sandbox Internal Transfer Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/sandbox-internal-transfer https://docs.openxswitch.com/openapi/waas/sandbox-api.json post /v1/sandbox/sub-wallet/transfer Transfer funds from one `sub-wallet to another sub-wallet` or from one `sub-wallet to a prime wallet` within the same system. `This operation is free, and no fees are collected for these internal transfers.` # Sandbox Sub-wallet Withdrawal Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/sandbox-sub-wallet-withdrawal https://docs.openxswitch.com/openapi/waas/sandbox-api.json post /v1/sandbox/sub-wallet/withdraw Withdraw funds from a wallet/sub-wallet to an external address. To estimate the withdrawal fee, use the [Fee Estimate](https://docs.openxswitch.com/api-reference/fee-endpoints/estimate-withdrawal-fee) endpoint.

The network fee is automatically deducted from the specified amount, and the remaining balance is sent to the receiver

# Sandbox Transfer from Sub-Wallets to Prime Wallet Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/sandbox-transfer-from-sub-wallets-to-prime-wallet https://docs.openxswitch.com/openapi/waas/sandbox-api.json post /v1/sandbox/sub-wallet/transfer/prime Transfer funds from one sub-wallet to the workspace prime wallet workspace. `This operation is free, and no fees are collected for these internal transfers.` # Simulate Sub-wallet Deposit event Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/simulate-sub-wallet-deposit-event https://docs.openxswitch.com/openapi/waas/sandbox-api.json post /v1/sandbox/sub-wallet/deposit Simulates a deposit event in the OpenXSwitch Sandbox environment. # Sub-Wallet Withdrawal Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/sub-wallet-withdrawal https://docs.openxswitch.com/openapi/waas/developer-api.json post /v1/sub-wallet/withdraw Withdraw funds from a sub-wallet to an external address. To estimate the withdrawal fee, use the [Fee Estimate](https://docs.openxswitch.com/api-reference/fee-endpoints/estimate-withdrawal-fee) endpoint. # Transfer between Sub-Wallets Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/transfer-between-sub-wallets https://docs.openxswitch.com/openapi/waas/developer-api.json post /v1/sub-wallet/transfer Transfer funds from one sub-wallet to another sub-wallet within the same system. `This operation is free, and no fees are collected for these internal transfers.` # Transfer from Sub-Wallets to Prime Wallet Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/transfer-from-sub-wallets-to-prime-wallet https://docs.openxswitch.com/openapi/waas/developer-api.json post /v1/sub-wallet/transfer/prime Transfer funds from one sub-wallet to the workspace prime wallet workspace. `This operation is free, and no fees are collected for these internal transfers.` # Unfreeze Sub-Wallet Source: https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/unfreeze-sub-wallet https://docs.openxswitch.com/openapi/waas/developer-api.json post /v1/sub-wallet/unfreeze Unfreeze a sub-wallet to resume transactions. # Execute Quote Source: https://docs.openxswitch.com/api-reference/swaps/execute-quote https://docs.openxswitch.com/openapi/wallet-infra/swaps.json post /v2/swap/execute Executes an active, valid quote on-chain using its Quote ID. Builds and broadcasts the transaction to settle the trade, provided the quote has not expired. # Generate Swap Quote Source: https://docs.openxswitch.com/api-reference/swaps/generate-swap-quote https://docs.openxswitch.com/openapi/wallet-infra/swaps.json post /v2/swap/quote Generates a firm, executable swap quote. Returns a valid Quote ID that can be submitted to the execute endpoint to complete the trade on-chain. # Get Supported Chains Source: https://docs.openxswitch.com/api-reference/swaps/get-supported-chains https://docs.openxswitch.com/openapi/wallet-infra/swaps.json get /v2/swap/chains Get all supported blockchains that support swaps on `OpenXSwitch`. # Get Supported Tokens Source: https://docs.openxswitch.com/api-reference/swaps/get-supported-tokens https://docs.openxswitch.com/openapi/wallet-infra/swaps.json get /v2/swap/tokens Get all supported tokens that support swaps on `OpenXSwitch`. # Get Swap Quote Source: https://docs.openxswitch.com/api-reference/swaps/get-swap-quote https://docs.openxswitch.com/openapi/wallet-infra/swaps.json get /v2/swap/quote Retrieves an existing swap quote using its Quote ID. Returns the previously generated quote and its current status. # Submit Missed Deposit Source: https://docs.openxswitch.com/api-reference/swaps/submit-missed-deposit https://docs.openxswitch.com/openapi/wallet-infra/swaps.json post /v2/swap/sync-deposit Synchronizes an unverified deposit using a Quote ID to refresh order status and retrigger the execution flow. # Sandbox Create buy or sell order Source: https://docs.openxswitch.com/api-reference/trade-endpoints/sandbox-create-buy-or-sell-order https://docs.openxswitch.com/openapi/waas/sandbox-api.json post /v1/sandbox/trade/order Create a new trading order # Sandbox Preview trade returns and fees Source: https://docs.openxswitch.com/api-reference/trade-endpoints/sandbox-preview-trade-returns-and-fees https://docs.openxswitch.com/openapi/waas/sandbox-api.json post /v1/sandbox/trade/preview Provides a non-committal estimate of potential returns and trading fees based on the input parameters. This endpoint does not execute any trade but helps users evaluate the outcome of a potential transaction. # Create Batch Transfer Transaction Source: https://docs.openxswitch.com/api-reference/transactions/create-batch-transfer-transaction https://docs.openxswitch.com/openapi/wallet-infra/new-transactions.json post /v2/transactions/withdraw/batch Create a new Batch Transfer Transaction

Example:

When calling the endpoint with amount = 10 USDC, the receiver receives 10 USDC, and the balance decreases by 10 USDC + `fee`.

# Create Transfer Transaction Source: https://docs.openxswitch.com/api-reference/transactions/create-transfer-transaction https://docs.openxswitch.com/openapi/wallet-infra/new-transactions.json post /v2/transactions/withdraw Create a new Transfer Transaction (fee is included)

Example:

When calling the endpoint with amount = 10 USDC, the receiver receives 10 USDC minus `fee`, and the balance decreases by 10 USDC.

# Estimate Fee for a Transaction Source: https://docs.openxswitch.com/api-reference/transactions/estimate-fee-for-a-transaction https://docs.openxswitch.com/openapi/wallet-infra/new-transactions.json get /v2/transactions/estimate-fee Estimate the gas fee for a transaction # Get Swap Transaction Source: https://docs.openxswitch.com/api-reference/transactions/get-swap-transaction https://docs.openxswitch.com/openapi/wallet-infra/swaps.json get /v2/swap/transactions Retrieve details of a specific swap transaction # Get Transaction Source: https://docs.openxswitch.com/api-reference/transactions/get-transaction https://docs.openxswitch.com/openapi/wallet-infra/new-transactions.json get /v2/transactions Retrieve details of a specific transaction # List Swap Transactions Source: https://docs.openxswitch.com/api-reference/transactions/list-swap-transactions https://docs.openxswitch.com/openapi/wallet-infra/swaps.json get /v2/swap/transactions/list Retrieve a paginated list of swap transactions with optional filters for account, wallet, users, blockchain, status, and tokens. # List Transactions Source: https://docs.openxswitch.com/api-reference/transactions/list-transactions https://docs.openxswitch.com/openapi/wallet-infra/new-transactions.json get /v2/transactions/list Retrieve a paginated list of transactions with optional filters for account, wallet, blockchain, type, status, and token. # Retry a Transaction Source: https://docs.openxswitch.com/api-reference/transactions/retry-a-transaction https://docs.openxswitch.com/openapi/wallet-infra/new-transactions.json post /v2/transactions/withdraw/retry Retries a previously failed transaction. The transaction will be executed using the original transaction details.

This endpoint should be used when a transaction fails during queue processing and needs to be processed again.

# Sync Blockchain Transaction Source: https://docs.openxswitch.com/api-reference/transactions/sync-blockchain-transaction https://docs.openxswitch.com/openapi/wallet-infra/new-transactions.json post /v2/transactions/sync Fetch a blockchain transaction by hash, create or update the corresponding transaction record, and trigger the transaction webhook.

only `Bitcoin` is supported.

# Transfer Funds to Settlement Wallet Source: https://docs.openxswitch.com/api-reference/transactions/transfer-funds-to-settlement-wallet https://docs.openxswitch.com/openapi/wallet-infra/new-transactions.json post /v2/transactions/transfer/settlement Transfer funds from the specified wallet to the account’s settlement wallet on-chain. The settlement wallet is automatically determined for the account. The specified amount includes the transaction fee.

Example:

When calling the endpoint with amount = 10 USDC, the settlement wallet receives 10 USDC - fee, and the sender wallet balance decreases by 10 USDC.

# Validate Address Source: https://docs.openxswitch.com/api-reference/transactions/validate-address https://docs.openxswitch.com/openapi/wallet-infra/new-transactions.json get /v2/transactions/validate-address Validate an address # Get List of Prime Wallet Transfers Source: https://docs.openxswitch.com/api-reference/transfer-endpoints/get-list-of-prime-wallet-transfers https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/transfer/list Retrieve a paginated list of prime wallet transfers. # Get Prime Wallet Transfer Details Source: https://docs.openxswitch.com/api-reference/transfer-endpoints/get-prime-wallet-transfer-details https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/transfer Retrieve transfer details of prime wallet using its transferId. # Transfer from Prime wallet to sub-wallet Source: https://docs.openxswitch.com/api-reference/transfer-endpoints/transfer-from-prime-wallet-to-sub-wallet https://docs.openxswitch.com/openapi/waas/developer-api.json post /v1/transfer Initiates a transfer of assets from the Prime (master) wallet to a specified sub-wallet. This operation is typically used to allocate funds to sub-wallets for operational or trading purposes. # Create User Source: https://docs.openxswitch.com/api-reference/users/create-user https://docs.openxswitch.com/openapi/wallet-infra/users.json post /v2/users Create a new user. # Get List of users Source: https://docs.openxswitch.com/api-reference/users/get-list-of-users https://docs.openxswitch.com/openapi/wallet-infra/users.json get /v2/users/list Retrieve a paginated list of user, optionally filtered by userId, username, refId, or email. # Get User Source: https://docs.openxswitch.com/api-reference/users/get-user https://docs.openxswitch.com/openapi/wallet-infra/users.json get /v2/users Retrieve details of a specific user using its userId. # Get User Stats Source: https://docs.openxswitch.com/api-reference/users/get-user-stats https://docs.openxswitch.com/openapi/wallet-infra/users.json get /v2/users/stats Retrieve stats of a specific user. # Get User Wallet Balances Source: https://docs.openxswitch.com/api-reference/users/get-user-wallet-balances https://docs.openxswitch.com/openapi/wallet-infra/users.json get /v2/users/balances Retrieve balances for all wallets associated to a specific user. # Get User Wallets Source: https://docs.openxswitch.com/api-reference/users/get-user-wallets https://docs.openxswitch.com/openapi/wallet-infra/users.json get /v2/users/wallets Retrieve a paginated list of user wallets with optional filters for address, blockchain, and environment. # List User Transactions Source: https://docs.openxswitch.com/api-reference/users/list-user-transactions https://docs.openxswitch.com/openapi/wallet-infra/users.json get /v2/users/transactions Retrieve a paginated list of a user transactions with optional filters for wallet, blockchain, type, status, and token. # Sandbox Generate Wallet Address Source: https://docs.openxswitch.com/api-reference/wallet-endpoints/sandbox-generate-wallet-address https://docs.openxswitch.com/openapi/waas/sandbox-api.json post /v1/sandbox/wallet/address

Generate a new wallet address or retrieve an existing one for the specified sub-wallet.

Addresses can only be generated for recharge coins. # Sandbox Get List of Wallet Addresses Source: https://docs.openxswitch.com/api-reference/wallet-endpoints/sandbox-get-list-of-wallet-addresses https://docs.openxswitch.com/openapi/waas/sandbox-api.json get /v1/sandbox/wallet/address/list Retrieve a paginated list of Sandbox wallet addresses. # Sandbox Get Prime Wallet Assets Source: https://docs.openxswitch.com/api-reference/wallet-endpoints/sandbox-get-prime-wallet-assets https://docs.openxswitch.com/openapi/waas/sandbox-api.json get /v1/sandbox/wallet/assets Retrieve the Sandbox assets(balance) of Prime Wallet with optional filters for coin. # Sandbox Get Prime Wallet Details Source: https://docs.openxswitch.com/api-reference/wallet-endpoints/sandbox-get-prime-wallet-details https://docs.openxswitch.com/openapi/waas/sandbox-api.json get /v1/sandbox/wallet Retrieve details of prime wallet. # Create Wallet Source: https://docs.openxswitch.com/api-reference/wallets/create-wallet https://docs.openxswitch.com/openapi/wallet-infra/index.json post /v2/wallets Create a new wallet (blockchain address) under a account. # Get Wallet Source: https://docs.openxswitch.com/api-reference/wallets/get-wallet https://docs.openxswitch.com/openapi/wallet-infra/index.json get /v2/wallets Retrieve details of a specific wallet including its balances. # Get Wallet Balances Source: https://docs.openxswitch.com/api-reference/wallets/get-wallet-balances https://docs.openxswitch.com/openapi/wallet-infra/index.json get /v2/wallets/balances Retrieve balances of a specific wallet. # List Wallets Source: https://docs.openxswitch.com/api-reference/wallets/list-wallets https://docs.openxswitch.com/openapi/wallet-infra/index.json get /v2/wallets/list Retrieve a paginated list of wallets with optional filters for account, blockchain, and environment. # Update Wallet Source: https://docs.openxswitch.com/api-reference/wallets/update-wallet https://docs.openxswitch.com/openapi/wallet-infra/index.json patch /v2/wallets Update settings of a specific wallet. # Get webhook delivery logs Source: https://docs.openxswitch.com/api-reference/webhook/get-webhook-delivery-logs https://docs.openxswitch.com/openapi/developer-api-webhook.json get /v1/webhook/logs Fetch detailed execution history for dispatched webhooks.

Includes HTTP response status codes, payload data, and delivery timestamps.

# List webhooks Source: https://docs.openxswitch.com/api-reference/webhook/list-webhooks https://docs.openxswitch.com/openapi/developer-api-webhook.json get /v1/webhook/list Retrieve a paginated list of configured webhooks or registered endpoint subscriptions. # Resend webhook Source: https://docs.openxswitch.com/api-reference/webhook/resend-webhook https://docs.openxswitch.com/openapi/developer-api-webhook.json post /v1/webhook/resend Manually resend a previously sent webhook using its `requestId` from webhook history.

Limited to `5` resend attempts per webhook.

# Get List of Prime Wallet Withdrawals Source: https://docs.openxswitch.com/api-reference/withdraw-endpoints/get-list-of-prime-wallet-withdrawals https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/withdraw/list Retrieve a paginated list of withdrawals made from prime wallet. # Get Prime Wallet Withdrawal Details Source: https://docs.openxswitch.com/api-reference/withdraw-endpoints/get-prime-wallet-withdrawal-details https://docs.openxswitch.com/openapi/waas/developer-api.json get /v1/withdraw Retrieve withdrawal details of prime wallet with optional withdrawId. # Prime Wallet Withdrawal Source: https://docs.openxswitch.com/api-reference/withdraw-endpoints/prime-wallet-withdrawal https://docs.openxswitch.com/openapi/waas/developer-api.json post /v1/withdraw/create Withdraw funds from prime wallet to an external address. To estimate the withdrawal fee, use the [Fee Estimate](https://docs.openxswitch.com/api-reference/fee-endpoints/estimate-withdrawal-fee) endpoint.

The **network fee** is automatically deducted from the specified amount, and the remaining balance is sent to the receiver

# SandBox Prime Wallet Withdrawal Source: https://docs.openxswitch.com/api-reference/withdraw-endpoints/sandbox-prime-wallet-withdrawal https://docs.openxswitch.com/openapi/waas/sandbox-api.json post /v1/sandbox/withdraw/create Withdraw funds from prime wallet to an external address. To estimate the withdrawal fee, use the [Fee Estimate](https://docs.openxswitch.com/api-reference/fee-endpoints/estimate-withdrawal-fee) endpoint.

The **network fee** is automatically deducted from the specified amount, and the remaining balance is sent to the receiver

# Smart Accounts Source: https://docs.openxswitch.com/changlog/smart-accounts # Wallet as a Service Source: https://docs.openxswitch.com/changlog/wallet-as-a-service **03/26/2026** Webhook ## Title Update .......... **03/26/2026** API Key ## Title 2 Update ...... # Compliance Engine Source: https://docs.openxswitch.com/compliance/overview Compliance Engine helps developers enable compliance with evolving regulations in the blockchain space. > [!NOTE] > > Transactions, addresses, and wallet interactions are evaluated automatically as part of normal operational and compliance workflows across both `Wallet-as-a-Service` and `Smart Account `infrastructure. ### **Introduction** The rapid evolution of digital assets has introduced new regulatory challenges for enterprises working with blockchain technologies. Ensuring compliance with Anti-Money Laundering (AML), Counter-Terrorist Financing (CTF), and other jurisdictional requirements is now a fundamental need. OpenXSwitch Compliance Engine is a response to these challenges, offering you a solution you can integrate directly into your applications. **Transaction Screening**\ Automatically flag suspicious or high-risk blockchain transactions in real time. Prevent non-compliant activity before it occurs by integrating proactive risk detection directly into your transaction flow. ### **Key Features** * **Alert Management:** The Alerts feature provides full visibility into suspicious activity, helping your team take fast, informed actions while meeting global AML/CFT and sanctions requirements (FATF, 6AMLD, OFAC, FinCEN, MAS). **What You'll Be Able to Do** * Access Historical Alerts * Review Alert Details * Explore Related Entities * Take Action Immediately (`Freeze Wallet/Wallets`, Add to `Blocklist`, `Resolved alerts`) * **Address Search**: Designed to give you instant insights into any wallet address across supported networks. * **Watchlist Management** (`Allowlist` & `Blocklist`): Easily manage trusted and restricted addresses. Add wallets to your allowlist to permit withdrawals, or blocklist high-risk addresses to prevent exposure. # Watchlists Source: https://docs.openxswitch.com/compliance/watchlists Withdrawals are filtered through watchlist rules to enforce operational policies, reduce unauthorized activity, and restrict transfers to high-risk or prohibited destinations. OpenXSwitch secures outbound transactions by enforcing **Watchlist Policies** at the **Account level** during withdrawal and settlement operations. Watchlists enforce access parameters across all wallets under a given Account, evaluating transfers directly prior to transaction submission and rejecting restricted attempts before execution. ### How Watchlists Work When watchlist policies are enabled on an **Account**, all external withdrawals initiated by any wallet under that Account are evaluated against the configured watchlist type: * **Allowlist:** Only destination addresses explicitly included in the allowlist are permitted to receive funds. Any withdrawal attempt to an address outside the allowlist is **rejected by default**. * **Blocklist:** All destination addresses are permitted by default, **except** addresses explicitly added to the blocklist. Any withdrawal attempt to a blocklisted address is **automatically blocked and rejected**. ### Watchlist Types | **Type** | **Operational Logic** | **Best For** | | :- | :- | :- | | **Allowlist** | Transfers are **restricted strictly** to explicitly added and approved wallet addresses. | High-security operational environments and closed settlement loops. | | **Blocklist** | Transfers to blacklisted addresses are **strictly forbidden**; all other destinations are permitted. | Preventing payouts to known malicious, sanctions-restricted, or prohibited addresses. | ### Supported Operations Account-level watchlist policies are evaluated automatically before transaction execution during: * **External Withdrawals:** Outbound transfers from underlying wallets to external blockchain addresses. * **Settlement Operations:** Treasury routing and external settlement transfers. > **Operational Note:** Address validation occurs prior to on-chain submission at the Account layer. Restricted transactions are rejected instantly before hitting the network, saving gas costs and maintaining tight security compliance across all associated wallets. # Glossary Source: https://docs.openxswitch.com/developer-services/glossary # Gas Fee Faqs Source: https://docs.openxswitch.com/gas-fees/faqs ### EVM > [accordion] What is EVM? > > The **Ethereum Virtual Machine (EVM)** is the core runtime environment that executes smart contracts and processes state updates across EVM-compatible blockchain networks. > [accordion] Which EVM chains are supported by OpenXSwitch? > > * **Ethereum** (`ethereum-mainnet`) > * **Polygon** (`polygon-mainnet`) > * **Avalanche** (`avalanche-mainnet`) > * **Binance Smart Chain** (`bsc-mainnet`) > * **Base** (`base-mainnet`) > * **Arbitrum One** (`arbitrum-mainnet`) > * **Optimism** (`optimism-mainnet`) > * **Monad** (`monad-mainnet`) > * **Linea** (`linea-mainnet`) > * **Robinhood Chain \*\* (`robinhood-testnet`** \*\*) > [accordion] How do gas fees work on EVM chains? > > Executing transactions on **EVM** networks requires burning or paying native gas tokens (e.g., **ETH**, **POL**, **BNB**) to incentivize network validators. > [accordion] How does OpenXSwitch handle EVM gas fees? > > OpenXSwitch utilizes **ERC-4337 Paymaster infrastructure** to sponsor gas fees natively. This enables completely gasless user experiences or allows transactions to be settled directly in stablecoins (such as **USDC** or **USDT**). ### SOLANA > [accordion] What is an Associated Token Account (ATA)? > > Unlike EVM chains where tokens share a single unified address, Solana requires an **Associated Token Account (ATA)** to hold balances for each specific non-native token (such as USDC or SPL tokens). > [accordion] What is Account Rent? > > Solana requires a rent-exempt deposit in SOL to allocate state space for an ATA. Once rent-exempt, the ATA remains active permanently without additional storage fees. > [accordion] How does OpenXSwitch handle Solana ATA creation and rent? > > OpenXSwitch Gas Station automatically sponsors the initial rent deposit required to create an ATA upon the first deposit or token interaction. Subsequent transfers for that token reuse the existing ATA with zero additional setup costs. ### BITCOIN (BTC) > [accordion] How is the Bitcoin transaction fee calculated? > > Bitcoin does not use smart contract gas. Instead, transaction fees depend on mempool congestion and transaction size in virtual bytes (vBytes). > [accordion] What is the Bitcoin fee rate? > > Fees are measured in satoshis per virtual byte (`sat/vB`). OpenXSwitch dynamically calculates mempool rates using the formula: > > > **Total Fee** (satoshis) = **Transaction Size** (vBytes) x **Fee Rate** (sat/vB) > > The **Bitcoin fee rate** is the price paid per unit of transaction data size, measured in **satoshis per virtual byte (**`sat/vB`**)**. ### TRON > [accordion] What is the Tron Gas Manager? > > The **Tron Gas Manager** is an **OpenXSwitch** workspace utility that automates gas sponsorship, resource allocation, and address activation for TRON transactions. Each workspace relies on a **dedicated** **wallet** that requires **pre-funding** with **TRX** to power these automated operations. > [accordion] What is Account Activation in TRON? > > A newly generated **TRON** public key address does not exist on the global ledger until an explicit activation transaction is broadcast. > [accordion] What is the difference between Resource Delegation and TRX burning on TRON? > > When executing TRC-20 contract interactions (such as USDT transfers) on TRON, fees can be settled using two distinct mechanisms: > > * **Resource Delegation (Primary Staking Model):** TRX is frozen or staked in advance to generate a continuous supply of Energy and Bandwidth. These resources are delegated directly to executing wallet addresses to cover contract execution without permanently destroying TRX. Resource delegation delivers up to **70–80% cost savings** compared to direct TRX burning. > * **TRX Burning (Fallback Mechanism):** If an address lacks delegated resources at execution time, the protocol burns native TRX directly from the sending wallet to generate the required Energy and Bandwidth on-demand. While this ensures guaranteed transaction completion, burning TRX is significantly more expensive per transaction. > [accordion] Can an unactivated TRON address receive assets? > > Yes. Unactivated TRON addresses can receive **TRC-20** tokens (such as USDT) directly. However, the account must be activated before it can perform outgoing transfers or receive delegated Energy. > [accordion] What is the difference between Energy and Bandwidth? > > * **Bandwidth:** Covers transaction byte size (consumed by all transactions). > * **Energy:** Covers smart contract execution (required for TRC-20 transfers like USDT). > [accordion] Why do USDT transfers to new addresses cost more Energy? > > If the recipient address already holds **USDT**, the contract only updates an existing storage slot (~~**64,000** Energy). If the recipient has never held **USDT**, the contract must write a new storage slot in state memory (~~**131,000** Energy). > [accordion] Does OpenXSwitch burn TRX or delegate resources? > > OpenXSwitch uses a **Tron Gas Manager** to delegate Energy and Bandwidth automatically, providing up to **80%** cost savings. > [accordion] How much does TRON account activation cost? > > Activating a TRON address incurs a standard on-chain fee of **1 TRX**, which allocates account storage space in state memory and assigns initial **bandwidth** to the address. # Overview Source: https://docs.openxswitch.com/gas-fees/overview OpenXSwitch abstracts away native gas management, account funding requirements, and network-specific setup steps, enabling users and developers to interact across chains without acquiring, managing native gas tokens, account rents, or other protocol-level constraints. ### Problem with Gas Fees Blockchains rely on gas fees to incentivize validators and prevent network abuse such as denial-of-service attacks. These fees are typically enforced at the protocol level and must be paid in each network’s native token by the wallet initiating the transaction. This requirement introduces significant friction for users and applications, as users are often required to acquire, hold, and manage multiple native tokens across different blockchains before they can perform basic onchain actions. This creates a fragmented and unintuitive onboarding experience, especially in multi-chain environments. Depending on the blockchain architecture, there are different approaches to abstracting gas fees. For example: * **On EVM chains:** With the introduction of `ERC-4337` (`Account Abstraction`), network fees can be sponsored or paid in non-native tokens through smart contracts known as Paymasters. * **On Solana:** Using the concept of `Fee-Payers`, third-party wallets can sponsor transaction fees on behalf of users. * **On TRON:** Utilizes a **Tron Gas Manager** to automate **Resource Delegation** (Energy and Bandwidth) and handle on-chain account activations. ## Gas Infrastructure Architecture | **Component** | **Protocol** | **Description** | | :- | - | :- | | **Gas Sponsor** | **Multi-Chain** | Operational infrastructure responsible for authorizing and subsidizing on-chain execution fees according to configured workspace policies. | | **Paymaster** | **EVM** | Specialized smart contract mechanism that validates and pays gas fees for UserOperations on EVM-compatible networks. | | **Fee-Payer** | **Solana** | Designated signing service that pays transaction execution fees on the Solana network. | | **Tron Gas Manager** | **Tron** | Dedicated workspace utility pre-funded with TRX to automate Resource Delegation (Energy and Bandwidth) and account activation. | # Sponsorship Models Source: https://docs.openxswitch.com/gas-fees/sponsorship-models Without sponsorship, users must source and maintain native tokens in their wallets across chain before they can execute transactions. > [!NOTE] > > **EVM:** Users must hold native gas tokens (e.g., ETH or equivalent) in their wallets to pay for transaction execution, regardless of the asset being transferred or the application being used. > > **Solana:** Users are required to fund rent-exempt balances and create Associated Token Accounts (ATAs) before they can receive or interact with SPL tokens. > > **TRON:** Users must hold TRX to burn for Energy and Bandwidth or obtain pre-delegated network resources to execute transactions and smart contract interactions, regardless of the asset being transferred. ### EVM Gas Sponsorship **EVM** transactions normally require native gas tokens such as `ETH`, `BNB`, or `POL` to execute transactions onchain. OpenXSwitch uses **ERC-4337** `Paymaster infrastructure` to sponsor gas fees and abstract native token requirements from users. Gas sponsorship allows users to interact onchain without holding native gas assets, enabling stablecoin-native and gasless wallet experiences. ### Solana ATA Sponsorship Solana token transfers require an `Associated Token Account` (ATA) for every token a wallet holds. OpenXSwitch Gas Station sponsors the rent deposit required to create these ATAs, removing the need for users to fund token account creation manually. For the first `deposit` of a token into a wallet, `ATA` rent must be paid and can sometimes exceed `$0.20` depending on network conditions. Subsequent transfers for the same token reuse the existing ATA and do not require additional rent creation costs. ### TRON Resource Delegation & Account Mechanics TRON handles transaction execution and state allocation using **Bandwidth**, **Energy**, and explicit **Account Activation**. #### Resource Delegation Savings Matrix & Cost Savings By leveraging automated Resource Delegation (via the **Tron** **Gas** **Manager**) instead of directly burning native TRX, operational execution costs are reduced significantly: | **Scenario** | **Energy Used** | **TRX Burned** | **Delegated Cost** | **TRX Saved** | **Savings %** | | - | - | - | - | - | - | | **Transfer to USDT holder** | 64,000 | 6.40 TRX | 1.25 – 3.25 TRX | 3.15 – 5.15 TRX | 50.8% – 80.5% | | **Transfer to non-USDT holder** | 130,000 | 13.00 TRX | 3.25 – 6.5 TRX | 6.5 – 9.75 TRX | 75.0% – 90.4% | ### How OpenXSwitch Powers TRON Execution OpenXSwitch abstracts TRON’s complex resource management using an automated delegation model powered by a dedicated **Tron Gas Manager**: 1. **Gas Manager Pre-Funding:** Workspaces maintain a **TRX** balance inside a dedicated **Tron Gas Manager**. 2. **Pre-Execution Check:** When a transfer is initiated, **OpenXSwitch** checks if the target address requires activation and evaluates whether the destination address already holds USDT (determining whether the transaction requires \~64k or \~131k Energy). 3. **Automated Resource Delegation:** **OpenXSwitch** automatically delegates the precise required Energy and Bandwidth directly to the executing wallet address prior to broadcasting. 4. **Frictionless Experience:** End-users send and receive TRON assets seamlessly without managing TRX balances, buying Energy, or handling network activation. # Glossary Source: https://docs.openxswitch.com/glossary ## Workspace A centralized hub within OpenXSwitch where users can manage their accounts, wallets, sub-wallets, and other resources. Each workspace can represent a distinct entity, such as a business or project, and may have dedicated settings and permissions. ## Wallet A digital container that holds funds and supports blockchain transactions, such as deposits, withdrawals, and internal transfers. OpenXSwitch wallets can be custodial, ensuring secure management of funds on behalf of users. ## Sub-Wallet A secondary wallet created within a workspace to segregate funds for specific purposes or projects. Sub-wallets enable enhanced fund management, such as organizing finances by departments or use cases, and may support features like auto-collection and policy-based governance. ## Address A unique identifier on a blockchain network used for sending and receiving digital assets. Each wallet or sub-wallet in OpenXSwitch is associated with one or more blockchain addresses to facilitate transactions. ## WalletAsset A WalletAsset is a unified representation of a cryptocurrency or token in a multi-chain wallet system. It aggregates balances of the same asset across different blockchains, allowing users to deposit on one chain and withdraw on another seamlessly. #### Why WalletAsset Matters? * **Cross-Chain Balance Aggregation** – Instead of treating assets separately by chain, a WalletAsset combines them into a single view. * **Flexible Withdrawals** – Users can receive an asset on one chain and send it out on another, making transactions more efficient. * **Simplified User Experience** – Users don’t have to track different versions of the same token across multiple chains. ## Recharge Currency A digital asset used to fund wallets or sub-wallets. Users can deposit cryptocurrencies like Bitcoin, Ethereum, or stablecoins to maintain liquidity and enable transactions within the platform. > 👍 You can only deposit and withdraw using a recharge currency or coin ## Trade The act of buying, selling, or exchanging digital assets on supported markets. * Spot Trade: Immediate purchase or sale of digital assets at the current market price, executed through either a limit order or market order. * Limit order: allows a trader to specify the maximum price they are willing to pay when buying or the minimum price they are willing to accept when selling. * Market order: executes a trade immediately at the best available price in the market. * Future Trade: A derivative contract to buy or sell an asset at a predetermined price on a specific future date.\ Trading Pairs Trading pairs allow users to exchange one cryptocurrency for another based on current market rates. ## In-Wallet Exchange A trading mechanism within OpenXSwitch that uses funds from sub-wallets to perform transactions. After the exchange is completed, the resulting cryptocurrency is automatically credited back to the originating sub-wallet, ensuring seamless management of funds without requiring external transfers. > 👍 It supports various trading types, including spot trading and futures trading ## Withdraw The process of transferring funds from a wallet or sub-wallet to an external blockchain address. Withdrawals are subject to network fees and governance policies defined by the user or platform. ## Internal Transfer Movement of funds between wallets or sub-wallets within the same workspace or platform, often without incurring blockchain transaction fees. Internal transfers enable seamless fund reallocation for operational efficiency. > 👍 No blockchain transaction fees # Guides Source: https://docs.openxswitch.com/guides Developer guides, and migration references # Browser Guides > [card] [Get Started with Account Management](https://docs.openxswitch.com/guides/dev-guides/get-started-with-account-management) > [card] [Create and Manage Wallets](https://docs.openxswitch.com/guides/dev-guides/create-and-manage-wallets) > [card] Swap a Token > [card] [Create and Manage Users](https://docs.openxswitch.com/guides/dev-guides/create-and-manage-users) > [card] [Send and Transfer Tokens](https://docs.openxswitch.com/guides/dev-guides/send-and-transfer-tokens) # Authentication Source: https://docs.openxswitch.com/guides/authentication OpenXSwitch uses API key-based authentication to secure access to platform resources and infrastructure operations. ### API Key Usage All API requests must include your API key in the `Authorization` header as a Bearer token. #### Required Header ```curl highlight={1} theme={null} Authorization: Bearer YOUR_API_KEY Content-Type: application/json ``` Replace `YOUR_API_KEY` with the key generated from your OpenXSwitch Console. ### API Key Setup 1. Navigate to **Account → API Management** in the OpenXSwitch Console 2. Click **Create API Key** 3. Select required **permissions** (e.g. wallet, withdrawal, trading, read access) 4. (Optional but recommended) Enable **IP Restrictions** * Add up to 5 trusted IP addresses * Requests from other IPs will be rejected 5. Click **Generate API Key** > ⚠️ API Management is restricted to **Owner** and **Admin** roles only. ### Example Requests 1. **Create a User**\ Create a new user using an authenticated API request. Request ```shellscript cURL highlight={2} theme={null} curl -X POST "https://api.openxswitch.com/v2/users" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "email": "oxs@example.com", "displayName": "openxswitch", "refId": "1234........." }' ``` ```typescript JavaScript highlight={5} theme={null} const axios = require('axios'); const url = "https://api.openxswitch.com/v2/users"; const headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }; const data = { "email": "oxs@example.com", "displayName": "openxswitch", "refId": "1234........." }; axios.post(url, data, { headers }) .then(response => console.log(response.data)) .catch(error => console.error(error)); ``` ```python Python highlight={5} theme={null} import requests url = "https://api.openxswitch.com/v2/users" headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" } data = { "email": "oxs@example.com", "displayName": "openxswitch", "refId": "1234........." } response = requests.post(url, json=data, headers=headers) print(response.json()) ``` ```php PHP highlight={6} theme={null} "oxs@example.com", "displayName" => "openxswitch", "refId" => "1234........." ]); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); echo $response; ?> ``` ```java JAVA highlight={14} theme={null} import okhttp3.*; public class Main { public static void main(String[] args) throws Exception { OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{ \"email\": \"oxs@example.com\", \"displayName\": \"openxswitch\" }"); Request request = new Request.Builder() .url("https://api.openxswitch.com/v2/users") .post(body) .addHeader("Authorization", "Bearer YOUR_API_KEY") .addHeader("Content-Type", "application/json") .build(); Response response = client.newCall(request).execute(); System.out.println(response.body().string()); } } ``` > 📘 For further details on API permission, refer to the [API permissions](api-permissions) documentation ### Security Best Practices * **Keep Your API Key Secret:** Never share your API key in public code or repositories. * **Use IP Restrictions:** Limit API access to specific trusted IPs. * **Grant Minimum Necessary Permissions:** Select only the required access rights for your API key (e.g., withdrawal, trade, wallet management) to minimize security risks. * **Rotate API Keys Regularly:** To reduce the risk of compromised credentials. * **Monitor API Usage:** Regularly review API logs and activity to detect any unauthorized access or unusual behavior. # Create and Manage Users Source: https://docs.openxswitch.com/guides/dev-guides/create-and-manage-users A **User** represents an application-specific identity within your workspace. Creating a user allows you to generate chain-specific wallet addresses, query balances, and track activity metrics scoped directly to that individual entity. ## Prerequisites Before you begin, ensure that you have: * Obtained an **API key** from the [**OpenXSwitch Console**.](https://console.openxswitch.com/) An active API key with the necessary write permissions configured for the target environment (Sandbox or Live). ## The Plan We'll go through: 1. **Creating a User via the API:** Provision a user record scoped to your workspace. 2. **[Linking Wallets to Users](/guides/dev-guides/create-and-manage-wallets):** Associate chain-specific wallets directly with your `userId`. 3. **Fetching User Wallets:** Retrieve all blockchain wallet instances associated with the user. 4. **Fetching User Balances:** View real-time asset holdings across the user's wallets. 5. **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 a `POST` request to the `/v2/users` endpoint. ```json highlight={1} theme={null} URL: https://api.openxswitch.com/v2/users { "email": "", "displayName": "", "refId": "" } ``` ### 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 ```json theme={null} { "success": true, "data": { "id": "63e1b8c2f18e310bb11f8a9c", "refId": "client_001", "email": "sam.vwede@example.com", "displayName": "Sam.Vwede", "isActive": "true", "createdAt": "2025-01-17T10:00:00Z", "updatedAt": "2025-01-17T12:00:00Z", "workspaceId": "63e1b8c2f18e310bb11f8a9c" } } ``` ## 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 this `userId`. For complete details on wallet provisioning, see the [Create and Manage Wallets Guide](/guides/dev-guides/create-and-manage-wallets). ## Step 3: Fetch User Wallets Once a user is created, retrieve all deployed wallet addresses across supported blockchain networks using the `GET` endpoint `/v2/users/{userId}/wallets` ```json theme={null} URL: https://api.openxswitch.com/v2/users/wallets?userId={userId} ``` ### Sample Response ```json theme={null} { "success": true, "data": [ { "id": "8e6f5877-d71a-4017-a3eb-3d1d4464e274", "address": "0x1234567890123456789012345678901234567890", "blockchain": "ethereum", "protocol": "EVM", "network": "mainnet", "isEvmCompatible": true, "type": "smart_wallet", "intent": "deposit", "gaslessWithdraw": true, "autoSweep": true, "state": "LIVE", "custodyType": "DEVELOPER", "userId": "user_1", "accountId": "WALLET_ACCOUNT_ID", "workspaceId": "WORKSPACE_ID", "createdAt": "2022-01-01T00:00:00.000Z", "updatedAt": "2022-01-01T00:00:00.000Z", "decimals": 18, "name": "Wallet 1", "refId": "WALLET_REF_ID" } ], "totalPage": 123, "pageNo": 123, "pageLimit": 123 } ``` ## Step 4: Fetch User Balances To inspect the real-time token and native balances across a user's wallets, query the balances endpoint. ```json theme={null} URL: https://api.openxswitch.com/v2/users/balances?userId={userId} ``` ### Sample Response ```json theme={null} { "success": true, "data": [ { "token": { "name": "Tether USD", "symbol": "USDT", "blockchain": "ethereum", "isNative": true, "standard": "ERC-20", "tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7", "decimals": 6 }, "amount": { "formatted": "479000.10", "raw": "47900010" }, "environment": "mainnet", "createdAt": "2025-04-02T17:20:42.160Z", "updatedAt": "2025-04-02T17:20:42.160Z" } ], "totalPage": 123, "pageNo": 123, "pageLimit": 123 } ``` ## 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. ```json theme={null} URL: https://api.openxswitch.com/v2/users/stats?userId={userId} ``` ### Sample Response ```json theme={null} { "success": true, "data": { "depositsCount": 86, "depositsCountIn30Days": 18, "transactionVolumeCount": 104, "transactionVolumeCountIn30Days": 26, "withdrawsCount": 18, "withdrawsCountIn30Days": 8 } } ``` ## Next Steps * [Create and Manage Wallets:](/guides/dev-guides/create-and-manage-wallets) Deploy new chain-specific smart wallets or fetch deposit addresses bound to your user entity. # Create and Manage Wallets Source: https://docs.openxswitch.com/guides/dev-guides/create-and-manage-wallets A **Wallet** represents an on-chain deposit and execution address provisioned under an Application Account. You can programmatically deploy wallets across supported blockchains, link them directly to end-users, query asset balances, and manage operational controls such as auto-sweeping and wallet state. ## Prerequisites Before starting this guide, ensure you have: * Obtained an **API key** from the [**OpenXSwitch Console**.](https://console.openxswitch.com/) * **Configured an Application Account:** An active `accountId` generated via the API. See [Get Started with Account Management](/guides/dev-guides/get-started-with-account-management) for details. ## The Plan We'll go through: **Pre-Step:** Fetch supported blockchains using `GET /v2/chains` to retrieve target `blockchain` identifiers. 1. **Creating a Wallet via API:** Provisioning a chain-specific wallet address scoped to an account. 2. **Updating Wallet Settings:** Managing wallet activity state (`isActive`), display labels, and auto-sweep configurations. 3. **Fetching Wallet Balances:** Querying asset holdings by wallet ID or blockchain address. 4. **Next Steps:** Configuring treasury sweeps. ## Pre-Step: Fetch Supported Blockchains & Assets To identify valid `blockchain` network identifiers before provisioning a wallet, you can fetch the list of supported networks and rechargeable currencies using the endpoints below. ### 1. Get List of Supported Blockchains & Assets Send a `GET /v2/chains` request to retrieve all supported networks, token standards, and chain configurations. ### Sample Response ```json theme={null} { "success": true, "data": [ { "slug": "ethereum-sepolia", "name": "Ethereum", "symbol": "ETH", "decimals": 18, "onchain": { "protocol": "EVM", "chainId": 1 }, "nativeCurrency": { "name": "Ether", "symbol": "ETH", "decimals": 18 }, "isTestnet": false, "standards": [ "ERC20" ], "media": { "url": "https://cdn.openxswitch.com/public/logos/svg/eth.svg", "type": "image/svg+xml" }, "blockExplorer": "https://etherscan.io" } ], "totalPage": 123, "pageNo": 123, "pageLimit": 123 } ``` 💡 **Selecting the Right Network Value** When creating a wallet in **Step 1**, you can pass the `name` (e.g., `"Ethereum"`) in the `blockchain`field. Using the `name` is recommended for standard network routing unless targeting a specific testnet environment. ## Step 1: Create a Wallet via API To provision a new wallet, send a `POST` request to the `/v2/wallets` endpoint. ```json theme={null} URL: https://api.openxswitch.com/v2/wallets { "idempotencyKey": "8d5be8f5-a8e7-4e8a-b715-0e7d6f2a6d04", "accountId": "123e4567-e89b-12d3-a456-426614174000", "blockchain": "ethereum", "name": "user_1 Wallet", "refId": "ref_user_1", "userId": "user_1", "autoSweep": false } ``` ### Key Request Parameters * `idempotencyKey` *(string, **required**)*: A unique string to prevent duplicate wallet creation requests. * `accountId` *(string, **required**)*: The parent Application Account container. * `blockchain` *(string, **required**)*: Target network identifier (e.g., `ethereum`, `polygon`). * `name` *(string, optional)*: A human-readable display label for internal tracking. * `userId` *(string, optional)*: Pass a `userId` during creation to link this wallet directly to an end-user identity. * `refId` *(string, optional)*: Client reference identifier. Re-using the same `refId` across different EVM chains ensures deterministically identical wallet addresses. * `autoSweep` *(boolean, optional)*: Set to `true` to automatically route incoming deposits directly into your primary **Settlement Account** treasury. Defaults to `false`. ### Sample Response ```json theme={null} { "success": true, "data": { "id": "8e6f5877-d71a-4017-a3eb-3d1d4464e274", "address": "0x1234567890123456789012345678901234567890", "blockchain": "ethereum", "protocol": "EVM", "network": "mainnet", "isEvmCompatible": true, "type": "smart_wallet", "intent": "deposit", "gaslessWithdraw": true, "autoSweep": true, "state": "LIVE", "custodyType": "DEVELOPER", "userId": "user_1", "accountId": "WALLET_ACCOUNT_ID", "workspaceId": "WORKSPACE_ID", "createdAt": "2022-01-01T00:00:00.000Z", "updatedAt": "2022-01-01T00:00:00.000Z", "decimals": 18, "name": "Wallet 1", "refId": "WALLET_REF_ID" } } ``` ## Step 2: Update Wallet Settings You can modify wallet metadata, toggle auto-sweeping, or adjust the wallet's active status using the `PATCH` endpoint. > 💡 **User Association** > > If a wallet was created without a `userId`, you can link the wallet to a user identity during an update request by supplying the `userId` field. ```json theme={null} URL: https://api.openxswitch.com/v2/wallets?walletId={walletId} { "userId": "user_1", "name": "Primary User 1 Wallet", "isActive": true, "autoSweep": true } ``` ### Field Breakdown * `name` *(string, optional)*: Updated display name for internal tracking. * `userId` *(string, optional)*: Links or updates the owner user entity for this wallet. * `autoSweep` *(boolean, optional)*: Enables or disables automatic treasury sweeping rules for incoming funds. * `isActive` *(boolean, optional)*: Set to `false` to freeze wallet actions. > ⚠️ **Important Security Rule** > > If `isActive` is set to `false`, the wallet is disabled. Disabled wallets **cannot withdraw or swap funds**. ## Step 3: Fetch Wallet Balances To inspect real-time token or native cryptocurrency balances, query the balances endpoint. You must provide either the `walletId` or the on-chain `address` as a parameter. ```json theme={null} URL: https://api.openxswitch.com/v2/wallets/balances?walletId={walletId} ``` ### Query Parameters * `walletId` *(string, conditional)*: The unique ID of the wallet (Required if `address` is omitted). * `address` *(string, conditional)*: The on-chain wallet address (Required if `walletId` is omitted). * `blockchain` *(string, optional)*: Filter results to a specific network. * `token` *(string, optional)*: Filter by a specific asset symbol or contract address (e.g., `USDT`). ### Sample Response ```json theme={null} { "success": true, "data": [ { "token": { "name": "Tether USD", "symbol": "USDT", "blockchain": "ethereum", "isNative": true, "standard": "ERC-20", "tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7", "decimals": 6 }, "amount": { "formatted": "479000.10", "raw": "47900010" }, "environment": "mainnet", "createdAt": "2025-04-02T17:20:42.160Z", "updatedAt": "2025-04-02T17:20:42.160Z" } ], "totalPage": 123, "pageNo": 123, "pageLimit": 123 } ``` ## Next Steps * **[Auto Collection and Sweep Rule](/wallet-infrastructure/auto-collection-and-sweep-rule):** Configure automated collection rules to aggregate user deposits into your central **Settlement Account**. * [Send and Transfer Tokens](/guides/dev-guides/send-and-transfer-tokens): Programmatically move digital assets from a specified wallet address to an external or internal recipient address. # Get Started with Account Management Source: https://docs.openxswitch.com/guides/dev-guides/get-started-with-account-management ## Setting Up Your Application Account Once you complete workspace onboarding, your default operational account is activated on the dashboard. To manage user identities, apply custom wallet-level controls, and manage asset flows, you can optionally configure a dedicated Application Account (`type = 'user'`). ## Prerequisites Before starting this guide, ensure you have: * **Obtained an API key from the OpenXSwitch Console.** An active API key with the necessary write permissions configured for the target environment (Sandbox or Live). ## The Plan We'll go through: 1. **Creating an Account via API:** Provisioning an isolated Account (`type = 'user'`) to manage end-user wallet instances and policies. 2. **Configuring Account Controls via Dashboard:** Managing settings, withdrawal restrictions, and compliance rules in the OpenXSwitch Console. 3. **Next Steps:** Integrating user wallets, webhook listeners, and operational auto-sweep rules. ## Step 1: Create an Account via API Accounts within the platform fall into two primary categories based on their `type`: * **Settlement Account (**`type = 'settlement'`**):** Serves as the primary enterprise operational or treasury account created automatically upon successful onboarding to manage enterprise funds, auto-sweeps, and global balances. * **Application Account (**`type = 'user'`**):** *(Optional)* Acts as an isolated account assigned to your specific end-user application to manage dedicated smart wallet instances, balances, and operational policies. If you do not create a separate Application Account, you can continue using the default account provisioned on your dashboard. To create a dedicated Application Account, send a request via the API: ```json theme={null} URL: https://api.openxswitch.com/v2/accounts { "idempotencyKey": "8d5be8f5-a8e7-4e8a-b715-0e7d6f2a6d04", "name": "Sandbox Account" } ``` > **Important:** The `accountId` returned in the response will be used across your application to scope wallet creation, transaction routing, and compliance policies. For complete parameter breakdowns, response schemas, and error handling, refer to the [Accounts API Reference.](https://docs.openxswitch.com/api-reference/accounts/create-account) ## Step 2: Configure Account Controls via the Dashboard After creating your Account (or when managing your default dashboard account), you can customize security settings, withdrawal rules, and compliance watchlists directly from the OpenXSwitch Console. 1. Log into the [OpenXSwitch Console](https://console.openxswitch.com). 2. Navigate to **Wallet Infrastructure → Accounts**. 3. Select the target Account to update. ### Configurable Settings * **Account Name:** Update the account display label for internal tracking. * **Withdrawal Controls:** Toggle and **disable** external **withdrawals** initiated via the **API** or **dashboard** to restrict outbound fund movements. * **Compliance Watchlists:** Enable automated **Allowlist** and **Blocklist** controls at the Account level to reject unauthorized transfers before on-chain execution. ## Step 3: Next Steps * **[Create and Manage Users](/guides/dev-guides/create-and-manage-users):** Provision end-user identities to track activity, stats, and balances. * **[Create and Manage Wallets](/guides/dev-guides/create-and-manage-wallets):** Deploy chain-specific smart wallets or deposit addresses linked directly to your users. # Send and Transfer Tokens Source: https://docs.openxswitch.com/guides/dev-guides/send-and-transfer-tokens Transferring or withdrawing tokens allows you to programmatically move digital assets from a specified wallet address to an external or internal recipient address. ## Prerequisites Before starting this guide, ensure you have: * **Obtained an API key from the OpenXSwitch Console.** * **An active API key with the necessary write and withdraw permissions.** * **Obtained an** `accountId` (if not using the default dashboard account). See the [Get Started with Account Management](/guides/dev-guides/get-started-with-account-management) for details. * **A provisioned source wallet with sufficient asset balance.** ## The Plan We'll go through: 1. **Fetching Supported Blockchains and Tokens:** Identifying valid target networks and asset symbols. 2. **Obtaining Source Wallet ID:** Retrieving the originating `walletId` containing the assets. 3. **Initiating a Token Withdrawal:** Submitting the transfer request via the API. 4. **Fetching Transaction Status:** Tracking transaction state using the returned transaction ID. ## Step 1: Fetch Supported Blockchains & Tokens Before initiating a transfer, query the tokens endpoint to fetch supported cryptocurrencies and their associated blockchain network identifiers (`slug` or `name`). Send a `GET` request to retrieve available tokens along with their supported target networks: ```json theme={null} URL: https://api.openxswitch.com/v2/chains/tokens-with-chains ``` ### Sample Response ```json theme={null} { "success": true, "data": [ { "name": "Ether", "symbol": "ETH", "decimals": 18, "isNative": false, "standards": [ "ERC20" ], "media": { "url": "https://cdn.openxswitch.com/public/logos/svg/eth.svg", "type": "image/svg+xml" }, "features": [], "blockchains": [ { "slug": "ethereum-sepolia", "name": "Ethereum", "symbol": "ETH", "decimals": 18, "onchain": { "protocol": "EVM", "chainId": 1 }, "nativeCurrency": { "name": "Ether", "symbol": "ETH", "decimals": 18 }, "isTestnet": false, "standards": [ "ERC20" ], "media": { "url": "https://cdn.openxswitch.com/public/logos/svg/eth.svg", "type": "image/svg+xml" }, "blockExplorer": "https://etherscan.io" } ] } ], "totalPage": 123, "pageNo": 123, "pageLimit": 123 } ``` > 💡 **Selecting Network and Asset Parameters** > > * Use the `symbol` (e.g., `"ETH"` or `"USDT"`) for the `token` parameter when initiating a withdrawal request. > * For the `blockchain` parameter, you can pass either the network `name` (e.g., `"Ethereum"`) or the network `slug` (e.g., `"ethereum-sepolia"`). Using the `name` is recommended for standard network routing unless targeting a specific testnet environment. ## Step 2: Obtain Source Wallet ID You must provide a valid `walletId` from which the assets will be debited. If you do not already have the wallet ID, you can retrieve it using either of the following endpoints depending on your application flow: ### Option A: Query Wallets by User ID If the source wallet is linked to a specific user entity, fetch all wallets associated with that `userId`: ```json theme={null} URL: https://api.openxswitch.com/v2/users/wallets?userId={userId} ``` ### Option B: List Account Wallets If you are operating across account-level wallets or treasury reserves, fetch all wallets provisioned under your workspace/account: ```json theme={null} URL: https://api.openxswitch.com/v2/wallets/list?accountId={accountId} ``` ### Sample Response (Common) ```json theme={null} { "success": true, "data": [ { "id": "8e6f5877-d71a-4017-a3eb-3d1d4464e274", "address": "0x1234567890123456789012345678901234567890", "blockchain": "ethereum", "protocol": "EVM", "network": "mainnet", "isEvmCompatible": true, "type": "smart_wallet", "intent": "deposit", "gaslessWithdraw": true, "autoSweep": true, "state": "LIVE", "custodyType": "DEVELOPER", "userId": "user_1", "accountId": "WALLET_ACCOUNT_ID", "workspaceId": "WORKSPACE_ID", "createdAt": "2022-01-01T00:00:00.000Z", "updatedAt": "2022-01-01T00:00:00.000Z", "decimals": 18, "name": "Wallet 1", "refId": "WALLET_REF_ID" } ], "totalPage": 123, "pageNo": 123, "pageLimit": 123 } ``` > **Tip:** Select and copy the `walletId` matching the target `blockchain` network and asset balance to pass into the withdrawal payload in Step 3. ## Step 3: Initiate a Token Withdrawal To execute a token transfer or external withdrawal, send a `POST` request to the `/v2/transactions/withdraw` endpoint. ```json theme={null} URL: https://api.openxswitch.com/v2/transactions/withdraw { "idempotencyKey": "0e472f6b-336b-4d4f-87d6-4f93e4e4e4e4", "walletId": "0e472f6b-336b-4d4f-87d6-4f93e4e4e4e4", "amount": "0.5", "withdrawalAddress": "0x1234567890123456789012345678901234567890", "token": "USDT", "blockchain": "ethereum", "refId": "txn_ref_123", "note": "This is a test transaction" } ``` ### Request Payload Fields * `idempotencyKey` *(string, **required**)*: Unique client string to prevent duplicate execution during retries. * `walletId` *(string, **required**)*: The source wallet initiating the transfer. * `amount` *(string, **required**)*: The nominal token or native currency quantity to send. * `withdrawalAddress` *(string, **required**)*: The destination blockchain address. * `token` *(string, **required**)*: Asset symbol (e.g., `USDT`, `ETH`). * `blockchain` *(string, **required**)*: Target network identifier. * `refId` *(string, optional)*: Client transaction reference ID for internal mapping. * `note` *(string, optional)*: Human-readable internal label or memo. ## Step 4: Fetch Transaction Details To monitor execution status, query the transaction endpoint using the `transactionId` returned in Step 3. Bash ```json theme={null} URL: https://api.openxswitch.com/v2/transactions?transactionId={transactionId} ``` ### Sample Response ```json theme={null} { "success": true, "data": { "id": "TRANSACTION_ID", "refId": "REF_ID", "idempotencyKey": "IDEMPOTENCY_KEY", "tokenName": "Bitcoin", "tokenSymbol": "BTC", "tokenTicker": "BTC", "tokenAddress": "0x1234567890123456789012345678901234567890", "decimals": 18, "isNative": true, "amount": { "formatted": "479000.10", "raw": "47900010" }, "totalAmount": { "formatted": "479000.10", "raw": "47900010" }, "chainDecimals": 18, "blockchain": "ethereum", "protocol": "EVM", "environment": "mainnet", "network": "ethereum-mainnet", "standard": "ERC20", "txType": "incoming", "txSubType": "DEPOSIT", "status": "pending", "fromAddress": "0x1234567890123456789012345678901234567890", "toAddress": "0x1234567890123456789012345678901234567890", "txHash": "0x1234567890123456789012345678901234567890", "totalFee": { "formatted": "479000.10", "raw": "47900010" }, "feeLevel": "normal", "feeToken": "ETH", "isBatch": false, "note": "Note", "triggerOrigin": "TRIGGER_ORIGIN", "transactionGroupId": "TRANSACTION_GROUP_ID", "confirmation": 1, "confirmed": true, "confirmedAt": "2022-01-01T00:00:00.000Z", "userId": "USER_ID", "walletId": "WALLET_ID", "accountId": "ACCOUNT_ID", "workspaceId": "WORKSPACE_ID" } } ``` # Set Up Wallet Infrastructure for Your Workspace Source: https://docs.openxswitch.com/guides/dev-guides/set-up-wallet-infrastructure-for-your-workspace By default, **Wallet Infrastructure** is automatically provisioned during onboarding for all newly created workspaces on the [OpenXSwitch Console](https://console.openxswitch.com/). However, if you are configuring an existing workspace that requires setup or manual activation, this guide will walk you through completing the configuration yourself. ### Prerequisites Before starting, ensure you have: * An active account on the [OpenXSwitch Console](https://console.openxswitch.com/). ## **The Plan** Setting up your Wallet Infrastructure involves three primary steps: 1. **Navigate:** Access the Wallet Infrastructure section in your dashboard settings. 2. **Identify Setup State:** Determine if your workspace needs access activation (**State A**) or just setup completion (**State B**). 3. **Provision:** Follow the corresponding steps to request access or complete the 2-minute initialization process. ### Step-by-Step Setup Guide **Step 1: Navigate to Wallet Infrastructure** 1. Log in to the [OpenXSwitch Console](https://console.openxswitch.com/) 2. Click on the workspace navigation dropdown menu in your dashboard header. 3. Select **Wallet Infrastructure** from the options. ![Console Navigation Open X Switch](https://mintcdn.com/openxswitch/u71QS_9yccsJuQIL/images/console-navigation--OpenXSwitch.png?fit=max\&auto=format\&n=u71QS_9yccsJuQIL\&q=85\&s=3720feb1d694a227d779bd005b330063) ![Openxswitch Platform Nav](https://mintcdn.com/openxswitch/D1N3WB4eEBEMI_Ex/images/openxswitch-platform-nav.png?fit=max\&auto=format\&n=D1N3WB4eEBEMI_Ex\&q=85\&s=ce6037573bef3df6455328c8df198ef2) **Step 2: Complete the Infrastructure Setup** Depending on your workspace status, your screen will display one of two setup states: * **State A: Access Activation Needed** * This state means your workspace does not yet have access to the Wallet Infrastructure feature. Activation must be enabled by the OpenXSwitch team. * You will see options on your screen * Click the on-screen link to **contact us** or **book a call** with our technical team ![Wallet Infrastructure Access Required Open X Switch](https://mintcdn.com/openxswitch/u71QS_9yccsJuQIL/images/wallet-infrastructure-access-required-OpenXSwitch.png?fit=max\&auto=format\&n=u71QS_9yccsJuQIL\&q=85\&s=47161ba16f1f88e80216246701d50651) * **State B: Complete Ongoing Setup** * This state means your workspace already has access, but the infrastructure setup has not yet been finalized. * Simply click the **"Continue Setup"** button. * Wait at least **2 minutes** for the system to finalize background provisioning before refreshing or leaving the page. ![Continue Wallet Infrastructure Setup Open X Switch](https://mintcdn.com/openxswitch/u71QS_9yccsJuQIL/images/continue-wallet-infrastructure-setup---OpenXSwitch.png?fit=max\&auto=format\&n=u71QS_9yccsJuQIL\&q=85\&s=ab924ce978ceafc9285f1b0323a6bc46) ![Wait For Wallet Infrastructure Setup Open X Switch](https://mintcdn.com/openxswitch/u71QS_9yccsJuQIL/images/wait-for-wallet-infrastructure-setup--OpenXSwitch.png?fit=max\&auto=format\&n=u71QS_9yccsJuQIL\&q=85\&s=932ed9612f94badcb7a855e8498b3c69) ### Next Steps Once your Wallet Infrastructure is active, set up an [account](/guides/dev-guides/get-started-with-account-management) for a funds segregator configured with custom auto-sweep, routing rules, and security controls to organize your incoming assets * **[Create and Manage Users](/guides/dev-guides/create-and-manage-users):** Provision end-user identities to track activity, stats, and balances. * **[Create and Manage Wallets](/guides/dev-guides/create-and-manage-wallets):** Deploy chain-specific smart wallets or deposit addresses linked directly to your users. * [Send and Transfer Tokens](/guides/dev-guides/send-and-transfer-tokens): Programmatically move digital assets from a specified wallet address to an external or internal recipient address. # Setup Tron Gas Manager Source: https://docs.openxswitch.com/guides/dev-guides/setup-tron-gas-manager The Tron Gas Manager automates gas sponsorship, resource allocation (Energy and Bandwidth), and address activation for TRON transactions. By pre-funding a dedicated workspace wallet with TRX, the platform automatically manages resource delegation to eliminate native gas friction for end-users executing TRC-20 transfers. ## Prerequisites Before you begin, ensure that you have: * An active API key with the necessary write permissions configured for the target environment (Sandbox or Live). Access to the OpenXSwitch Console with workspace administrator privileges. ## The Plan In this guide, we will cover: 1. **Navigating to Tron Gas Manager** 2. **Activating the Gas Manager on your workspace** 3. **Funding the Gas Manager** ## Step 1: Navigate to Tron Gas Manager 1. Log into the **OpenXSwitch Console**. 2. From the left navigation menu, navigate to **Wallet Infrastructure** → **Settings** → **Tron Gas Manager**. ![Tron Gas Manager Setup](https://mintcdn.com/openxswitch/vWOUpcCoc_vgm9pK/images/Tron-Gas-Manager-setup.png?fit=max\&auto=format\&n=vWOUpcCoc_vgm9pK\&q=85\&s=c3ef00563b6ffb7a74fd8f91889006fb) ## Step 2: Activate the Gas Manager 1. Click the **Setup Gas Manager** button. 2. A confirmation modal will appear detailing the automated delegation workflow. 3. Confirm the setup to generate a dedicated TRON wallet specifically assigned to manage workspace gas sponsorship and account activations. ## Step 3: Fund the Gas Manager ~~To~~ power automated resource delegation and cover mandatory 1 TRX account activation fees, the dedicated Tron Gas Manager wallet must hold a TRX balance: 1. Copy the generated **Tron Gas Manager** wallet address from the console. 2. Deposit native TRX into the address: 1. **Testnet (Nile):** Request testnet TRX via the [Nileex TRON Faucet](https://nileex.io/join/getJoinPage). 2. **Mainnet:** Transfer TRX directly to the dedicated wallet address. 3. Once the deposit is confirmed on-chain, the Tron Gas Manager automatically handles Energy delegation, Bandwidth allocation, and account activation whenever workspace addresses initiate USDT or TRC-20 token transfers. ![Tron Gas Manager Overview](https://mintcdn.com/openxswitch/vWOUpcCoc_vgm9pK/images/Tron-Gas-Manager-Overview.png?fit=max\&auto=format\&n=vWOUpcCoc_vgm9pK\&q=85\&s=a06296de9f983d9ead74b5a9c3e3f73f) ## Step 4: Next Steps * **[Create and Manage Wallets](/guides/dev-guides/create-and-manage-wallets):** Deploy chain-specific smart wallets or deposit addresses linked directly to your users. * [Send and Transfer Tokens](/guides/dev-guides/send-and-transfer-tokens): Programmatically move digital assets from a specified wallet address to an external or internal recipient address. # Idempotent Requests Source: https://docs.openxswitch.com/guides/idempotent-request OpenXSwitch Wallet Infrastructure APIs support the `idempotencyKey` parameter for endpoints that create new resources or initiate state-changing operations. Using an idempotency key allows you to safely retry API requests without accidentally executing duplicate operations during network timeouts, client retries, or unexpected network failures. ### How Idempotency Works When retrying a request with an existing `idempotencyKey`, OpenXSwitch executes the operation **only once**. Subsequent requests containing the same key will return the original execution result rather than re-running the operation. * **Key Parameter:** Send a unique string identifier via the `idempotencyKey` parameter. * **Guaranteed Execution:** Ensures at-most-once processing across resource creation and transaction execution endpoints. ### Supported Operations The `idempotencyKey` parameter is supported on key state-changing endpoints within Wallet Infrastructure: * **Create Account:** Prevents creating duplicate Account containers during account setup. * **Create Wallet:** Guarantees single-wallet provisioning per provisioning request. * **Create Transfer Transaction:** Prevents double-spending or duplicate transfer execution during network retries. > **Best Practice:** Generate a unique v4 UUID for every state-changing request. If a request times out or receives a 5xx error response, safely re-send the exact request using the same `idempotencyKey`. # Migration From V1 To V2 Source: https://docs.openxswitch.com/guides/migration-from-v1-to-v2 This walkthrough guides you step-by-step through migrating your infrastructure from **OpenXSwitch v1** to **OpenXSwitch v2**. **v2** introduces an upgraded smart account architecture delivering gasless operations, native testnet execution, auto-sweeping rules, native transaction batching, and isolated account containers. ## 🏗 Summary of Changes | **Feature / Component** | **v1** | **v2** | | - | - | - | | **User Onboarding** | `sub-wallet` model | `users` primitive | | **Address Generation** | Token-specific address generation | Account & multi-chain wallets model | | **Testing Environment** | Off-chain simulation sandbox | Native testnet execution | | **Batch Transactions** | Not supported | Native batching support | | **Smart Wallets** | Not supported | Built-in smart contract wallet support | | **Gasless Transactions** | Not supported | Built-in Paymaster & Fee-Payer sponsorship | | **Accounts** | Not supported | Container model for logical fund isolation | ## Account Architecture Overview In v1, the architecture relied on a **Prime Wallet and Sub-Wallet** model (1:N), where a single central Prime Wallet managed liquidity and treasury operations across multiple sub-wallets. In v2, infrastructure hierarchy transitions to an **Accounts** container model: * **Account-Based Isolation:** You can create an account specifically for your application or business unit. All wallets generated can be attached directly to that account. * **Fund & Access Control Segregation:** This structure ensures complete separation of funds, permissions, policies, and operational controls at both the Account and Wallet levels. Within this new architecture, accounts typically fall into two categories: * **Settlement Account:** Serves as the primary operational or treasury container for managing enterprise funds, sweeps, and global balances. * **Users Account:** Acts as an isolated container assigned to individual end-users to manage dedicated smart wallet instances and balances. ## Base URL Updates Update your base request URL across all API client configurations: * **v1 Base URL**: `[https://api.openxswitch.com/v1]` * **v2 Base URL**: `[https://api.openxswitch.com/v2]` ## Step-by-Step Migration Walkthrough ### Step 1: User Onboarding (`sub-wallet` ➔ `users`) In **v1**, user identities were represented as `sub-wallet` records. In **v2**, this primitive is renamed to `users`. Existing sub-wallet IDs are maintained throughout the migration. #### 🔄 Action: `Create Sub-Wallet` ➔ `Create User` * **v1** : `POST /v1/sub-wallet/create` * **v2**: `POST /v2/users` ##### Request Changes Replace `clientUserId` with `refId`, rename `name` to `displayName`, and drop `canTrade`. **v1 (**`POST /v1/sub-wallet/create`**):** ```json Request highlight={3-5} theme={null} { "email": "sam.vwede@example.com", "name": "Sam Vwede", // [!code --] "clientUserId": "client_001", // [!code --] "canTrade": true // [!code --] } ``` ```json Response theme={null} { "id": "63e1b8c2f18e310bb11f8a9c", "clientUserId": "client_001", "email": "walletName@openxswitch.org", "name": "OX Wallet", "isActive": "true", "language": "en_US", "canTrade": false, "createdAt": "2025-01-17T10:00:00Z", "updatedAt": "2025-01-17T12:00:00Z", "workspaceId": "63e1b8c2f18e310bb11f8a9c" } ``` **v2 (**`POST /v2/users`**):** ```json Request highlight={3-4} theme={null} { "email": "sam.vwede@example.com", "displayName": "Sam.Vwede", // [!code ++] "refId": "client_001" // [!code ++] } ``` ```json Response theme={null} { "id": "63e1b8c2f18e310bb11f8a9c", "refId": "client_001", "email": "sam.vwede@example.com", "displayName": "Sam.Vwede", "isActive": "true", "createdAt": "2025-01-17T10:00:00Z", "updatedAt": "2025-01-17T12:00:00Z", "workspaceId": "63e1b8c2f18e310bb11f8a9c" } ``` > 📘 **Migration Note** > > Existing sub-wallets maintain their original identifiers during migration. To retrieve or update migrated records, replace `/v1/sub-wallet?subWalletId={id}` with `/v2/users?userId={id}` in your endpoints. ### Step 2: Blockchain Wallets & Addresses (`sub-wallet/address` ➔ `wallets`) In v1, distinct **addresses** had to be generated per **token** and **network**. In v2, a single **wallet** address handles **deposits** across all supported tokens on a given network protocol. #### 🔄 Action: `Generate Deposit Address` ➔ `Create Smart Wallet` * **v1**: `POST /v1/sub-wallet/address` * **v2**: `POST /v2/wallets` ##### Request Changes Pass `userId` and `accountId` directly in the payload, provide an `idempotencyKey`, and designate the specific target blockchain network string (e.g., `ethereum`). **v1 (**`POST /v1/sub-wallet/address`**):** ```json Request highlight={2-4} theme={null} { "subWalletId": "63e1b8c2f18e310bb11f8a9c", // [!code --] "coin": "USDT", // [!code --] "chain": "Ethereum" // [!code --] } ``` ```json Response theme={null} { "id": "34303043....", "coin": "Bitcoin", "chain": "Ethereum", "network": "Mainnet", "address": "0x123456789abcdef", "workspaceId": "60f7d4b5b4d5c909a85b8d7e", "createdAt": null, "walletId": "63e1b8c2f18e310bb11f8a9c", "tag": "Memo123" } ``` **v2 (**`POST /v2/wallets`**):** ```json Request highlight={2-8} theme={null} { "idempotencyKey": "8d5be8f5-a8e7-4e8a-b715-0e7d6f2a6d04", // [!code ++] "accountId": "123e4567-e89b-12d3-a456-426614174000", // [!code ++] "blockchain": "ethereum", // [!code ++] "name": "user_1 Wallet", // [!code ++] "refId": "ref_user_1", // [!code ++] "userId": "user_1", // [!code ++] "autoSweep": false // [!code ++] } ``` ```json Response theme={null} { "id": "8e6f5877-d71a-4017-a3eb-3d1d4464e274", "address": "0x1234567890123456789012345678901234567890", "blockchain": "ethereum", "protocol": "EVM", "network": "mainnet", "isEvmCompatible": true, "type": "smart_wallet", "intent": "deposit", "gaslessWithdraw": true, "autoSweep": true, "state": "LIVE", "custodyType": "DEVELOPER", "userId": "user_1", "accountId": "WALLET_ACCOUNT_ID", "workspaceId": "WORKSPACE_ID", "createdAt": "2022-01-01T00:00:00.000Z", "updatedAt": "2022-01-01T00:00:00.000Z", "decimals": 18, "name": "Wallet 1", "refId": "WALLET_REF_ID" } ``` ### Step 3: Checking Balances (`sub-wallet/assets` ➔ `users/balances`) #### 🔄 Action: `Get Sub-Wallet Assets` ➔ `Get User Balances` * **v1** : `GET /v1/sub-wallet/assets?subWalletId={id}` * **v2** : `GET /v2/users/balances?userId={id}` ##### Response Comparison v2 provides comprehensive token metadata (standards, contract addresses, raw/formatted amounts) instead of single-string outputs. ```json V1 Response theme={null} { "coin": "USDT", "balance": "1.234", "frozen": "0.123", "updatedAt": "2023-01-01T00:00:00Z" } ``` ```json V2 Response theme={null} { "token": { "name": "Tether USD", "symbol": "USDT", "blockchain": "ethereum", "isNative": true, "standard": "ERC-20", "tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7", "decimals": 6 }, "amount": { "formatted": "479000.10", "raw": "47900010" }, "environment": "mainnet", "createdAt": "2025-04-02T17:20:42.160Z", "updatedAt": "2025-04-02T17:20:42.160Z" } ``` > ⚠️ **Deprecation Notice: Internal Off-Chain Transfers** > > Off-chain free internal transfers available in v1 are deprecated. In v2, all asset movements are executed transparently on-chain. ### Step 4: Outbound Transactions (`withdraw/create` ➔ `transactions/withdraw`) #### 🔄 Action: `Create Sub-Wallet Withdrawal` ➔ `Execute Withdrawal Transaction` * **v1**: `POST /v1/withdraw/create` * **v2**: `POST /v2/transactions/withdraw` ##### Request Changes Pass `walletId` instead of `subWalletId`, supply `toAddress` instead of `withdrawalAddress`, and include an `idempotencyKey`. ```json v1 Request [v1/withdraw/create] theme={null} { "subWalletId": "63e1b8c2f18e310bb11f8a9c", "coin": "USDT", "chain": "Ethereum", "withdrawalAddress": "0x1234567890123456789012345678901234567890", "amount": "0.5", "clientTxId": "txn_ref_123", "fee": "0.01", "memo": "Test transfer" } ``` ```json v2 Request [/v2/transactions/withdraw] theme={null} { "idempotencyKey": "0e472f6b-336b-4d4f-87d6-4f93e4e4e4e4", "walletId": "0e472f6b-336b-4d4f-87d6-4f93e4e4e4e4", "amount": "0.5", "withdrawalAddress": "0x1234567890123456789012345678901234567890", "token": "USDT", "blockchain": "ethereum-mainnet", "refId": "txn_ref_123", "note": "This is a test transaction", "metadata": { "employeeId": "EMP001" } } ``` #### 🔄 Action: `Fetch Transaction History` Transaction lookup endpoints have been unified under a consolidated `GET /v2/transactions` resource with filtering options: * **Fetch Deposits**: * **v1**: `GET /v1/sub-wallet/deposit` * **v2**: `GET /v2/transactions?txType=incoming` * **Fetch Withdrawals**: * **v1**: `GET /v1/sub-wallet/withdraw` * **v2**: `GET /v2/transactions?txType=outgoing` ### Step 5: Instant Swaps (`instant-swap` ➔ `swap`) #### 🔄 Action: `Execute Instant Swap` ➔ `Create Swap Transaction` * **v1**: `POST /v1/instant-swap` * **v2**: `POST /v2/swap` Here is the revised Migration Guide tailored specifically to your exact platform updates: ## 🔄 What Does This Mean for Existing Integrations? If you are migrating your existing integration to the upgraded infrastructure, use this guide to update your endpoints, identifiers, wallet provisioning, and webhook event handlers. ### 👤 1. Users Infrastructure (Zero-Friction User Migration) * **No User Re-creation Needed:** You do **not** need to re-create users for your existing customers. * **Reused Identifiers:** All existing sub-wallets created via the API have been migrated automatically. Your previous `subWalletId` now acts directly as the new `userId`. * **What to Change:** Update the base URL endpoint in your requests—your existing sub-wallet IDs continue to work seamlessly without additional mapping. ### 👛 2. Address & Wallet Management In the updated model, a user utilizes a single wallet container across supported assets, requiring you to provision chain-specific wallet addresses using the updated wallet creation endpoint. * **Provisioning Wallets:** Call the new wallet creation endpoint per supported chain: JSON ```json theme={null} { "idempotencyKey": "8d5be8f5-a8e7-4e8a-b715-0e7d6f2a6d04", "accountId": "123e4567-e89b-12d3-a456-426614174000", "blockchain": "ethereum", "name": "user_1 Wallet", "refId": "ref_user_1", "userId": "user_1", "autoSweep": false } ``` * `accountId`**:** Retrieve your Account ID by completing the workspace setup via the [Accounts & Workspace Console](https://www.google.com/search?q=https://console.openxswitch.com/). * `userId`**:** Pass your existing `subWalletId` directly into this field. * **EVM Address Consistency:** To ensure a user shares the exact same blockchain address across all EVM-compatible chains, pass the same `refId` string for every EVM chain provisioning request. * **Wallet-Level Auto-Sweep:** Auto-sweep capabilities are now configured directly at the individual wallet level. Set `"autoSweep": true` if you want automatic fund sweeps enabled for that specific wallet. ### 💸 3. Transactions * **Endpoint Updates:** Update all payment, deposit, and withdrawal endpoints to the new transaction URL paths. * **Idempotency Headers/Fields:** Pass standard idempotency keys on state-changing transaction endpoints to ensure safe retry logic. ### 🔔 4. Webhook Event Consumption Refer to the complete [Webhook Event Documentation](/webhook/webhook-events) for the updated topic structure and full payload schema reference. * **Update Event Names:** Update your webhook listeners to match the new topic identifiers (e.g., replace legacy topics with `wallets:deposit.success`, `wallets:withdraw.success`, `wallets:swap.success`). * **Update Payload Parsing:** Modify your application code to handle the updated event payload schema (e.g., parsing `params.amount.value`, `params.amount.rawValue`, and structured `params.wallet` objects). # Overview Source: https://docs.openxswitch.com/guides/overview Developer guides, and migration references ## **Browse Guides** > [card] > [card] > [card] > [card] # Pagination Source: https://docs.openxswitch.com/guides/pagination OpenXSwitch API uses pagination for REST endpoints that return array-based responses. Pagination allows applications to retrieve large datasets in smaller, structured batches. Endpoints that return lists such as deposits, withdrawals, transactions, wallets, or swaps support pagination through the `pageNo` and `pageLimit` query parameters. By default, endpoints return the most recent records first. > The base endpoint is: `https://api.openxswitch.com` ### Example Request ```javascript theme={null} GET {base}/v2/wallets/list?pageNo=1&pageLimit=20 ``` Example response: ```json theme={null} { "pageNo": 1, "pageLimit": 20, "totalPage": 1, "data": [] } ``` ### Pagination Parameters | Parameter | Default | Description | | :- | :- | :- | | `pageNo` | `1` | Specifies the current page number to retrieve. | | `pageLimit` | `10` | Specifies the number of records returned per request. | ### Pagination Response Fields | Field | Description | | :- | :- | | `pageNo` | Current page number returned in the response. | | `pageLimit` | Number of records returned per page. | | `totalPage` | Total number of available pages for the request. | | `data` | Array containing the requested records. | ### Usage Notes * Pagination is supported only on endpoints that return array-based results. * Results are typically returned in descending order based on creation time or latest activity. * To retrieve additional records, increment the `pageNo` value in subsequent requests. * The `pageLimit` parameter controls the maximum number of records returned per request. # Pricing Source: https://docs.openxswitch.com/guides/pricing A comprehensive guide to understanding OpenXSwitch’s pricing, wallet capacity models, billing tiers, and usage-based scaling. #### How We Charge OpenXSwitch uses a flexible dual-billing model designed to support projects from early development through enterprise scale: 1. **Monthly Subscriptions:** Predictable monthly plans with included wallet limits and transfer allowances. Best for startups and steady operations. 2. **One-Time Setup Packages:** Pay-as-you-go capacity packages with **no recurring monthly fees**. Best for high-volume deployments or bulk wallet provisioning. See [How One-Time Setup Package Works](/guides/pricing#how-one-time-setup-package-works) for details. #### Pricing Tiers Choose the billing tier that fits your application's transaction volume and infrastructure needs: | Feature / Tier | Basic Plan | **Starter Mini** | Custom / Enterprise Plan | | - | - | - | - | | **Monthly Fee** | **\$99 / month** | **\$159 monthly fee** | **Custom Pricing** | | **Supported Blockchains** | All supported chains | All supported chains | All supported chains | | **Networks** | Testnet & Mainnet | Testnet & Mainnet | Testnet & Mainnet | | **User & Admin Accounts** | Unlimited | Unlimited | Unlimited | | **Included Wallet Allowance** | 2,500 wallets | 6,000 wallets | Custom wallet allocation | | **Monthly Outgoing Volume** | Uncapped | Uncapped | Custom Threshold (Transactions > \$1M USD) | | **API Calls** | Unlimited | Unlimited | Unlimited | | **Overage Rate (Volume)** | None | None | Volume discount rates (starts from 0.10%) | | **Support** | Dedicated 24/7 Support | Dedicated 24/7 support | Dedicated Account Manager & SLA | #### **Included Features Across All Tiers:** * Full access to **Stock Tokens** API and real-time Chainlink price feeds. * **Swap & Trading API** access (same-chain and cross-chain execution). * **Auto-Sweep** treasury workflows and rule automation. * Real-time **Blockchain Events** & Webhook infrastructure. * ERC-4337 **Gas Station & Paymaster** sponsorship infrastructure. ## Pricing FAQ > [accordion] **Wallet Usage & Metering Model** > > OpenXSwitch tracks wallet utilization based on provisioned wallets (wallets created, regardless of whether they are active or idle) to ensure fair resource allocation. > [accordion] **How Wallet Provisioning Works** > > * **Creation-Based Metering:** OpenXSwitch charges based on wallets created within your workspace—we do not bill based on monthly active wallet status. > * **Multi-Chain Address Allocation Example:** > * EVM chains share a single unified address. > * Solana and Bitcoin issue distinct single-chain addresses. > * **User Capacity Calculation:** If your application provisions 1 EVM address, 1 Solana address, and 1 Bitcoin address per user (3 total wallet addresses), the **2,500 wallet allowance** in the Basic Plan allows you to fully serve **\~833 active end-users** across all three ecosystems without overage. > * **Fixed Wallet Package Guarantee:** Clients on a One-Time Setup Package incur **no wallet overage fees**; your provisioned wallets remain valid within your purchased capacity threshold. > [accordion] **How Volume Overages Work** > > Transfer volume is calculated based on the total USD-equivalent value of outgoing on-chain transfers and withdrawals across all supported networks. > > Monthly transfer volume across **Basic** and **Starter Mini** plans is **uncapped** with **zero overage fees**. Volume-based overages apply exclusively to high-volume custom tiers when monthly outgoing transfer volume exceeds **\$1,000,000 USD** (billed at overage rates starting from **0.10%** on volume above \$1M). > [accordion] **How One-Time Setup Package Works** > > For organizations that prefer no monthly commitments or need large upfront wallet provisioning without monthly subscription overhead, OpenXSwitch offers pre-packaged usage plans: > > * **Flexible Wallet Pricing:** Bulk wallet provisioning starting at **\$0.50 per wallet**. > > * **No Monthly Commitment:** One-time package purchases include access to all platform features, unlimited API calls, auto-sweep workflows, stock token access, and swap APIs without requiring a monthly recurring plan fee. > > > [card] Enterprise Bulk Example > > > > A fintech platform migrating to OpenXSwitch can fulfill a 10,000-wallet requirement with zero recurring monthly subscription fees. By purchasing an Enterprise One-Time Setup Package for \$5,000 (\$0.50/wallet), they unlock full infrastructure access for all 10,000 wallets without ongoing maintenance or overage charges. To configure a custom one-time package or enterprise deployment, contact our sales team at [sales@openxswitch.com](https://www.google.com/search?q=mailto%3Asales%40openxswitch.com). # Introduction Source: https://docs.openxswitch.com/index Build and scale crypto and stablecoin products with APIs for wallet management, gasless transactions, payments, treasury operations, and programmable asset movement across multiple blockchain networks. **OpenXSwitch** is building an infrastructure that **abstracts** wallets, gas, liquidity, and blockchain **complexity** into programmable financial primitives that developers and businesses can integrate globally. ### Use Cases Build and operate: * **Tokenized Stocks & RWA Investment Infrastructure** *(New)* * Stablecoin payment applications * Embedded wallet experiences * Global payout infrastructure * Treasury and liquidity systems * Exchanges and brokerage infrastructure * Gasless consumer applications * Cross-border settlement systems * Wallet automation platforms * Developer and fintech platforms > [!TIP] > > 📘 **Built-in Gas Infrastructure**\ > OpenXSwitch includes built-in **gas management** and **transaction** **sponsorship** across supported blockchain networks, abstracting native gas mechanics and simplifying transaction execution. ### Common Tasks | Task | Description | | :- | :- | | Create Wallets | Provision custodial wallets and programmable smart wallets for users and treasury operations. | | Send Gasless Transactions | Execute sponsored and gas-abstracted blockchain transactions. | | Trade Tokenized Stocks | Execute on-chain trades and transfers for stock tokens and real-world assets via Robinhood Chain. | | Execute Stablecoin Payments | Send and receive stablecoin payments programmatically. | | Automate Treasury Operations | Configure auto-sweep, routing, settlement, and liquidity workflows. | | Swap Assets | Execute instant asset swaps across supported currencies. | | Monitor Transactions | Track deposits, withdrawals, transfers, and transaction lifecycle events. | | Configure Webhooks | Receive real-time notifications for wallet and transaction events. | | Manage API Access | Create API keys, configure permissions, and manage operational access controls. | ### Developer Experience OpenXSwitch is designed for developers building scalable financial and blockchain applications with **familiar workflows**, **bank-grade security**, and **Web2-like** user experiences on top of blockchain infrastructure. The platform includes: * RESTful APIs * Webhook infrastructure * Sandbox and production environments * Multi-chain wallet provisioning (including EVM, Bitcoin, Tron, Solana, and Robinhood Chain) * Gas abstraction infrastructure * Programmable transaction execution * Operational wallet tooling * Unified infrastructure management # Introduction Source: https://docs.openxswitch.com/introduction Build and scale crypto and stablecoin products with APIs for wallet management, gasless transactions, payments, treasury operations, and programmable asset movement across multiple blockchain networks. **OpenXSwitch** is building an infrastructure that **abstracts** wallets, gas, liquidity, and blockchain **complexity** into programmable financial primitives that developers and businesses can integrate globally. ### Use Cases Build and operate: * **Tokenized Stocks & RWA Investment Infrastructure** *(New)* * Stablecoin payment applications * Embedded wallet experiences * Global payout infrastructure * Treasury and liquidity systems * Exchanges and brokerage infrastructure * Gasless consumer applications * Cross-border settlement systems * Wallet automation platforms * Developer and fintech platforms > [!TIP] > > 📘 **Built-in Gas Infrastructure**\ > OpenXSwitch includes built-in **gas management** and **transaction** **sponsorship** across supported blockchain networks, abstracting native gas mechanics and simplifying transaction execution. ### Common Tasks | Task | Description | | :- | :- | | Create Wallets | Provision custodial wallets and programmable smart wallets for users and treasury operations. | | Send Gasless Transactions | Execute sponsored and gas-abstracted blockchain transactions. | | Trade Tokenized Stocks | Execute on-chain trades and transfers for stock tokens and real-world assets via Robinhood Chain. | | Execute Stablecoin Payments | Send and receive stablecoin payments programmatically. | | Automate Treasury Operations | Configure auto-sweep, routing, settlement, and liquidity workflows. | | Swap Assets | Execute instant asset swaps across supported currencies. | | Monitor Transactions | Track deposits, withdrawals, transfers, and transaction lifecycle events. | | Configure Webhooks | Receive real-time notifications for wallet and transaction events. | | Manage API Access | Create API keys, configure permissions, and manage operational access controls. | ### Developer Experience OpenXSwitch is designed for developers building scalable financial and blockchain applications with **familiar workflows**, **bank-grade security**, and **Web2-like** user experiences on top of blockchain infrastructure. The platform includes: * RESTful APIs * Webhook infrastructure * Sandbox and production environments * Multi-chain wallet provisioning (including EVM, Bitcoin, Tron, Solana, and Robinhood Chain) * Gas abstraction infrastructure * Programmable transaction execution * Operational wallet tooling * Unified infrastructure management # Platform Overview Source: https://docs.openxswitch.com/platform-overview OpenXSwitch provides institutional-grade digital asset custody, wallet infrastructure, and programmable wallet orchestration for enterprises, fintechs, and global platforms. ### Platform Stack for Partners | | | | - | - | | RESTful API | An OpenAPI 3.0 RESTful API designed to interact with the OpenXSwitch platform infrastructure, including wallets, programmable accounts, transactions, automation, and blockchain operations. | | OpenXSwitch Console | A web-based operational dashboard for managing integrations, wallets, teams, API keys, transaction monitoring, compliance workflows, billing, and infrastructure configuration. | ### **How the platform is structured** OpenXSwitch is designed as a modular platform composed of interoperable building blocks that work independently or together depending on your use case. ![Openxswitch Platform Section Nav](https://mintcdn.com/openxswitch/D1N3WB4eEBEMI_Ex/images/openxswitch-platform-nav.png?fit=max\&auto=format\&n=D1N3WB4eEBEMI_Ex\&q=85\&s=ce6037573bef3df6455328c8df198ef2) | **Section** | **Description** | | :- | :- | | **Account** | Organizational and administrative workspace for managing users, security, teams, webhooks, and API configuration. This is the default section users access after login. | | **Wallet Infrastructure** | Custodial and programmable wallet infrastructure for creating and managing wallets, asset transfers, automation, treasury operations, transaction monitoring, gasless transactions, transaction sponsorship, stablecoin payments, auto-sweep workflows, and seamless on-chain user experiences. | | **Compliance Engine** | Compliance and monitoring tools for transaction risk analysis, wallet screening, address monitoring, alerts, and watchlist management. | ### Why OpenXSwitch? | | | | :- | :- | | **Streamlined** | OpenXSwitch abstracts the technical, operational, and financial complexity of blockchain infrastructure, enabling businesses to build and scale digital asset products faster with lower operational overhead. | | **Easy-to-Use APIs** | Developer-friendly APIs designed for rapid onboarding and scalable production usage, without requiring deep blockchain expertise or treasury management infrastructure. | | **Frictionless User & Developer Experience** | Enable seamless stablecoin and wallet interactions without forcing users to manage gas fees, native tokens, seed phrases, or complex blockchain approval flows. | | **Programmable Wallet Infrastructure** | Build advanced wallet experiences with transaction sponsorship, automation, programmable execution flows, and smart account orchestration. | | **Built for Scale** | Designed for enterprises, fintechs, exchanges, payment platforms, and global applications operating across multiple blockchain ecosystems. | # API Permissions Source: https://docs.openxswitch.com/platform/api-permissions OpenXSwitch uses a granular permission-based API access system to control how applications interact with platform infrastructure, wallets, transactions, and operational services. Each API key is assigned specific permissions that determine which actions and endpoints can be accessed within a workspace. > API keys are environment-specific.\ > Sandbox API keys only work within the `tesnet` environment, while separate live API keys are required for `mainnet` usage. ### Permission Levels | Permission | Description | | :- | :- | | `read` | Grants read-only access to accounts, wallets, balances, and transaction activity. | | `write` | Required for creating or modifying smart account resources and configurations. | | `withdraw` | Allows external withdrawals and asset transfers from smart wallets. Requires `write` permission. | ### Permission Dependencies Certain operations require multiple permissions to be assigned together. | Action | Required Permissions | | :- | :- | | Wallet Withdraw | `write` + `withdraw` | | Swaps | `write` + `swap` | ### Permission Validation Before processing a request, OpenXSwitch validates that the API key has the required permissions for the requested action. Example response when permissions are missing: ```json theme={null} { "statusCode": 403, "timestamp": "2026-05-20T10:00:00.000Z", "path": "/v2/transactions/withdraw", "message": "The API key does not have 'withdraw' permission." } ``` ### API Key Management API keys can be created and managed through: **Accounts → API Management** Supported management operations include: * Create API keys * Assign permissions * Rotate credentials * Revoke compromised keys * Monitor API usage * View API activity logs ### Security Considerations & Best Practices | Security Practice | Description | | :- | :- | | Principle of Least Privilege | Only assign the minimum permissions required for an application or integration. | | Secure Storage | Store API keys securely using encrypted secret managers or vault infrastructure. | | API Key Rotation | Periodically rotate sensitive API credentials. | | IP Whitelisting | Restrict API access to approved IP addresses where supported. | | Audit Monitoring | Monitor API activity logs for suspicious or unauthorized access patterns. | | Withdrawal Restrictions | Limit access to withdrawal permissions to trusted operational systems only. | # Manage Team Members Source: https://docs.openxswitch.com/platform/manage-team-members OpenXSwitch provides Team Management features that enable businesses to securely collaborate across operational, engineering, compliance, and finance teams through role-based access controls and workspace-level permissions. This allows organizations to manage access to wallets, APIs, webhooks, transactions, compliance tooling, and operational infrastructure while maintaining security and auditability. ### Key Features * **Create & Manage Teams** - Organize users into teams for structured operational collaboration. * **Role-Based Access Control (RBAC)** - Assign predefined roles with scoped permissions. * **Secure API & Webhook Management** - Restrict access to sensitive infrastructure configurations. * **Multi-User Workspace Access** - Allow multiple users to securely operate within a single business workspace. * **Audit Logging** - Track operational actions, permission changes, and team activities. * **Granular Security Controls** - Limit access to wallets, transactions, and administrative actions. ### How to Add a Team Member To enable collaboration within your organization, administrators can invite users into a workspace through the OpenXSwitch Console. ### Steps to Invite a Team Member 1. Navigate to **Accounts → Team** within the OpenXSwitch Console. 2. Click **New Team Member**. 3. Enter: * Team name * Member email address 4. Select a role: * Administrator * Operator * Developer * Viewer 5. Click **Confirm & Submit**. The invited user will receive an email invitation to join the workspace. ### Role & Access Management OpenXSwitch uses Role-Based Access Control (RBAC) to ensure users only have access to the resources and actions required for their responsibilities. | Role | Permissions | | :- | :- | | **Administrator** | Full workspace access including team management, API management, wallet operations, billing, compliance tooling, and member invitations/removals. | | **Operator** | Manages wallets, transactions, treasury operations, automation rules, and operational workflows. | | **Developer** | Access APIs, webhooks, transaction monitoring, and developer tooling. Cannot manage team or administrative settings. | | **Viewer** | Read-only access to dashboards, transaction history, analytics, and operational reporting. Cannot perform state-changing actions. | ### Security & Compliance | Feature | Description | | :- | :- | | **Granular Access Control** | Restricts access to sensitive operational infrastructure and financial actions. | | **Audit Logs** | Monitors team activity, permission changes, authentication events, and operational actions. | | **Secure API Key Management** | Administrators can create, rotate, revoke, and manage API credentials securely. | | **Workspace-Level Isolation** | Team permissions and operational access are isolated per business workspace. | | **Operational Security** | Designed to support enterprise operational controls and internal governance requirements. | ### Best Practices * Assign users the minimum required permissions. * Restrict administrative privileges to trusted personnel only. * Rotate API credentials periodically. * Monitor audit logs for sensitive operational changes. # Supported Assets Source: https://docs.openxswitch.com/platform/supported-assets OpenXSwitch **Wallet Infrastructure** supports native blockchain assets across all supported networks by default. In addition to native assets, **Wallet Infrastructure** supports a growing set of tokens for: * Deposits * Withdraws > Use the [Get Supported tokens with blockchain](https://docs.openxswitch.com/api-reference/chains-&-tokens/get-supported-tokens-with-chains) endpoint to retrieve the latest supported assets, and chains. ### Assets | Token | Blockchain | Mainnet | Testnet | | :- | :- | - | - | | `BTC` | `Bitcoin` | ✓ | ✓ | | `ETH` | `EVM` `Ethereum`, `Base`, `Arbitrum One`, `Optimism`, `Linea`, `Robinhood`) | ✓ | ✓ | | `POL` | `Polygon` | ✓ | ✓ | | `SOL` | `Solana` | ✓ | ✓ | | `TRX` | `Tron` | ✓ | ✓ | | `BNB` | `Binance Smart Chain` | ✓ | ✓ | | `AVAX` | `Avalanche` | ✓ | — | | `MON` | `Monad` | ✓ | — | | `USDT` | `EVM`, `Solana, Tron` | ✓ | — | | `USDC` | `EVM`, `Solana` | ✓ | ✓ | | `cNGN` | `Ethereum`, `Polygon`, `BNB`, `Base`, `Solana` | ✓ | ✓ | | `EURC` | `Ethereum`, `Base`, `Solana` | ✓ | ✓ | | `DAI` | `EVM`, `Solana` | ✓ | — | | `PYUSD` | `Ethereum`, `Solana` | — | ✓ | | `USDG` | `Robinhood` | ✓ | — | | `CBBTC` | `Ethereum`, `Arbitrum`, `Base`, `Solana` | ✓ | — | #### Stock Tokens (200+) OpenXSwitch supports over **200+ Stock Tokens** on **Robinhood Chain**, providing programmatic economic exposure to top U.S. equities and ETFs. [Read more.](/stock-tokens) ### **Popular Companies & ETF Tokens** | **Ticker** | **Asset Name** | **Blockchain** | **Mainnet** | **Testnet** | | :- | :- | :- | :- | :- | | **AMD** | Advanced Micro Devices, Inc. | Robinhood Chain | ✓ | ✓ | | **TSLA** | Tesla, Inc. | Robinhood Chain | ✓ | ✓ | | **NFLX** | Netflix, Inc. | Robinhood Chain | ✓ | ✓ | | **AMZN** | Amazon.com, Inc. | Robinhood Chain | ✓ | ✓ | | **PLTR** | Palantir Technologies Inc. | Robinhood Chain | ✓ | ✓ | | **NVDA** | NVIDIA Corporation | Robinhood Chain | ✓ | — | | **AAPL** | Apple Inc. | Robinhood Chain | ✓ | — | | **MSFT** | Microsoft Corporation | Robinhood Chain | ✓ | — | | **GOOGL** | Alphabet Inc. | Robinhood Chain | ✓ | — | | **META** | Meta Platforms, Inc. | Robinhood Chain | ✓ | — | | **SPY** | SPDR S\&P 500 ETF Trust | Robinhood Chain | ✓ | — | | **QQQ** | Invesco QQQ Trust | Robinhood Chain | ✓ | — | | **COIN** | Coinbase Global, Inc. | Robinhood Chain | ✓ | — | | **200 More...** | | | | | ### Token Standards | Blockchain | Standards | | :- | :- | | `EVM` | EVM Fungible Token (`ERC-20`) | | `Solana` | Solana Program Library Token (`SPL`) | ### Access Assets & Logos OpenXSwitch provides free-to-use blockchain assets and token logos through the public CDN infrastructure. 🔗 [OpenXSwitch Public Assets & CDN Docs](https://github.com/OpenXSwitch/OpenXSwitch-Public-Assets) # Supported Blockchains Source: https://docs.openxswitch.com/platform/supported-blockchains OpenXSwitch supports multiple blockchain networks and token standards. Blockchain support, API coverage, and environment availability may vary between products. > [!TIP] > > 📘 **Built-in Gas Infrastructure**\ > OpenXSwitch includes built-in **gas management** and **transaction** **sponsorship** across supported blockchain networks, abstracting native gas mechanics and simplifying transaction execution. ## Wallet Infrastructure > [tab] Mainnet > > | Blockchain | Slug | **Supported** | > | :- | :- | :- | > | Bitcoin | `bitcoin-mainnet` | ✓ | > | Ethereum | `ethereum-mainnet` | ✓ | > | Polygon | `polygon-mainnet` | ✓ | > | Avalanche | `avalanche-mainnet` | ✓ | > | Binance Smart Chain | `bsc-mainnet` | ✓ | > | Base | `base-mainnet` | ✓ | > | Arbitrum One | `arbitrum-mainnet` | ✓ | > | Optimism | `optimism-mainnet` | ✓ | > | Tron | `tron-mainnet` | ✓ | > | Solana | `solana-mainnet` | ✓ | > | Monad | `monad-mainnet` | ✓ | > | Linea | `linea-mainnet` | ✓ | > | Robinhood | `robinhood-mainnet` | ✓ | > [tab] Testnet > > | Blockchain | Slug | **Supported** | > | :- | :- | :- | > | Bitcoin Testnet4 | `bitcoin-testnet` | ✓ | > | Ethereum Sepolia | `ethereum-sepolia` | ✓ | > | Polygon Amoy | `polygon-amoy` | ✓ | > | Base Sepolia | `base-sepolia` | ✓ | > | Arbitrum Sepolia | `arbitrum-sepolia` | ✓ | > | Optimism Sepolia | `optimism-sepolia` | ✓ | > | Solana Devnet | `solana-devnet` | ✓ | > | BSC Testnet | `bsc-testnet` | ✓ | > | Tron Nile | `tron-testnet` | ✓ | ### Notes * **Testnet** environments use supported blockchain-native testnets. * Blockchain availability may vary depending on workspace configuration and infrastructure enablement. * Token support varies by blockchain network. # Testnets vs Mainnets Source: https://docs.openxswitch.com/platform/testnet-vs-mainnet > [!NOTE] > > You can **switch** between **mainnet and testnet** environments to separate production activity from testing workflows. ### Mainnets Mainnets are used for production-grade transactions and real-world interactions through OpenXSwitch APIs, including: * Sending real crypto funds (e.g., withdrawals, payments) * Reading onchain data for dashboards, reporting, and analytics OpenXSwitch APIs also streamline production workflows by enabling direct access to balances, transactions, and event data without requiring users to run or maintain blockchain nodes. ### Testnets Testnets are used for development, testing, and QA in a risk-free environment where no real funds are involved: * Testing smart contract deployments before mainnet release * Simulating end-to-end workflows using testnet tokens * Running demos and sandbox environments for validation purposes ### Testnet Faucets To test payment flows, you will need testnet tokens: * [Circle Faucet](https://faucet.circle.com) - Test USDC and EURC for supported testnet blockchains. * [Google Web3 Faucet](https://cloud.google.com/application/web3/faucet) - Test ETH, PYUSD(ETH, SOL). * [**Solana Faucet**](https://faucet.solana.com/) - Test SOL * [**Polygon Faucet**](https://faucet.polygon.technology/) - Test POL, ETH, USDC, WETH * [Tron Nile Faucet](https://nileex.io/join/getJoinPage) - TRX, USDT * [Bitcoin Faucet](https://coinfaucet.eu/en/btc-testnet4/) - BTC * Native gas tokens can be obtained from blockchain-specific faucets listed in each testnet’s official documentation. # Stock Tokens Source: https://docs.openxswitch.com/stock-tokens Stock Tokens bring **real-world asset** (RWA) investment primitives directly onto the blockchain through **Robinhood Chain**. Issued as standard **ERC-20 tokens**, Stock Tokens provide economic exposure to underlying US shares and ETFs, enabling developers and businesses to build programmable trading, brokerage, and investment products directly within OpenXSwitch infrastructure. #### Why Build with Stock Tokens? * **Programmable Real-World Assets:** Standardized ERC-20 interface that works out of the box with existing wallets, libraries, and tooling. * **On-Chain Price Feeds:** Every Stock Token is integrated with live Chainlink price feeds, allowing smart contracts to read equity valuations directly on-chain. * **Composable Primitives:** Easily combine stock exposure with on-chain trading, lending, yield strategies, and structured products. * **24/7 Global Access:** Assets live in users' wallets and remain tradeable and accessible around the clock. * **OpenXSwitch Integration:** Easily issue, manage, and execute gasless stock token transfers using OpenXSwitch's unified APIs and smart wallet infrastructure. ### Technical Specification | Property | Specification | | - | - | | **Token Standard** | Standard ERC-20 (18 Decimals) | | **Underlying Ticker** | Tied 1:1 to underlying equities or ETFs by ticker symbol | | **Price Feeds** | Per-asset Chainlink Data Feeds | | **Execution Mechanism** | Trades via Request-for-Quote (RFQ) swaps at launch; fully transferable standard ERC-20s | | **Supported Network** | Robinhood Chain | ### Use Cases Building with Stock Tokens uses the same developer patterns as standard digital assets, augmented with real-time on-chain pricing: | Use Case | Description | Example Integration | | - | - | - | | **Portfolio & Display** | Display tokenized stock balances and live USD valuations. | A wallet dashboard displaying a user's NVDA, AAPL, and SPY tokens alongside daily P\&L. | | **Trading** | Embedded swap interfaces. | A trading widget quoting NVDA $\leftrightarrow$ USDG via RFQ and settling on-chain. | | **Lending & Borrowing** | Use stock tokens as collateral. | Deposit NVDA tokens as collateral on a lending venue to borrow USDG stablecoins. | | **Indices & Baskets** | Bundle multiple tokens into unified products. | An "AI Basket" (NVDA, MSFT, GOOGL) that auto-values via Chainlink feeds. | | **Yield Strategies** | Earn yield on equity exposure. | Supply stock tokens to a lending vault to earn additional yield on top of stock dividends. | | **Global Access** | Regional equity access. | Offer US equity exposure to users in eligible global regions through mobile fintech apps. | ### Corporate Actions & Multipliers **What are Corporate Actions & Multipliers?** In traditional finance, corporate actions; such as stock splits, reverse splits, and stock dividends—alter the total share supply or share value of an equity without changing the investor's underlying economic value. In Robinhood Assets, corporate actions are handled programmatically on-chain via a dynamic multiplier extension (**ERC-8056: Scaled UI Amount Extension**), ensuring that token holdings accurately reflect splits and adjustments seamlessly without friction. * **Static Raw Balances:** The underlying token balance in a user's wallet remains static during splits, while the share-per-token ratio adjusts dynamically via the `uiMultiplier()` function. * **Automated Oracles:** Chainlink price feeds automatically incorporate the multiplier into the reported price. * **Seamless Swaps:** On-chain swaps, liquidity pools, and smart contract logic continue operating normally without requiring manual re-balances or token transfers. # Swaps & Bridges Source: https://docs.openxswitch.com/swaps The OpenXSwitch Swap API allows developers to execute instant same-chain and cross-chain asset swaps programmatically across supported blockchain networks. By routing liquidity through decentralized exchanges (DEXs), automated market makers (AMMs), and Request-for-Quote (RFQ) venues, OpenXSwitch provides fast, low-cost asset conversions directly within your user wallets or treasury operations. ### Supported Liquidity & Asset Routes * **Cross-Chain Bridges (EVM, Solana, Tron & Bitcoin):** Enables bi-directional bridging and liquidity routing between Solana, Tron, Bitcoin and EVM ecosystems (Ethereum L1, Arbitrum, Optimism, Base, Polygon) to swap assets to and fro seamlessly with minimal slippage. * **Same-Chain Swaps (EVM, Solana, Tron & Bitcoin):** Executes high-speed, capital-efficient DEX swaps directly within supported chains. * **Tokenized Stock Swaps (via Robinhood Chain):** Facilitates instant on-chain swaps between Robinhood Stock Tokens (e.g., NVDA, AAPL, SPY) and stablecoins (e.g., USDG) via native RFQ execution. ### Key Benefits * **Unified API Interface:** Swap and bridge digital assets and tokenized stocks across disparate blockchains using a single RESTful endpoint. * **Gasless Execution:** Integrate with OpenXSwitch's built-in ERC-4337 Paymaster and Solana Gas Station infrastructure to execute transactions gaslessly or allow users to pay route fees in stablecoins. * **Auto-Routing:** Automated routing across DEX and bridge venues to guarantee optimal liquidity depth and execution speed across crypto and tokenized equities. * **Low-Cost Settlement:** Capital-efficient trade routing with transparent execution fees starting as low as 0.05% per swap. ### How Asset Swaps & Bridges Work 1. **Request a Quote:** Query the OpenXSwitch API with the source chain, source asset, destination chain, destination asset, and amount. 2. **Review Execution Parameters:** The API queries underlying DEX aggregators and bridge protocols to return live exchange rates, expected slippage, estimated execution time, and fee breakdown. 3. **Generate CallData/Address & Execute:** The liquidity venue generates the optimized transaction `callData/Address`. OpenXSwitch then securely signs and executes the transaction on-chain on behalf of the smart wallet or treasury account. 4. **Monitor Lifecycle:** Track settlement or refund status in real-time via OpenXSwitch Webhooks. ### Security & On-Chain Execution * **Protocol-Generated CallData/Address:** OpenXSwitch queries decentralized exchange and bridging protocols to construct calibrated, optimized `callData/Address` payload parameters without exposing private keys or taking unneeded custody during route generation. * **TEE Security & On-Chain Execution:** Every transaction payload is validated, signed, and broadcast inside OpenXSwitch’s secure Trusted Execution Environment (TEE). This ensures key isolation, hardware-enforced integrity, and institutional-grade transaction orchestration directly to the destination blockchain network. * **Slippage & Deadline Controls:** Every generated payload includes strictly enforced slippage tolerance bounds and transaction execution deadlines to protect users from front-running, sandwich attacks, or extreme market volatility. # Refund Policy & Settlement Lifecycle Source: https://docs.openxswitch.com/swaps/refunds-and-settlement While most cross-chain swaps execute near-instantly, unfulfilled intents follow an automated on-chain refund process abstracted directly through OpenXSwitch infrastructure. > **Important Note on Refund Processing Times:**\ > Refunds are not instant. Expired swap deposits must pass through periodic batch processing, oracle verification, and canonical bridge confirmations, a process that takes **several hours** to settle. Do not instruct end-users to expect immediate refunds. #### When Refunds Occur Refunds occur when no relayer fills a deposit before its `fillDeadline` expires. **This is rare on mainnet**, but a deposit becomes eligible for an automated refund when: 1. The `fillDeadline` passes without any relayer filling the cross-chain intent. 2. No partial fills were executed. *Common root causes include extremely large swap transfers, low-liquidity/unusual token pairs, or temporary relayer market instability.* #### On-Chain Refund Flow **1. **Swap Expiration**** The `fillDeadline` passes and the swap status updates to `expired`. User funds remain safely escrowed in the origin liquidity pool contract. **2. **Bundle Processing**** The system bundles the expired deposit into the next global settlement batch. **3. **Settlement Verification**** The batch undergoes verification and an optimistic oracle challenge period to confirm valid state transitions. **4. **Refund Execution**** Upon finality, the refund root is transmitted to the origin chain via canonical bridges. Escrowed funds are returned automatically to the ` address of the wallet`, and the API status updates to `refunded`. ### Technical Specification | Property | Specification | | :- | :- | | **Supported EVM Routes** | Ethereum, Arbitrum, Optimism, Base, Polygon (powered by EVM DEX liquidity) | | **Supported Stock Assets** | Robinhood Stock Tokens via RFQ on Robinhood Chain | | **Supported Non-EVM Routes** | Solana, Tron, Bitcoin Native BTC | | **Execution Speed** | Real-time to 2 minutes (depending on source chain finality) | | **Refund Processing** | 2 to 6 hours (subject to bundle intervals and canonical bridge finality) | # Technical Support and Onboarding Source: https://docs.openxswitch.com/technical-support-and-onboarding Learn how to get started with OpenXSwitch, access onboarding assistance, integrate with the platform, and receive technical support for your infrastructure and API operations. Thank you for choosing OpenXSwitch. To get started, complete the Get Started form to help our team understand your infrastructure, integration requirements, and operational use case. One of our team members will contact you within 12 hours to assist with onboarding, technical guidance, and production readiness. ### Get Started * Get Started Form\ [https://openxswitch.com/contact-sales](https://openxswitch.com/contact-sales) ### Schedule a Call Prefer to speak with the team directly? * Book a Meeting\ [https://booking.openxswitch.com/](https://booking.openxswitch.com/) ### Technical Support #### Community Support Join the OpenXSwitch Telegram community for technical support, product updates, and integration discussions. * Telegram\ [https://t.me/OpenXSwitch](https://t.me/OpenXSwitch) ### Contact Support | Channel | Details | | :- | :- | | Email Support | [support@openxswitch.com](mailto:support@openxswitch.com), [sales@openxswitch.com](mailto:sales@openxswitch.com) | | Integration Support | Assistance with onboarding, APIs, wallets, and infrastructure integration | | Documentation & Guides | Developer documentation, integration references, and operational guides | Our team is available to assist with integration, onboarding, troubleshooting, and infrastructure support. ### Access Assets & Logos OpenXSwitch provides publicly accessible blockchain assets and coin logos through the OpenXSwitch Public Assets repository. Developers, exchanges, and fintech platforms can integrate supported blockchain and token assets directly from the repository. * OpenXSwitch Public Assets Repository\ [https://github.com/OpenXSwitch/OpenXSwitch-Public-Assets](https://github.com/OpenXSwitch/OpenXSwitch-Public-Assets) ### Follow OpenXSwitch | Platform | Link | | :- | :- | | Twitter / X | [https://x.com/OpenXSwitch](https://x.com/OpenXSwitch) | | LinkedIn | [https://www.linkedin.com/company/openxswitch/](https://www.linkedin.com/company/openxswitch/) | | Facebook | [https://www.facebook.com/profile.php?id=61582541588238](https://www.facebook.com/profile.php?id=61582541588238) | # Tools Source: https://docs.openxswitch.com/tools Tools and utilities for working with OpenXSwitch ## Available Tools # Chain Checker Source: https://docs.openxswitch.com/tools/chain-checker Check if OpenXSwitch supports your chain. # Token Checker Source: https://docs.openxswitch.com/tools/token-checker Check if OpenXSwitch supports your token across all chains. ## Check Token Support // Your custom logic to manipulate or format the link export const LinkModifier = () => { const [inputValue, setInputValue] = useState(''); const [outputLink, setOutputLink] = useState(''); const handleSubmit = e => { e.preventDefault(); if (inputValue) { setOutputLink(`https://yoursite.com{encodeURIComponent(inputValue)}`); } }; return
setInputValue(e.target.value)} placeholder="https://example.com" className="mt-1 block w-full px-3 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md shadow-sm focus:outline-none focus:ring-primary focus:border-primary sm:text-sm text-gray-900 dark:text-white" />
{outputLink &&

Output Component:

{outputLink}
}
; }; ## Link Generation Utility Use the form below to process your links and generate a transformed output. # Get Started with Account Management Source: https://docs.openxswitch.com/untitled-page Once you complete workspace onboarding, your default operational account is activated. To manage user identities, apply wallet-level controls, and manage asset flows, you must configure a dedicated **Account** for your application. ## Prerequisites Before starting this guide, ensure you have: * Obtained an **API key** from the [OpenXSwitch Console](https://console.openxswitch.com) An active API key with the necessary write permissions configured for the target environment (Sandbox or Live). ## The Plan We'll go through: 1. **Creating an Account via API:** Provisioning an isolated Users Account to manage end-user wallet instances and policies. 2. **Configuring Account Controls via Dashboard:** Managing settings, withdrawal restrictions, and compliance rules in the OpenXSwitch Console. 3. **Next Steps:** Integrating user wallets, webhook listeners, and operational auto-sweep rules. ## Step 1: Create an Account via API Accounts within the platform fall into two primary categories: * **Settlement Account:** Serves as the primary enterprise operational or treasury account created automatically upon successful onboarding to manage enterprise funds, auto-sweeps, and global balances. * **Users Account:** Acts as an isolated account assigned to your specific end-user application to manage dedicated smart wallet instances, balances, and operational policies. To manage end-users, create a dedicated Users Account via the API: Bash ```json theme={null} curl --request POST \ --url https://api.openxswitch.com/v2/accounts \ --header 'Authorization: Bearer oxs.QdwAKOAWNWZzur4AjOevSBl1iDIXOi6XtQ' \ --header 'Content-Type: application/json' \ --data '{ "idempotencyKey": "8d5be8f5-a8e7-4e8a-b715-0e7d6f2a6d04", "name": "Sandbox Account" }' ``` > **Important:** The `accountId` returned in the response will be used across your application to scope wallet creation, transaction routing, and compliance policies. For complete parameter breakdowns, response schemas, and error handling, refer to the **Accounts API Reference**. ## Step 2: Configure Account Controls via the Dashboard After creating your Account, you can manage security, withdrawal rules, and compliance watchlists directly from the OpenXSwitch Console. 1. Log into the [OpenXSwitch Console](https://console.openxswitch.com). 2. Navigate to **Wallet Infrastructure → Accounts**. 3. Select the target Account to update. ### Configurable Settings * **Account Name:** Update the account display label for internal tracking. * **Withdrawal Controls:** Toggle and **disable** external **withdrawals** initiated via the **API** or **dashboard** to restrict outbound fund movements. * **Compliance Watchlists:** Enable automated **Allowlist** and **Blocklist** controls at the Account level to reject unauthorized transfers before on-chain execution. ## Step 3: Next Steps * **[Create and Manage Users](/guides/dev-guides/create-and-manage-users):** Provision end-user identities to track activity, stats, and balances. * **[Create and Manage Wallets](/guides/dev-guides/create-and-manage-wallets):** Deploy chain-specific smart wallets or deposit addresses linked directly to your users. # Set Up Wallet Infrastructure for Your Workspace Source: https://docs.openxswitch.com/untitled-page-2 By default, **Wallet Infrastructure** is automatically provisioned during onboarding for all newly created workspaces on the [OpenXSwitch Console](https://console.openxswitch.com/). However, if you are configuring an existing workspace that requires setup or manual activation, this guide will walk you through completing the configuration yourself. ### Prerequisites Before starting, ensure you have: * An active account on the [OpenXSwitch Console](https://console.openxswitch.com/). ## **The Plan** Setting up your Wallet Infrastructure involves three primary steps: 1. **Navigate:** Access the Wallet Infrastructure section in your dashboard settings. 2. **Identify Setup State:** Determine if your workspace needs access activation (**State A**) or just setup completion (**State B**). 3. **Provision:** Follow the corresponding steps to request access or complete the 2-minute initialization process. ### Step-by-Step Setup Guide **Step 1: Navigate to Wallet Infrastructure** 1. Log in to the [OpenXSwitch Console](https://console.openxswitch.com/) 2. Click on the workspace navigation dropdown menu in your dashboard header. 3. Select **Wallet Infrastructure** from the options. ![Console Navigation Open X Switch](https://mintcdn.com/openxswitch/u71QS_9yccsJuQIL/images/console-navigation--OpenXSwitch.png?fit=max\&auto=format\&n=u71QS_9yccsJuQIL\&q=85\&s=3720feb1d694a227d779bd005b330063) ![Openxswitch Platform Nav](https://mintcdn.com/openxswitch/D1N3WB4eEBEMI_Ex/images/openxswitch-platform-nav.png?fit=max\&auto=format\&n=D1N3WB4eEBEMI_Ex\&q=85\&s=ce6037573bef3df6455328c8df198ef2) **Step 2: Complete the Infrastructure Setup** Depending on your workspace status, your screen will display one of two setup states: * **State A: Access Activation Needed** * This state means your workspace does not yet have access to the Wallet Infrastructure feature. Activation must be enabled by the OpenXSwitch team. * You will see options on your screen * Click the on-screen link to **contact us** or **book a call** with our technical team ![Wallet Infrastructure Access Required Open X Switch](https://mintcdn.com/openxswitch/u71QS_9yccsJuQIL/images/wallet-infrastructure-access-required-OpenXSwitch.png?fit=max\&auto=format\&n=u71QS_9yccsJuQIL\&q=85\&s=47161ba16f1f88e80216246701d50651) * **State B: Complete Ongoing Setup** * This state means your workspace already has access, but the infrastructure setup has not yet been finalized. * Simply click the **"Continue Setup"** button. * Wait at least **2 minutes** for the system to finalize background provisioning before refreshing or leaving the page. ![Continue Wallet Infrastructure Setup Open X Switch](https://mintcdn.com/openxswitch/u71QS_9yccsJuQIL/images/continue-wallet-infrastructure-setup---OpenXSwitch.png?fit=max\&auto=format\&n=u71QS_9yccsJuQIL\&q=85\&s=ab924ce978ceafc9285f1b0323a6bc46) ![Wait For Wallet Infrastructure Setup Open X Switch](https://mintcdn.com/openxswitch/u71QS_9yccsJuQIL/images/wait-for-wallet-infrastructure-setup--OpenXSwitch.png?fit=max\&auto=format\&n=u71QS_9yccsJuQIL\&q=85\&s=932ed9612f94badcb7a855e8498b3c69) ### Next Steps Once your Wallet Infrastructure is active, set up an [account](/guides/dev-guides/get-started-with-account-management) for a funds segregator configured with custom auto-sweep, routing rules, and security controls to organize your incoming assets * **[Create and Manage Users](/guides/dev-guides/create-and-manage-users):** Provision end-user identities to track activity, stats, and balances. * **[Create and Manage Wallets](/guides/dev-guides/create-and-manage-wallets):** Deploy chain-specific smart wallets or deposit addresses linked directly to your users. * [Send and Transfer Tokens](/guides/dev-guides/send-and-transfer-tokens): Programmatically move digital assets from a specified wallet address to an external or internal recipient address. # Wallet Infrastructure: Architecture Source: https://docs.openxswitch.com/wallet-infrastructure/architecture This section introduces the core concepts and wallet models used across the OpenXSwitch Wallet Infrastructure. OpenXSwitch’s Wallet Infrastructure provides programmable wallet infrastructure for developers, fintechs, institutions, exchanges, wallet providers, and trading platforms building on EVM, Solana, Bitcoin, and other supported chains. The infrastructure is designed to abstract blockchain complexity while enabling modern financial experiences and programmable transaction flows. ## Architecture Overview OpenXSwitch Wallet Infrastructure supports core concepts designed for programmable wallet operations, treasury routing, settlement flows, and end-user wallet management: | **Model** | **Description** | **Best For** | | - | - | - | | **Accounts** | Logical **container** used to **group** and manage wallets. | **Treasury** separation, application-level grouping, operational **isolation**, and user segmentation. | | **Users** | **End-user** entities associated with accounts or specific wallet permissions. | Identity mapping, **user-level** access management, and customer wallet orchestration. | | **Wallets** | Actual blockchain **wallet** **addresses** grouped and managed under an account structure. | Deposits, programmable transfers, gasless transactions, and wallet execution flows. | > [!TIP] > > **Wallets** can be directly attached to a user entity for identity mapping and user-level access. ## Types of Accounts | **Account Type** | **Description** | **Use Case** | | :- | :- | :- | | **Settlement** | Treasury-level account used for operational liquidity and settlement management. | Auto-sweep destination, treasury management, liquidity routing, and settlement operations. | | **User** | Account structure used for end-user applications and wallet orchestration. | Consumer applications, embedded wallets, user balances, and programmable wallet flows. | ## Types of Wallets OpenXSwitch Wallet Infrastructure supports two types of wallet models designed for programmable operations, liquidity management, and user segregation: * **Smart Wallets (Account Abstraction):** Programmable on-chain smart contract wallets that support gasless transactions, transaction sponsorship, batch execution, and advanced policy-based permissions. * **Wallets:** Standard blockchain addresses provisioned under an account structure for multi-chain asset routing and custody. A single wallet address can be used to receive supported assets across multiple EVM chains and tokens. To learn more, see [Unified Wallet Addressing on EVM Chains](/wallet-infrastructure/unified-evm-address). ## Settlement Infrastructure ### What Makes a Wallet a Settlement Wallet? A **Settlement Wallet** is defined by the following characteristics: * **Type Designation:** Possesses the explicit role type `settlement` within the infrastructure configuration. * **Automated Creation:** Automatically created during initial workspace setup when your wallet infrastructure is provisioned. * **Central Treasury Hub:** Serves as the primary operational target for internal transfers, settlement flows, and workspace-level auto-sweeps. ### Key Capabilities of an Account Accounts serve as administrative and logical containers for grouping wallets, users, and operational rules. Key capabilities include: * **Withdrawal Execution:** Execute external crypto withdrawals via both the OpenXSwitch API and the operational Dashboard. * **Global Account Control (Disable/Enable):** Disabling or enabling an Account immediately applies to **all wallets** attached to that account. * *Disabling an Account:* Temporarily suspends operations and freezes outbound actions for all underlying wallets under that account. * *Enabling an Account:* Restores operational status and API access to all wallets grouped within the account structure. * **Watchlist Configuration:** Configure watchlist monitoring directly at the Account level to track and screen specific blockchain addresses for risk management. ### User Entity Attachment > **Note:** User entities are attached **directly to specific wallets** (rather than to Accounts). This enables identity mapping, user-level access management, and customer wallet orchestration directly at the individual wallet level. # Auto Collection and Sweep Rule Source: https://docs.openxswitch.com/wallet-infrastructure/auto-collection-and-sweep-rule Auto-sweep helps centralize liquidity, simplify treasury operations, and reduce manual treasury management across your wallets. > [!TIP] > > Trigger Condition: Auto-sweep rules are triggered by deposits. Whenever funds are received in eligible wallets, the sweep logic is evaluated based on your configured settings. ### Default Sweep Destinations | Product | Default Destination | Channel | | :- | :- | - | | Wallet Infrastructure | Settlement Account/Wallet | On-chain | ### Configuration Levels Auto-sweep rules can be configured at two distinct levels depending on your operational needs: #### 1. Workspace-Level (Global Setup) Configure workspace-wide automation that can be easily turned on or off to apply to all existing and newly created wallets within your workspace. No threshold configuration is required at this level. * **Navigate to:** Workspace Console → Wallet Infrastructure → Settings → Configuration * **Control:** Toggle the global auto-sweep status **ON** or **OFF** to enable or disable automatic liquidity collection workspace-wide. #### 2. Wallet-Level (Specific Wallet Setup) Enable or disable auto-sweep behavior for specific individual wallets via the Platform Dashboard or API during wallet creation or update. ```json highlight={2} theme={null} { "autoSweep": true, } ``` When `autoSweep` is set to `true`, deposited funds are automatically consolidated into the primary settlement account. ### Supported Frequencies | Frequency | Description | | :- | :- | | Real Time | Triggered immediately when deposits are detected in eligible wallets. | > [card] Current Limitation > > Sweeping funds to external wallets is not currently supported. Auto-sweep destinations must be managed within the OpenXSwitch wallet infrastructure. # Unified EVM Address Source: https://docs.openxswitch.com/wallet-infrastructure/unified-evm-address Wallet addresses are generated per protocol model and directly reflect blockchain-native ownership on supported networks. All supported EVM networks share a single, unified address format. A single EVM wallet address can receive assets across multiple EVM-compatible chains and tokens. ## Protocol Address Behavior | **Protocol Model** | **Address Behavior** | | - | - | | **EVM Networks** | One wallet address shared across supported EVM-compatible blockchains and tokens. | | **Solana** | Wallet addresses are unique to the Solana network. | | **Bitcoin** | Wallet addresses are unique to the Bitcoin network. | | **Other Networks** | Wallet addresses are protocol-specific and isolated per blockchain network. | ## How It Works Wallet addresses are generated and managed based on blockchain protocol groups rather than individual chains. When you create a wallet on an EVM chain (such as `BASE`) using a specific reference ID (`refId`), an EVM address is generated: ```json highlight={3} theme={null} { "accountId": "e29b41d4a7164440", "refId": "550e8400-e29b-41d4-a716-446655440000", "blockchain": "BASE" } ``` If you subsequently issue another wallet creation request using the same `refId` on a different EVM network (such as `ETH` or `POLYGON`), OpenXSwitch returns the same EVM wallet address: ```json highlight={3} theme={null} { "accountId": "e29b41d4a7164440", "refId": "550e8400-e29b-41d4-a716-446655440000", "blockchain": "ETH" } ``` This architecture allows developers to: * **Reuse EVM Addresses:** Reuse a single `refId` to maintain a consistent address per user across all supported EVM chains. * **Isolate Addresses:** Pass distinct `refId` values to generate isolated wallet addresses per user or operational strategy. # Why Smart Contract Wallets Source: https://docs.openxswitch.com/wallet-infrastructure/why-smart-contract-wallets Wallets are the core primitive for any on-chain transaction. They serve as the foundational entry point for stablecoins, digital asset management, and the future of global, programmable payments. While traditional externally owned accounts (EOAs) introduced basic peer-to-peer asset transfers, **smart contract wallets**—also known as **smart wallets**—redefine what on-chain account interaction can achieve. ## Possibilities with Smart Wallets Smart wallet infrastructure unlocks capabilities that bridge Web2 convenience with Web3 security: * **Custody Flexibility:** Accommodates flexible deployment models, supporting both non-custodial and custodial operations depending on your application's regulatory and architectural requirements. * **Programmable Access & Security:** Implements multi-key authorization policies, rule-based execution, and social or guardian-based account recovery without single points of failure. * **Seamless Web2 Onboarding:** Eliminates seed phrase friction by enabling user authentication via email, passkeys, or social logins. * **Gas Abstraction & Sponsorship:** Supports built-in transaction sponsorship (paymasters) and sponsored gasless execution, allowing users to transact without native gas tokens or pay fees using stablecoins. * **Dynamic Signer Rotation:** Allows key rotation and policy updates directly on-chain without changing or migrating the underlying wallet address. * **Agentic & Automated Payments:** Enables granular session keys and automated routing for recurring transactions, subscription models, and autonomous AI-driven payment flows. ## Why We Chose Smart Wallets OpenXSwitch selected smart wallets as the core foundation for our programmable wallet infrastructure to eliminate the user and developer friction inherent to legacy blockchain accounts. # Wallet Infrastructure: Architecture Source: https://docs.openxswitch.com/wallet/archi This section introduces the core concepts and wallet models used across the OpenXSwitch Wallet Infrastructure. OpenXSwitch’s Wallet Infrastructure provides programmable wallet infrastructure for developers, fintechs, institutions, exchanges, wallet providers, and trading platforms building on EVM, Solana, Bitcoin, and other supported chains. The infrastructure is designed to abstract blockchain complexity while enabling modern financial experiences and programmable transaction flows. ## Architecture Overview OpenXSwitch Wallet Infrastructure supports core concepts designed for programmable wallet operations, treasury routing, settlement flows, and end-user wallet management: | **Model** | **Description** | **Best For** | | - | - | - | | **Accounts** | Logical **container** used to **group** and manage wallets. | **Treasury** separation, application-level grouping, operational **isolation**, and user segmentation. | | **Users** | **End-user** entities associated with accounts or specific wallet permissions. | Identity mapping, **user-level** access management, and customer wallet orchestration. | | **Wallets** | Actual blockchain **wallet** **addresses** grouped and managed under an account structure. | Deposits, programmable transfers, gasless transactions, and wallet execution flows. | > [!TIP] > > **Wallets** can be directly attached to a user entity for identity mapping and user-level access. ## Types of Accounts | **Account Type** | **Description** | **Use Case** | | :- | :- | :- | | **Settlement** | Treasury-level account used for operational liquidity and settlement management. | Auto-sweep destination, treasury management, liquidity routing, and settlement operations. | | **User** | Account structure used for end-user applications and wallet orchestration. | Consumer applications, embedded wallets, user balances, and programmable wallet flows. | ## Types of Wallets OpenXSwitch Wallet Infrastructure supports two types of wallet models designed for programmable operations, liquidity management, and user segregation: * **Smart Wallets (Account Abstraction):** Programmable on-chain smart contract wallets that support gasless transactions, transaction sponsorship, batch execution, and advanced policy-based permissions. * **Wallets:** Standard blockchain addresses provisioned under an account structure for multi-chain asset routing and custody. A single wallet address can be used to receive supported assets across multiple EVM chains and tokens. To learn more, see [Unified Wallet Addressing on EVM Chains](https://www.google.com/search?q=https://docs.openxswitch.com/wallet-as-a-service/architecture%23unified-wallet-addressing-on-evm-chains). ## Settlement Infrastructure ### What Makes a Wallet a Settlement Wallet? A **Settlement Wallet** is defined by the following characteristics: * **Type Designation:** Possesses the explicit role type `settlement` within the infrastructure configuration. * **Automated Creation:** Automatically created during initial workspace setup when your wallet infrastructure is provisioned. * **Central Treasury Hub:** Serves as the primary operational target for internal transfers, settlement flows, and workspace-level auto-sweeps. ### Key Capabilities of an Account Accounts serve as administrative and logical containers for grouping wallets, users, and operational rules. Key capabilities include: * **Withdrawal Execution:** Execute external crypto withdrawals via both the OpenXSwitch API and the operational Dashboard. * **Global Account Control (Disable/Enable):** Disabling or enabling an Account immediately applies to **all wallets** attached to that account. * *Disabling an Account:* Temporarily suspends operations and freezes outbound actions for all underlying wallets under that account. * *Enabling an Account:* Restores operational status and API access to all wallets grouped within the account structure. * **Watchlist Configuration:** Configure watchlist monitoring directly at the Account level to track and screen specific blockchain addresses for risk management. ### User Entity Attachment > **Note:** User entities are attached **directly to specific wallets** (rather than to Accounts). This enables identity mapping, user-level access management, and customer wallet orchestration directly at the individual wallet level. # Webhook Events Source: https://docs.openxswitch.com/webhook-events Webhooks allow you to receive real-time notifications for events that occur on wallets in your project. ## Event Type Each notifications flow consists of a `parent method` with `sub-methods` representing the lifecycle, status, or progress of an event. | Parent methods | Description | | :- | - | | `wallets:deposit` | | | `wallets:withdraw` | | | `wallets:swap` | | ## **Event Schema** > [accordion] Deposit > [accordion] Withdraw > [accordion] Swap \ **Event Examples** ------------------ > [accordion] Incoming Deposit (pending) example > > ```json theme={null} > { > "requestId": "04afc1dd8ffae1f6f8c66f96eed0f5", > "method": "wallets:withdraw.pending", > "params": { > "id": "6a382b941e117b9527366499", > "refId": "2a1ee011-e5b5-419e-a967-bb0a8f0626c3", > "idempotencyKey": "0e620f37-0f8a-4cee-b0e7-72235b697449", > "tokenName": "USD Coin", > "tokenSymbol": "USDC", > "tokenTicker": "USDC_BASE", > "tokenAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", > "decimals": 6, > "isNative": false, > "amount": { > "value": "5", > "rawValue": "5000000" > }, > "totalAmount": { > "value": "5.028011", > "rawValue": "5028011" > }, > "chainDecimals": 18, > "blockchain": "BASE", > "protocol": "EVM", > "environment": "testnet", > "network": "base-sepolia", > "txType": "outgoing", > "status": "pending", > "fromAddress": "0xda0348137a73899a156944e31c81f05f646d168c", > "toAddress": "0x226917bdc6d659672050e48ca6ce73dbd3a1d318", > "txHash": "0xee30898cdfaee9c810996756337044fd98b4b0406583dd2d5706288b97f472e5", > "totalFee": { > "value": "0.000001224105803529", > "rawValue": "1224105803529" > }, > "feeLevel": "fast", > "feeToken": "ETH", > "isBatch": false, > "destinations": [ > { > "address": "0x226917bdc6d659672050e48ca6ce73dbd3a1d318", > "value": "5", > "rawValue": "5000000" > }, > { > "address": "0x7a750d8d6e12cce09a7c15482077a8a4d4c37de4", > "value": "0.028011", > "rawValue": "28011" > } > ], > "note": null, > "triggerOrigin": "blockchain", > "confirmation": null, > "confirmed": false, > "confirmedAt": null, > "userId": "69f60c8561a6152a39f39005", > "walletId": "69f60c8561a6152a39f39005", > "accountId": "69eba97c3f7e15428aef8811", > "workspaceId": "67e723ed4b44a4f73dd2e8a2", > "createdAt": "2026-06-21T18:21:08.349Z", > "updatedAt": "2026-06-21T18:21:08.349Z", > "wallet": { > "id": "69f60c8561a6152a39f39005", > "address": "0xDA0348137A73899A156944e31C81f05F646d168c", > "type": "deposit", > "protocol": "EVM", > "isEvmCompatible": true, > "name": "user_0_Zee", > "userId": "69f60c8561a6152a39f39005", > "refId": "f3f14dcf-a233-4128-8044-5c8f03feb230", > "custodyType": "DEVELOPER", > "token": { > "name": "USD Coin", > "symbol": "USDC", > "blockchain": "BASE", > "tokenAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", > "isNative": false, > "decimals": 6, > "standard": "ERC20", > "balance": { > "value": "12.471989", > "rawValue": "12471989" > } > } > } > } > } > } > ``` > [accordion] Incoming Deposit (success) example > > ```json theme={null} > { > "requestId": "04afc1dd8ffae1f6f8c66f96eed0f5", > "method": "wallets:deposit.success", > "params": { > "id": "6a382b951e117b952736649a", > "refId": "9395d9b3-b58a-4856-8a3e-886c687f8d6f", > "idempotencyKey": "d1526226-27c2-440f-8d57-a2e3bc980e89", > "tokenName": "USD Coin", > "tokenSymbol": "USDC", > "tokenTicker": "USDC_BASE", > "tokenAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", > "decimals": 6, > "isNative": false, > "amount": { > "value": "5", > "rawValue": "5000000" > }, > "chainDecimals": 18, > "blockchain": "BASE", > "protocol": "EVM", > "environment": "testnet", > "network": "base-sepolia", > "txType": "incoming", > "status": "success", > "fromAddress": "0xda0348137a73899a156944e31c81f05f646d168c", > "toAddress": "0x226917bdc6d659672050e48ca6ce73dbd3a1d318", > "txHash": "0xee30898cdfaee9c810996756337044fd98b4b0406583dd2d5706288b97f472e5", > "note": null, > "triggerOrigin": "blockchain", > "confirmation": "1", > "confirmed": true, > "confirmedAt": "2026-06-21T18:24:28.849Z", > "userId": "69f60c8561a6152a39f39005", > "walletId": "6a38259e7b6635a105154d11", > "accountId": "69eba97c3f7e15428aef8811", > "workspaceId": "67e723ed4b44a4f73dd2e8a2", > "createdAt": "2026-06-21T18:21:08.955Z", > "updatedAt": "2026-06-21T18:24:29.478Z", > "wallet": { > "id": "6a38259e7b6635a105154d11", > "address": "0x226917Bdc6d659672050E48ca6CE73dbd3A1D318", > "type": "deposit", > "protocol": "EVM", > "isEvmCompatible": true, > "name": "dev-user-4", > "userId": "69f60c8561a6152a39f39005", > "refId": "2198ddd0-4738-4ef6-b703-d1bfa79531d0", > "custodyType": "DEVELOPER", > "token": { > "name": "USD Coin", > "symbol": "USDC", > "blockchain": "BASE", > "tokenAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", > "isNative": false, > "decimals": 6, > "standard": "ERC20", > "balance": { > "value": "5", > "rawValue": "5000000" > } > } > } > } > } > } > ``` > [accordion] Outgoing Transfer (pending) example > > ```json theme={null} > { > "requestId": "04afc1dd8ffae1f6f8c66f96eed0f5", > "method": "wallets:withdraw.pending", > "params": { > "id": "6a382b941e117b9527366499", > "refId": "2a1ee011-e5b5-419e-a967-bb0a8f0626c3", > "idempotencyKey": "0e620f37-0f8a-4cee-b0e7-72235b697449", > "tokenName": "USD Coin", > "tokenSymbol": "USDC", > "tokenTicker": "USDC_BASE", > "tokenAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", > "decimals": 6, > "isNative": false, > "amount": { > "value": "5", > "rawValue": "5000000" > }, > "totalAmount": { > "value": "5.028011", > "rawValue": "5028011" > }, > "chainDecimals": 18, > "blockchain": "BASE", > "protocol": "EVM", > "environment": "testnet", > "network": "base-sepolia", > "txType": "outgoing", > "status": "pending", > "fromAddress": "0xda0348137a73899a156944e31c81f05f646d168c", > "toAddress": "0x226917bdc6d659672050e48ca6ce73dbd3a1d318", > "txHash": "0xee30898cdfaee9c810996756337044fd98b4b0406583dd2d5706288b97f472e5", > "totalFee": { > "value": "0.000001224105803529", > "rawValue": "1224105803529" > }, > "feeLevel": "fast", > "feeToken": "ETH", > "isBatch": false, > "destinations": [ > { > "address": "0x226917bdc6d659672050e48ca6ce73dbd3a1d318", > "value": "5", > "rawValue": "5000000" > }, > { > "address": "0x7a750d8d6e12cce09a7c15482077a8a4d4c37de4", > "value": "0.028011", > "rawValue": "28011" > } > ], > "note": null, > "triggerOrigin": "blockchain", > "confirmation": null, > "confirmed": false, > "confirmedAt": null, > "userId": "69f60c8561a6152a39f39005", > "walletId": "69f60c8561a6152a39f39005", > "accountId": "69eba97c3f7e15428aef8811", > "workspaceId": "67e723ed4b44a4f73dd2e8a2", > "createdAt": "2026-06-21T18:21:08.349Z", > "updatedAt": "2026-06-21T18:21:08.349Z", > "wallet": { > "id": "69f60c8561a6152a39f39005", > "address": "0xDA0348137A73899A156944e31C81f05F646d168c", > "type": "deposit", > "protocol": "EVM", > "isEvmCompatible": true, > "name": "user_0_Zee", > "userId": "69f60c8561a6152a39f39005", > "refId": "f3f14dcf-a233-4128-8044-5c8f03feb230", > "custodyType": "DEVELOPER", > "token": { > "name": "USD Coin", > "symbol": "USDC", > "blockchain": "BASE", > "tokenAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", > "isNative": false, > "decimals": 6, > "standard": "ERC20", > "balance": { > "value": "12.471989", > "rawValue": "12471989" > } > } > } > } > } > } > ``` > [accordion] Outgoing Transfer (success) example > > ```json theme={null} > { > "requestId": "04afc1dd8ffae1f6f8c66f96eed0f5", > "method": "wallets:withdraw.success", > "params": { > "id": "6a382b941e117b9527366499", > "refId": "2a1ee011-e5b5-419e-a967-bb0a8f0626c3", > "idempotencyKey": "0e620f37-0f8a-4cee-b0e7-72235b697449", > "tokenName": "USD Coin", > "tokenSymbol": "USDC", > "tokenTicker": "USDC_BASE", > "tokenAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", > "decimals": 6, > "isNative": false, > "amount": { > "value": "5", > "rawValue": "5000000" > }, > "totalAmount": { > "value": "5.028011", > "rawValue": "5028011" > }, > "chainDecimals": 18, > "blockchain": "BASE", > "protocol": "EVM", > "environment": "testnet", > "network": "base-sepolia", > "txType": "outgoing", > "status": "success", > "fromAddress": "0xda0348137a73899a156944e31c81f05f646d168c", > "toAddress": "0x226917bdc6d659672050e48ca6ce73dbd3a1d318", > "txHash": "0xee30898cdfaee9c810996756337044fd98b4b0406583dd2d5706288b97f472e5", > "totalFee": { > "value": "0.000001224105803529", > "rawValue": "1224105803529" > }, > "feeLevel": "fast", > "feeToken": "ETH", > "isBatch": false, > "destinations": [ > { > "address": "0x226917bdc6d659672050e48ca6ce73dbd3a1d318", > "value": "5", > "rawValue": "5000000" > }, > { > "address": "0x7a750d8d6e12cce09a7c15482077a8a4d4c37de4", > "value": "0.028011", > "rawValue": "28011" > } > ], > "note": null, > "triggerOrigin": "blockchain", > "confirmation": "1", > "confirmed": true, > "confirmedAt": "2026-06-21T18:24:28.849Z", > "userId": "69f60c8561a6152a39f39005", > "walletId": "69f60c8561a6152a39f39005", > "accountId": "69eba97c3f7e15428aef8811", > "workspaceId": "67e723ed4b44a4f73dd2e8a2", > "createdAt": "2026-06-21T18:21:08.349Z", > "updatedAt": "2026-06-21T18:24:28.940Z", > "wallet": { > "id": "69f60c8561a6152a39f39005", > "address": "0xDA0348137A73899A156944e31C81f05F646d168c", > "type": "deposit", > "protocol": "EVM", > "isEvmCompatible": true, > "name": "user_0_Zee", > "userId": "69f60c8561a6152a39f39005", > "refId": "f3f14dcf-a233-4128-8044-5c8f03feb230", > "custodyType": "DEVELOPER", > "token": { > "name": "USD Coin", > "symbol": "USDC", > "blockchain": "BASE", > "tokenAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", > "isNative": false, > "decimals": 6, > "standard": "ERC20", > "balance": { > "value": "12.471989", > "rawValue": "12471989" > } > } > } > } > } > } > ``` ### **Best Practices** 1. **Idempotent Processing:** Ensure your webhook handlers are idempotent to avoid duplicate processing. 2. **Final Events Only:** Update balances only on final events, Refer to the full list of `supported events` to identify valid final event types. 3. **Acknowledgment:** Always respond with a **2xx HTTP status code** within 1 minutes to acknowledge receipt. 4. **Security:** Verify webhook payload signatures to ensure authenticity. # Handling Wallet Balances Source: https://docs.openxswitch.com/webhook/handling-wallet-balances When integrating OpenXSwitch/Blockchain webhooks to manage internal database records or user account balances, avoid updating local records by manually adding or subtracting incoming transaction amounts. Due to rare on-chain edge cases, such as blockchain re-organizations, dynamic fee deductions, or execution adjustments, calculating local balances incrementally using transfer/deposit amounts can lead to ledger drift over time. ### Recommended Sync Strategy Instead of calculating state changes incrementally, set your local ledger records directly using the verified snapshot provided in `params.wallet.token.balance`: * `value`: The human-readable string representation of the verified balance, pre-formatted to match token decimals. * `rawValue`: The raw integer string representation in minimal base units (atomic units/wei/lamport/satoshi/sun). ## Samples `wallets` are always synchronized with `onchain` state. `Balance` values returned in webhook events reflect the latest blockchain state for the wallet and token. ```json highlight={23-24} theme={null} { "requestId": "....", "method": "wallets:''.''", "params": { "...", "wallet":{ "id":"69eba664a8d8bc8c594d17fd", "address":"0x7A750D8D6e12cce09A7c15482077a8A4d4c37de4", "type":"settlement", "protocol":"EVM", "name":"Default Wallet(EVM)", "refId":"b2be0f63-f73e-49f5-bc52-93dae008b1d7", "custodyType":"DEVELOPER", "token":{ "name":"Euro Coin", "symbol":"EURC", "blockchain":"BASE", "tokenAddress":"0x808456652fdb597867f38412077a9182bf77359f", "isNative":false, "decimals":6, "standard":"ERC20", "balance":{ "value":"20", "rawValue":"20000000" } } } } } } ``` ### Why Use `params.wallet.token.balance`? 1. **State Overwriting:** Replacing local database values with the payload state guarantees absolute alignment with the on-chain ledger at transaction execution time. 2. **Re-org Protection:** In the event of a chain re-organization, subsequent state updates automatically correct local records without requiring manual database reconciliation. 3. **Multi-Source Consistency:** Overwriting state avoids race conditions when multiple transactions occur in close succession across automated wallet workflows. # Overview Source: https://docs.openxswitch.com/webhook/overview This guide explains how to configure, test, and secure webhooks for seamless integration with the OpenXSwitch API. Webhooks in OpenXSwitch provide real-time notifications for key system events such as `transfers`, `swap`, `withdrawals`, and `deposits` across all wallet products. For example, you can receive instant updates when a withdrawal is initiated, an order is executed, or a deposit is confirmed. ### Setting Up Webhooks #### Step 1: Add Webhook URL and Secret 1. Navigate to **Account → Webhook** on the OpenXSwitch Console. 2. Add your webhook `endpoint` and `secret`. 3. Select the event types you want to subscribe to (e.g., `withdraw`, `deposit`). 4. Choose the environment mode: * **Sandbox (default)** - for`testnet` and testing * **Live** -`mainnet` events 5. Confirm and submit to save your webhook configuration #### Step 2: Verify Webhook Setup To ensure your webhook integration is working correctly, you can use the **OpenXSwitch Simulation API** to trigger test events. This allows you to simulate real scenarios such as transaction updates or deposit confirmations and verify that your endpoint processes them correctly. ### Webhook Structure When an event occurs, OpenXSwitch sends a JSON payload via HTTP POST to your webhook URL. #### Payload Format ```json Wallet Deposit highlight={12-13} theme={null} { "requestId": "", "method": "wallets:deposit.pending", "params": { ... } } ``` > [!TIP] > > 👍 For details on available event types and statuses, refer to the Webhook Events Documentation: [https://docs.openxswitch.com/webhook/events](https://docs.openxswitch.com/webhook/events) ### Securing Your Webhooks To ensure webhook requests are authentic, OpenXSwitch includes an `X-Webhook-Signature` header with each request. This signature is generated using SHA256 and your webhook secret. > [!TIP] > > You should verify this signature before processing any incoming event. ### **Verification Example** Here's an example of how to verify the webhook signature in `Node`, `Python` and `PHP`: ```typescript Node.js highlight={12-13} theme={null} const crypto = require('crypto'); // Your webhook secret const secret = 'your_webhook_secret'; // The raw body of the webhook event (as a string) const body = '{"requestId": "","method": "deposit.accepted","params": {.....}}'; // The signature from the X-Webhook-Signature header const signature = req.headers['x-webhook-signature']; // Create the HMAC const hmac = crypto.createHmac('sha256', secret); hmac.update(body); const digest = hmac.digest('hex'); // Compare the generated HMAC digest with the signature if (digest === signature) { console.log('Webhook signature is valid.'); } else { console.log('Invalid webhook signature.'); } ``` ```python Python theme={null} import hmac import hashlib from flask import Flask, request, jsonify app = Flask(__name__) SECRET = "your_webhook_secret" @app.route("/webhook", methods=["POST"]) def verify_webhook(): received_signature = request.headers.get("x-webhook-signature", "") raw_body = request.data computed_hmac = hmac.new(SECRET.encode(), raw_body, hashlib.sha256).hexdigest() if hmac.compare_digest(computed_hmac, received_signature): print("Webhook signature is valid.") return jsonify({"status": "success"}), 200 else: print("Invalid webhook signature.") return jsonify({"error": "Invalid signature"}), 401 if __name__ == "__main__": app.run(port=3000) ``` ```php PHP theme={null} "success"]); } else { http_response_code(401); echo json_encode(["error" => "Invalid signature"]); } ?> ``` ### **Webhook Retries** To ensure reliable event delivery, OpenXSwitch automatically retries failed webhook notifications when your endpoint does not acknowledge an event successfully. #### Retry Policy * Your webhook endpoint must return a `2xx` HTTP status code to confirm successful delivery. * Any `4xx`, `5xx`, timeout, or failed response will trigger a retry. * Webhook deliveries are retried every **5 minutes** for up to **12 hours**. * If delivery still fails after 12 hours, the event is marked as `undelivered` and no further retries will occur. #### Manual Replay If your service misses a webhook event, you can manually replay the event either from the workspace console or programmatically via the Webhook API. # Webhook Events Source: https://docs.openxswitch.com/webhook/webhook-events Webhooks allow you to receive real-time notifications for events that occur on wallets in your project. ## Event Type Each notification flow corresponds to a specific lifecycle event within the Wallet Infrastructure platform: * `wallets:deposit.pending`: Triggered when an incoming deposit is detected on-chain but awaiting required network block confirmations. * `wallets:deposit.success`: Triggered when a deposit reaches required confirmations and funds are successfully credited. * `wallets:withdraw.pending`: Triggered when a withdrawal request is initiated and queued for execution. * `wallets:withdraw.success`: Triggered when an outbound withdrawal transaction is successfully confirmed on-chain. * `wallets:withdraw.failed`: Triggered when an outbound withdrawal transaction failed on-chain. * `wallets:swap.success`: Triggered when a token swap order finishes execution across target chains and assets. ## **Event Schema** ### Root Payload Fields | **Field** | **Description** | **Type** | | :- | :- | :- | | `requestId` | Unique tracking identifier for the webhook delivery request. | `string` | | `method` | Event type identifier (e.g., `wallets:deposit.success`, `wallets:swap.success`). | `string` | | `params` | Object containing event-specific transaction and resource details. | `object` | > [accordion] Transaction (Deposit | Withdraw) > > | Field | Description | Type | > | :- | :- | :- | > | `params.id` | Unique ID of the transaction record. | `string` | > | `params.refId` | External or internal system reference ID. | `string` | > | `params.idempotencyKey` | Key used for idempotency protection on state-changing requests. | `string` | > | `params.tokenName` | Display name of the cryptocurrency asset (e.g., `USD Coin`). | `string` | > | `params.tokenSymbol` | Asset ticker symbol (e.g., `USDC`). | `string` | > | `params.tokenTicker` | Platform asset identifier (e.g., `USDC_BASE`). | `string` | > | `params.tokenAddress` | On-chain contract address of the transferred token. | `string` | > | `params.decimals` | Decimal precision defined by the asset's contract. | `number` | > | `params.isNative` | Indicates if the asset is the native network currency. | `boolean` | > | `params.amount.value` | Human-readable transaction amount string. | `string` | > | `params.amount.rawValue` | Atomic unit representation of the transaction amount. | `string` | > | `params.chainDecimals` | Decimal precision of the underlying blockchain network. | `number` | > | `params.blockchain` | Target blockchain protocol identifier (e.g., `BASE`). | `string` | > | `params.protocol` | Network virtual machine/architecture type (e.g., `EVM`). | `string` | > | `params.environment` | Network mode (`testnet` / `live`). | `string` | > | `params.network` | Specific blockchain network name (e.g., `base-sepolia`). | `string` | > | `params.txType` | Primary direction of transaction (`incoming` or `outgoing`). | `string` | > | `params.status` | Current transaction execution status (`pending`, `success`). | `string` | > | `params.fromAddress` | Blockchain address originating the transfer. | `string` | > | `params.toAddress` | Destination blockchain address. | `string` | > | `params.txHash` | Blockchain transaction hash. | `string` | > | `params.note` | Optional internal note attached to the transaction. | `string \| null` | > | `params.triggerOrigin` | Trigger source (`blockchain` for detected deposits, `api` for programmatic requests). | `string` | > | `params.confirmation` | Current block confirmation count. | `string` | > | `params.confirmed` | Indicates whether network confirmation requirements have been satisfied. | `boolean` | > | `params.confirmedAt` | ISO 8601 timestamp when block confirmation was achieved. | `string` | > | `params.userId` | Unique ID of the associated User entity. | `string` | > | `params.walletId` | Unique ID of the associated Wallet endpoint. | `string` | > | `params.accountId` | Unique ID of the governing Account container. | `string` | > | `params.workspaceId` | Unique ID of the organization workspace. | `string` | > | `params.createdAt` | Creation timestamp of the transaction. | `string` | > | `params.updatedAt` | Last update timestamp of the transaction. | `string` | > | `params.wallet.id` | ID of the target wallet. | `string` | > | `params.wallet.address` | Primary blockchain address assigned to the wallet. | `string` | > | `params.wallet.type` | Infrastructure wallet type (e.g., `deposit`, `settlement`). | `string` | > | `params.wallet.protocol` | Virtual machine protocol standard (e.g., `EVM`). | `string` | > | `params.wallet.isEvmCompatible` | Indicates EVM execution capability. | `boolean` | > | `params.wallet.name` | Label or display name assigned to the wallet. | `string` | > | `params.wallet.userId` | User ID attached to the wallet. | `string` | > | `params.wallet.refId` | External mapping reference for the wallet. | `string` | > | `params.wallet.custodyType` | Custody model framework (`DEVELOPER`). | `string` | > | `params.wallet.token.balance` | Real-time updated wallet balance post-transaction. | `object` | > [accordion] Swap > > | Field | Description | Type | > | :- | :- | :- | > | `params.id` | Unique ID of the swap order. | `string` | > | `params.idempotencyKey` | Unique key sent during order creation to ensure single execution. | `string` | > | `params.refId` | System reference identifier for the swap operation. | `string` | > | `params.from.token` | Source token ticker symbol (e.g., `USDC`). | `string` | > | `params.from.chain` | Source blockchain network (e.g., `ETHEREUM`). | `string` | > | `params.from.contractAddress` | Smart contract address of the source token. | `string` | > | `params.from.amount` | Amount of source token submitted for swap. | `string` | > | `params.to.token` | Destination token ticker symbol (e.g., `USDC`). | `string` | > | `params.to.chain` | Destination blockchain network (e.g., `ARBITRUM`). | `string` | > | `params.to.contractAddress` | Smart contract address of the target token. | `string` | > | `params.to.amount` | Estimated or final output amount on the target network. | `string` | > | `params.amountType` | Swap pricing calculation mode (`exactInput` or `exactOutput`). | `string` | > | `params.slippage` | Slippage tolerance threshold applied during execution (e.g., `auto`). | `string` | > | `params.environment` | Network environment mode (`sandbox` or `live`). | `string` | > | `params.status` | Final execution status of the order (`success`, `pending`). | `string` | > | `params.txHash` | Inbound/source blockchain transaction hash. | `string` | > | `params.hashOut` | Outbound/destination transaction hash (populated once cross-chain delivery settles). | `string \| null` | > | `params.fee.token` | Token used to pay platform/execution fees. | `string` | > | `params.fee.chain` | Network chain where the execution fee was deducted. | `string` | > | `params.fee.decimal` | Decimal precision of the fee token contract. | `string` | > | `params.fee.contractAddress` | Smart contract address of the fee token. | `string` | > | `params.fee.amount` | Platform fee amount deducted for the swap. | `string` | > | `params.fee.amountInUsd` | USD valuation equivalent of the platform fee. | `string` | > | `params.bridgeFee.token` | Token used to pay cross-chain liquidity bridge fees. | `string` | > | `params.bridgeFee.chain` | Network chain where the bridge fee was processed. | `string` | > | `params.bridgeFee.contractAddress` | Smart contract address of the bridge fee token. | `string` | > | `params.bridgeFee.amount` | Cross-chain bridge provider fee amount. | `string` | > | `params.bridgeFee.amountInUsd` | USD valuation equivalent of the bridge fee. | `string` | > | `params.triggerOrigin` | Execution trigger source (`api` or `console`). | `string` | > | `params.transactionGroupId` | Shared tracking ID linking multi-leg or cross-chain swap executions. | `string` | > | `params.createdAt` | Creation timestamp of the swap order. | `string (ISO 8601)` | > | `params.updatedAt` | Timestamp when the swap order was last updated. | `string (ISO 8601)` | > | `params.walletId` | ID of the Wallet entity executing the swap. | `string` | > | `params.accountId` | ID of the Account container associated with the wallet. | `string` | > | `params.workspaceId` | ID of the organization workspace. | `string` | ## **Event Examples** > [accordion] Incoming Deposit (pending) example > > ```json theme={null} > { > "requestId": "04afc1dd8ffae1f6f8c66f96eed0f5", > "method": "wallets:withdraw.pending", > "params": { > "id": "6a382b941e117b9527366499", > "refId": "2a1ee011-e5b5-419e-a967-bb0a8f0626c3", > "idempotencyKey": "0e620f37-0f8a-4cee-b0e7-72235b697449", > "tokenName": "USD Coin", > "tokenSymbol": "USDC", > "tokenTicker": "USDC_BASE", > "tokenAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", > "decimals": 6, > "isNative": false, > "amount": { > "value": "5", > "rawValue": "5000000" > }, > "totalAmount": { > "value": "5.028011", > "rawValue": "5028011" > }, > "chainDecimals": 18, > "blockchain": "BASE", > "protocol": "EVM", > "environment": "testnet", > "network": "base-sepolia", > "txType": "outgoing", > "status": "pending", > "fromAddress": "0xda0348137a73899a156944e31c81f05f646d168c", > "toAddress": "0x226917bdc6d659672050e48ca6ce73dbd3a1d318", > "txHash": "0xee30898cdfaee9c810996756337044fd98b4b0406583dd2d5706288b97f472e5", > "totalFee": { > "value": "0.000001224105803529", > "rawValue": "1224105803529" > }, > "feeLevel": "fast", > "feeToken": "ETH", > "isBatch": false, > "destinations": [ > { > "address": "0x226917bdc6d659672050e48ca6ce73dbd3a1d318", > "value": "5", > "rawValue": "5000000" > }, > { > "address": "0x7a750d8d6e12cce09a7c15482077a8a4d4c37de4", > "value": "0.028011", > "rawValue": "28011" > } > ], > "note": null, > "triggerOrigin": "blockchain", > "confirmation": null, > "confirmed": false, > "confirmedAt": null, > "userId": "69f60c8561a6152a39f39005", > "walletId": "69f60c8561a6152a39f39005", > "accountId": "69eba97c3f7e15428aef8811", > "workspaceId": "67e723ed4b44a4f73dd2e8a2", > "createdAt": "2026-06-21T18:21:08.349Z", > "updatedAt": "2026-06-21T18:21:08.349Z", > "wallet": { > "id": "69f60c8561a6152a39f39005", > "address": "0xDA0348137A73899A156944e31C81f05F646d168c", > "type": "deposit", > "protocol": "EVM", > "isEvmCompatible": true, > "name": "user_0_Zee", > "userId": "69f60c8561a6152a39f39005", > "refId": "f3f14dcf-a233-4128-8044-5c8f03feb230", > "custodyType": "DEVELOPER", > "token": { > "name": "USD Coin", > "symbol": "USDC", > "blockchain": "BASE", > "tokenAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", > "isNative": false, > "decimals": 6, > "standard": "ERC20", > "balance": { > "value": "12.471989", > "rawValue": "12471989" > } > } > } > } > } > } > ``` > [accordion] Incoming Deposit (success) example > > ```json theme={null} > { > "requestId": "04afc1dd8ffae1f6f8c66f96eed0f5", > "method": "wallets:deposit.success", > "params": { > "id": "6a382b951e117b952736649a", > "refId": "9395d9b3-b58a-4856-8a3e-886c687f8d6f", > "idempotencyKey": "d1526226-27c2-440f-8d57-a2e3bc980e89", > "tokenName": "USD Coin", > "tokenSymbol": "USDC", > "tokenTicker": "USDC_BASE", > "tokenAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", > "decimals": 6, > "isNative": false, > "amount": { > "value": "5", > "rawValue": "5000000" > }, > "chainDecimals": 18, > "blockchain": "BASE", > "protocol": "EVM", > "environment": "testnet", > "network": "base-sepolia", > "txType": "incoming", > "status": "success", > "fromAddress": "0xda0348137a73899a156944e31c81f05f646d168c", > "toAddress": "0x226917bdc6d659672050e48ca6ce73dbd3a1d318", > "txHash": "0xee30898cdfaee9c810996756337044fd98b4b0406583dd2d5706288b97f472e5", > "note": null, > "triggerOrigin": "blockchain", > "confirmation": "1", > "confirmed": true, > "confirmedAt": "2026-06-21T18:24:28.849Z", > "userId": "69f60c8561a6152a39f39005", > "walletId": "6a38259e7b6635a105154d11", > "accountId": "69eba97c3f7e15428aef8811", > "workspaceId": "67e723ed4b44a4f73dd2e8a2", > "createdAt": "2026-06-21T18:21:08.955Z", > "updatedAt": "2026-06-21T18:24:29.478Z", > "wallet": { > "id": "6a38259e7b6635a105154d11", > "address": "0x226917Bdc6d659672050E48ca6CE73dbd3A1D318", > "type": "deposit", > "protocol": "EVM", > "isEvmCompatible": true, > "name": "dev-user-4", > "userId": "69f60c8561a6152a39f39005", > "refId": "2198ddd0-4738-4ef6-b703-d1bfa79531d0", > "custodyType": "DEVELOPER", > "token": { > "name": "USD Coin", > "symbol": "USDC", > "blockchain": "BASE", > "tokenAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", > "isNative": false, > "decimals": 6, > "standard": "ERC20", > "balance": { > "value": "5", > "rawValue": "5000000" > } > } > } > } > } > } > ``` > [accordion] Outgoing Transfer (pending) example > > ```json theme={null} > { > "requestId": "04afc1dd8ffae1f6f8c66f96eed0f5", > "method": "wallets:withdraw.pending", > "params": { > "id": "6a382b941e117b9527366499", > "refId": "2a1ee011-e5b5-419e-a967-bb0a8f0626c3", > "idempotencyKey": "0e620f37-0f8a-4cee-b0e7-72235b697449", > "tokenName": "USD Coin", > "tokenSymbol": "USDC", > "tokenTicker": "USDC_BASE", > "tokenAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", > "decimals": 6, > "isNative": false, > "amount": { > "value": "5", > "rawValue": "5000000" > }, > "totalAmount": { > "value": "5.028011", > "rawValue": "5028011" > }, > "chainDecimals": 18, > "blockchain": "BASE", > "protocol": "EVM", > "environment": "testnet", > "network": "base-sepolia", > "txType": "outgoing", > "status": "pending", > "fromAddress": "0xda0348137a73899a156944e31c81f05f646d168c", > "toAddress": "0x226917bdc6d659672050e48ca6ce73dbd3a1d318", > "txHash": "0xee30898cdfaee9c810996756337044fd98b4b0406583dd2d5706288b97f472e5", > "totalFee": { > "value": "0.000001224105803529", > "rawValue": "1224105803529" > }, > "feeLevel": "fast", > "feeToken": "ETH", > "isBatch": false, > "destinations": [ > { > "address": "0x226917bdc6d659672050e48ca6ce73dbd3a1d318", > "value": "5", > "rawValue": "5000000" > }, > { > "address": "0x7a750d8d6e12cce09a7c15482077a8a4d4c37de4", > "value": "0.028011", > "rawValue": "28011" > } > ], > "note": null, > "triggerOrigin": "blockchain", > "confirmation": null, > "confirmed": false, > "confirmedAt": null, > "userId": "69f60c8561a6152a39f39005", > "walletId": "69f60c8561a6152a39f39005", > "accountId": "69eba97c3f7e15428aef8811", > "workspaceId": "67e723ed4b44a4f73dd2e8a2", > "createdAt": "2026-06-21T18:21:08.349Z", > "updatedAt": "2026-06-21T18:21:08.349Z", > "wallet": { > "id": "69f60c8561a6152a39f39005", > "address": "0xDA0348137A73899A156944e31C81f05F646d168c", > "type": "deposit", > "protocol": "EVM", > "isEvmCompatible": true, > "name": "user_0_Zee", > "userId": "69f60c8561a6152a39f39005", > "refId": "f3f14dcf-a233-4128-8044-5c8f03feb230", > "custodyType": "DEVELOPER", > "token": { > "name": "USD Coin", > "symbol": "USDC", > "blockchain": "BASE", > "tokenAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", > "isNative": false, > "decimals": 6, > "standard": "ERC20", > "balance": { > "value": "12.471989", > "rawValue": "12471989" > } > } > } > } > } > } > ``` > [accordion] Outgoing Transfer (success) example > > ```json theme={null} > { > "requestId": "04afc1dd8ffae1f6f8c66f96eed0f5", > "method": "wallets:withdraw.success", > "params": { > "id": "6a382b941e117b9527366499", > "refId": "2a1ee011-e5b5-419e-a967-bb0a8f0626c3", > "idempotencyKey": "0e620f37-0f8a-4cee-b0e7-72235b697449", > "tokenName": "USD Coin", > "tokenSymbol": "USDC", > "tokenTicker": "USDC_BASE", > "tokenAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", > "decimals": 6, > "isNative": false, > "amount": { > "value": "5", > "rawValue": "5000000" > }, > "totalAmount": { > "value": "5.028011", > "rawValue": "5028011" > }, > "chainDecimals": 18, > "blockchain": "BASE", > "protocol": "EVM", > "environment": "testnet", > "network": "base-sepolia", > "txType": "outgoing", > "status": "success", > "fromAddress": "0xda0348137a73899a156944e31c81f05f646d168c", > "toAddress": "0x226917bdc6d659672050e48ca6ce73dbd3a1d318", > "txHash": "0xee30898cdfaee9c810996756337044fd98b4b0406583dd2d5706288b97f472e5", > "totalFee": { > "value": "0.000001224105803529", > "rawValue": "1224105803529" > }, > "feeLevel": "fast", > "feeToken": "ETH", > "isBatch": false, > "destinations": [ > { > "address": "0x226917bdc6d659672050e48ca6ce73dbd3a1d318", > "value": "5", > "rawValue": "5000000" > }, > { > "address": "0x7a750d8d6e12cce09a7c15482077a8a4d4c37de4", > "value": "0.028011", > "rawValue": "28011" > } > ], > "note": null, > "triggerOrigin": "blockchain", > "confirmation": "1", > "confirmed": true, > "confirmedAt": "2026-06-21T18:24:28.849Z", > "userId": "69f60c8561a6152a39f39005", > "walletId": "69f60c8561a6152a39f39005", > "accountId": "69eba97c3f7e15428aef8811", > "workspaceId": "67e723ed4b44a4f73dd2e8a2", > "createdAt": "2026-06-21T18:21:08.349Z", > "updatedAt": "2026-06-21T18:24:28.940Z", > "wallet": { > "id": "69f60c8561a6152a39f39005", > "address": "0xDA0348137A73899A156944e31C81f05F646d168c", > "type": "deposit", > "protocol": "EVM", > "isEvmCompatible": true, > "name": "user_0_Zee", > "userId": "69f60c8561a6152a39f39005", > "refId": "f3f14dcf-a233-4128-8044-5c8f03feb230", > "custodyType": "DEVELOPER", > "token": { > "name": "USD Coin", > "symbol": "USDC", > "blockchain": "BASE", > "tokenAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", > "isNative": false, > "decimals": 6, > "standard": "ERC20", > "balance": { > "value": "12.471989", > "rawValue": "12471989" > } > } > } > } > } > } > ``` > [accordion] Swap (success) example > > ```json theme={null} > { > "requestId": "04afc1dd8ffae1f6f8c66f96eed0f5", > "method": "wallets:swap.success", > "params": { > "id": "6a68cfce4ee8fda4940bfad0", > "idempotencyKey": "360316a4-c6d8-4efa-a2ea-2ef5847be96e", > "refId": "whprn-1785252137197-bb3749136904", > "from": { > "token": "USDC", > "chain": "ETHEREUM", > "contractAddress": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", > "amount": "6" > }, > "to": { > "token": "USDC", > "chain": "ARBITRUM", > "contractAddress": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", > "amount": "5.913586" > }, > "amountType": "exactInput", > "slippage": "auto", > "environment": "testnet", > "status": "success", > "txHash": "0xc825ef19cefb6085aefe39a453e5f97893755f2ca0b0c1c4b061ebead711421d", > "hashOut": null, > "fee": { > "token": "USDC", > "chain": "ETHEREUM", > "decimal": "6", > "contractAddress": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", > "amount": "0.031403", > "amountInUsd": "0.031399999999999997" > }, > "bridgeFee": { > "token": "USDC", > "chain": "ARBITRUM", > "contractAddress": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", > "amount": "0.016571", > "amountInUsd": "0.016569094334999999" > }, > "triggerOrigin": "api", > "transactionGroupId": "568a808e-e0a7-4d54-ae93-4859b2e1d725", > "createdAt": "2026-07-28T15:50:37.763Z", > "updatedAt": "2026-07-28T16:05:08.167Z", > "walletId": "6a68b709637b8f5046f9e431", > "accountId": "6a4e5f0257cd222d532fd201", > "workspaceId": "68448233bdb9b58d5c9ef9e8" > } > } > ``` ## **Best Practices** 1. **Idempotent Processing:** Ensure your webhook handlers are idempotent to avoid duplicate processing. 2. **Final Events Only:** Update balances only on final events, Refer to the full list of `supported events` to identify valid final event types. 3. **Acknowledgment:** Always respond with a **2xx HTTP status code** within 1 minutes to acknowledge receipt. 4. **Security:** Verify webhook payload signatures to ensure authenticity.