Getting API Keys for Bybit

Important: before creating keys, Google Authenticator two-factor authentication must be configured.

Main Account

  1. Log in to your Bybit account

  2. Go to the API section

  3. Click "Create New Key"

  4. Select type: "System-generated API Keys"

Configuring Parameters

  1. In the "API key name" field, enter a name (for example, "MoonTrader")

  2. Set the following parameters:

    • Read-Write

    • Unified Trading Account:

      • Orders

      • Position

      • USDC Derivatives Trade

      • Trade

Configuring IP Whitelist

When creating API keys, it is recommended to specify a list of allowed IP addresses. Only devices with the specified IPs will be able to use the key — this protects against unauthorized access, even if an attacker obtains your keys.

Which IPs to specify:

  • the public IP address of the server running the MoonTrader core

  • the public IP address of the server with Watchdog monitoring system (if used)

Configuration:

  1. Select "Only OpenAPI has access to IP with special permission"

  2. Add the external static IP of your server with MoonTrader core

  3. If using Watchdog on a separate server — also add its IP

Saving Keys

Save the API Secret — it is displayed only once.

Creating Keys for Subaccounts

  1. In the interface, switch to the required subaccount

  2. Go to the subaccount API management section

  3. Repeat the key creation procedure

Last updated