Getting Started with OpenXSwitch Sandbox: A Complete Guide for Developers

Getting Started with OpenXSwitch Sandbox: A Complete Guide for Developers

OpenXSwitch Sandbox Environment

The OpenXSwitch Sandbox is a simulated environment that mirrors the live platform. It allows you to test API endpoints, webhooks, and transaction flows without any real blockchain interaction.

Why Use the Sandbox Environment?

(Key Features & Benefits for Developers)

Hereโ€™s why developers love the OpenXSwitch Sandbox:

  • ๐Ÿงช No real funds needed โ€“ test everything safely.
  • โšก Instant responses โ€“ webhook events are sent to your test URL in real time.
  • ๐Ÿงฉ No setup stress โ€“ you donโ€™t need test tokens or unreliable faucets.
  • ๐Ÿ’ธ No subscription required โ€“ just plug in and start testing.
  • ๐Ÿง  No Web3 experience needed โ€“ designed for both Web2 and Web3 developers.
  • ๐ŸŒ API parity with live mode โ€“ all key endpoints have sandbox equivalents.

Prerequisites and Tools Youโ€™ll Need

To begin, you only need:

  • An OpenXSwitch account
  • Basic programming skills (any language that supports HTTP requests)

Understanding Live vs. Sandbox Mode

Almost every live API endpoint has a sandbox equivalent with the prefix:

/v1/sandbox/...

Example:

  • Live โ†’ https://api.openxswitch.com/v1/wallet/create
  • Sandbox โ†’ https://api.openxswitch.com/v1/sandbox/wallet/create

๐Ÿ‘‰ To view all available sandbox endpoints, scroll to the bottom of our API documentation.

Thereโ€™s currently no SandBox UI. All actions are performed via API.

How to Get Started

You can get access in one of three ways:

A dedicated Account Manager will reach out within 12 hours to guide you through setup.

Once you have access, follow these steps ๐Ÿ‘‡

Step 1: Obtain Your API Key

  1. Log in to your OpenXSwitch Dashboard
  2. Navigate to API Keys
  3. Click Create API Key, then copy your key

โš ๏ธ Important Notes:

  • Sandbox keys work only with sandbox endpoints.
  • Live keys will not work in Sandbox.
    ๐Ÿ‘‰ See API Permission details.

Step 2: Set Up Your Webhook

Webhooks allow your app to receive real-time updates for deposits, withdrawals, and swaps.

  1. Go to Dashboard โ†’ Webhooks
  2. Add your Webhook URL
  3. Test it using sandbox events

๐Ÿ‘‰ Learn more in our Webhook Setup Guide.

Creating and Managing Wallets

Prime Wallet

You donโ€™t need to create one; itโ€™s automatically generated during onboarding.

Sub-Wallets

Sub-wallets can currently be created only via API (Dashboard support coming soon).

Endpoint:
POST /v1/sandbox/sub-wallet/create

Request Example:

{
  "email": "test@openxswitch.com",
  "name": "test1",
  "clientUserId": "......."
}

Learn more: Sub-wallets on OpenXSwitch a game-changer for business growth

Generating Blockchain / Deposit Addresses

Before generating a deposit address, youโ€™ll first need to fetch the list of supported currencies.

Step 1: Retrieve Supported Rechargeable Currencies

Endpoint:
GET /v1/mix/currency/recharge

Request Example:

{
  "success": true,
  "data": [
    {
      "coin": "USDT",
      "iconUrl": "https://cdn.openxswitch.com/public/logos/svg/usdt.svg",
      "chains": [
        {
          "chain": "ERC20",
          "needTag": "false",
          "depositConfirm": "12",
          "withdrawConfirm": "64",
          "minDepositAmount": "0.001",
          "minWithdrawAmount": "10",
          "txUrl": "https://etherscan.io/tx/"
        }
      ]
    }
  ],
  "totalPage": 0,
  "pageNo": 0,
  "pageLimit": 0
}

Each currency has a list of supported chains.

Coin = Asset (e.g. USDT)
Chain = Network the coin runs on (e.g. ERC20, TRC20, BEP20)

โœ… Use this information for deposit, withdrawal, and instant-swap endpoints.

Step 2: Create a Deposit Address via API

Endpoint:
POST /v1/sandbox/sub-wallet/address

Request Example:

{
  "subWalletId": ".........",
  "coin": "USDT",
  "chain": "ERC20"
}

Response Example:

{
  "success": true,
  "data": {
    "coin": "USDT",
    "chain": "ERC20",
    "address": "0x123456789abcdef..........",
    "tag": "Memo123"
  }
}

Testing Deposits

OpenXSwitch Sandbox provides a deposit simulation endpoint; this sends a mock webhook event to your configured URL.

Endpoint:
POST /v1/sandbox/sub-wallet/deposit

Request Example:

{
  "destination": "on_chain",
  "status": "success",
  "coin": "USDT",
  "amount": "100",
  "chain": "ERC20",
  .....
  .....
}
  • fromAddress and toAddress โ†’ required for on-chain deposits
  • fromWalletId and toWalletId โ†’ required for internal transfers

A dummy webhook event will be sent to your webhook URL.
๐Ÿ‘‰ See sample webhook payloads here.

Trading API / Instant Swap

To use Instant Swap or Trading APIs, your wallet must first be activated for trading.
๐Ÿ‘‰ Check the Trading Wallet Activation Guide for setup instructions.

More updates on the Trading API are coming soon!

Going Live

When youโ€™re ready for production:

  1. Generate a Live API Key in your dashboard.
  2. Replace /sandbox/ with the live endpoint.

Example:

Sandbox โ†’ https://api.openxswitch.com/v1/sandbox/...
Live โ†’ https://api.openxswitch.com/v1/...

Thatโ€™s it; youโ€™re live ๐Ÿš€

Automation & Collection Rules

If you want to auto-move funds whenever a deposit is made, you can configure automation rules in your dashboard.
๐Ÿ‘‰ See Automation Setup Guide for details.

Monitoring and Debugging

Keep your integration stable with built-in monitoring tools:

  • ๐Ÿ“Š API Logs โ€“ tracks every request and response
  • ๐Ÿ”” Webhook Logs โ€“ confirms events were delivered successfully

Developer Resources

Final Thoughts

The OpenXSwitch Sandbox is built to make developer testing fast, easy, and realistic; without dealing with blockchain complexity.
Start small, experiment, and when youโ€™re readyโ€ฆ just remove /sandbox/ and go live!

Previous Article

How to Use Wallet Infrastructure for Multi-Chain Asset Management

Next Article

Unified Crypto Balances: How OpenXSwitch Makes It Easy