BRAIN Docs

Bybit API Connection Guide

  1. Log in to your Bybit account

    Open Bybit and log in to your account. If you do not have an account yet, create one first and complete the basic security setup.

    Bybit login page with the account sign-in form
  2. Check access to futures

    Before creating an API key, open the futures trading section.

    Go to: Trade → Derivatives / Futures → USDT Perpetual

    Open any trading pair, for example BTCUSDT Perpetual.

    If Bybit asks you to activate futures trading or accept the terms, complete this step.

    Bybit derivatives menu with the USDT Perpetual futures section open
  3. Margin toggle - not required

    Older versions of this guide asked you to switch on the Margin toggle in the Spot trading panel (shown below). BRAIN trades USDT-M perpetual futures only, so this is not needed - you can skip this step and leave Margin off.

    Bybit Spot trading panel with the Margin toggle - not required for BRAIN
  4. Check basic account verification

    Make sure that basic verification has been completed on the account if Bybit requires it for API creation or trading. The verification status can usually be found in the profile section or identity verification section.

    Bybit identity verification page showing the account verification status
  5. Go to API Management

    Open the profile menu and go to API / API Management.

    You can also find this section by searching for API.

    Bybit profile menu with the API Management entry
  6. Create a new API key

    Click Create New Key to start creating a new API key.

    If Bybit offers several options, select System-generated API Keys.

    Note: sometimes the Create New Key button may not respond immediately. If this happens, click it again or refresh the page and repeat the action.

    Bybit API management page with the Create New Key button
  7. Select the API key type

    Select System-generated API Keys if the exchange offers several options.

    Bybit dialog for choosing between system-generated and self-generated API keys
  8. Set the main API parameters

    Enter the API key name, for example: BRAIN

    In the settings, select:

    API Transaction Write name for example “BRAIN” Read-Write Only IPs with permissions granted are allowed to access the OpenAPI

    In the permissions section, enable Unified Trading.

    Then tick only the Contract (futures) permissions:

    • Orders
    • Positions

    Leave USDC Contracts, SPOT Trade, Wallet (Account Transfer, Subaccount Transfer, Withdrawal), Exchange and Earn unchecked - BRAIN trades USDT perpetual futures only, and Withdrawal must stay OFF. (The screenshot shows an older setup with USDC Derivatives and SPOT Trade ticked; they are not required.)

    Bybit API key creation form with Read-Write access, IP restriction and the Unified Trading permission table
  9. Copy IP addresses from Brain

    Open @Brain_Trading_Bot in Telegram.

    Go to: Exchanges → Bybit → Connect Bybit

    Click Copy IP addresses for whitelisting.

    BRAIN Mini App showing the Connect Bybit screen with the IP addresses to copy
  10. Paste IP addresses on Bybit

    Return to the API key creation page on Bybit.

    Paste the copied IP addresses into the IP whitelist / IP restriction field.

    After that, click Submit.

    Bybit API key form with the copied IP addresses pasted into the IP restriction field
  11. Complete security verification

    Bybit may ask you to confirm the API key creation.

    Confirm the action through:

    • email code
    • 2FA code
    • SMS code, if enabled
    Bybit security verification dialog requesting email and 2FA codes
  12. Copy API Key and Secret Key

    After creating the API, copy:

    • API Key
    • Secret Key

    Important

    Secret Key may be shown only once. Save it immediately.

    After copying, click Understood.

    Bybit dialog displaying the newly created API Key and Secret Key
  13. Complete the Bybit connection in Brain

    Return to Brain Mini App.

    Paste:

    • API Key
    • Secret Key

    Then click Save API Keys.

    After saving, check the connection status. If everything is connected correctly, the status next to Bybit should show Connected / Active.

    BRAIN Mini App showing Bybit with a connected and active status

Bybit notes

Before creating an API key on Bybit, make sure that futures trading is already activated on your account. To connect BRAIN, the API key must be created in Read-Write mode and must have the Unified Trading - Contract permissions (Orders and Positions). If the connection does not work, check that these two are enabled and that the IP addresses for whitelisting were added correctly. SPOT Trade and Margin are not needed, and Withdrawal and internal transfers must stay OFF.