Skip to content

Testing without orders ​

Available environments ​

The released @siebly/htx-api clients use production services and do not expose a testnet or demoTrading switch. The Spot API reference marks its legacy Testnet as stopped.

HTX also advertises Unified Account demo trading. The SDK does not provide demo routing for this service.

Test without placing orders ​

  • Start with public tickers, instrument metadata and subscriptions. No credentials are required.
  • Test read-only account access with the minimum necessary API permissions.
  • Validate request construction and your own order-state transitions with local fixtures or a mock transport that cannot send production requests.
  • Exercise timeout handling, reconnect recovery, duplicate events and graceful shutdown before enabling writes.

Coverage and limitations ​

baseUrlKey and wsEnvironment choose production connectivity routes; AWS is not a test environment. Use the supported routing options for the product you need.

Read-only checks leave trading disabled. To test order submission and cancellation, use a separate integration with explicitly configured account permissions and order limits.

The following general guidance applies when a supported testing service is available for the API you use. It does not add a simulation mode to these clients.

What these environments can prove ​

Use test environments to check request formats, credentials, order handling and reconnect recovery within the features they support. Testnet liquidity, prices, fills, fees and availability can differ substantially from production. Accounts, balances and order history may also be reset.

Testnet is not a reliable place to evaluate strategy performance. Demo trading may use production market data, but simulated fills do not establish live profitability, slippage, execution quality or capacity. Treat both as integration tests, not evidence that a strategy will succeed with real funds. See the CEX testnet overview for the distinction between testnet and demo trading.

Before switching environments ​

  • Keep credentials and configuration separate for each account, product and environment. Never fall back to live credentials when a test key is missing.
  • Configure every REST, subscription and WebSocket API client separately. Changing one client does not reconfigure another.
  • Check the selected environment's supported endpoints and instruments before sending a request. Similar method signatures do not imply identical availability.
  • Keep authenticated requests on your server. Confirm the destination and account before enabling any write operation.

Production remains the default. Selecting a test environment is an explicit choice for each client; it is not a global SDK setting.

Configuration · Authentication · Production usage

Built by Siebly. Open source SDKs for exchange APIs.