Skip to main content

Using Testnet API Keys for Simulated Trading

When you're ready for advanced strategy validation, connecting testnet API keys in Gunbot offers a realistic simulation environment. This approach allows you to simulate trading with all API calls involved, using an exchange's dedicated test environment.

Info

A testnet is a simulated trading environment provided by many cryptocurrency exchanges. It allows users to test trading strategies with virtual funds, mimicking live market operations without risking real assets.

Setting Up Testnet API Credentials​

To start testing with a testnet:

  1. Create testnet API credentials on your chosen exchange. Many exchanges offer these test environments, and each will have its own specific setup process for obtaining API keys.

Configuring Gunbot for Testnet Trading​

To configure Gunbot for testnet trading:

  1. Navigate to 'Manage API Slots' in your Gunbot interface.
  2. Add a new API slot or choose to edit an existing one.
  3. Ensure you select the 'Use testnet' option when entering your API credentials. This directs Gunbot to connect to the exchange's testnet instead of the live market.

Understanding Testnets vs. Gunbot Simulator​

Both exchange testnets and the Gunbot simulator serve as valuable tools for testing trading strategies, each presenting distinct advantages based on their operational environment.

  • Testnets are provided by exchanges as parallel trading environments with their own market dynamics and order books. These environments allow for testing strategies in a simulated market setup, reflecting a set of conditions that might not perfectly mirror live markets.

  • Gunbot Simulator uses actual historical or live market data to simulate trading activities. It enables testing against real market conditions without executing genuine trades or requiring an exchange testnet account. A key advantage of the simulator is the ability to run multiple instances of Gunbot, each testing different strategy variations on the same market data. This capability allows for comprehensive strategy testing and optimization, which is not feasible with testnets if multiple bot instances interfere with shared order history and balances.

The choice between these tools depends on your specific testing requirements and the desired fidelity of the simulation to real-world trading conditions.