Skip to main content

Testing Your Integration

Before you deploy your application or trading bot to the live Mainnet environment, it is crucial to test your integration safely. xRocket provides a complete Testnet environment that mirrors the functionality of the production system but uses simulated funds and separate accounts.

The Difference Between Testnet and Mainnet

The Testnet is a sandbox. You can place orders, manage balances, and generate errors without any financial risk.

Here are the key differences:

FeatureMainnet (Live)Testnet (Sandbox)
API Base URL
Telegram Bot@xRocket@xrocket_testnet_bot
FundsReal cryptocurrencySimulated test funds (Testnet TON, Testnet USDT)
API TokensProduction Bearer TokensTestnet Bearer Tokens

How to Access the Testnet

Separate Credentials Required

You cannot use your Mainnet credentials on the Testnet, and vice-versa. You need a separate Testnet account and token.

1. Create a Testnet Account

2. Generate a Testnet Bearer Token

  • Within the Testnet bot, navigate to Menu > Settings > Exchange settings > API token.
  • Generate your unique Testnet Bearer Token. This is the token you will use with the Testnet Base URL.

3. Get Testnet Funds

Obtain free simulated funds to test your strategies:

What to Test

Once configured, you can simulate your entire workflow:

  • Fetching Market Data: Ensure you can correctly read the order book and ticker from the Testnet API.
  • Placing Orders: Test placing various order types (market, limit), canceling open orders, and checking order history.
  • Wallet Management: Verify you can deposit and withdraw.
Test Your Full Workflow

Thorough testing on the Testnet ensures your code is robust and ready for the live market environment. Test all edge cases, including error handling and rate limits, before switching to Mainnet.