How to create a safe Bybit API key for a trading bot
Last updated: 2 December 2026
A trading bot needs an API key to place orders on your Bybit account. Set up properly, that key can trade but can never move money out of your account, and it only works from one server. This guide shows how, and what to check before you hand a key to anyone.

Don't have a Bybit account yet? Create one with our referral link. Hytyde may earn a commission from Bybit. It costs you nothing.
What a safe key looks like
- Trading on, withdrawals off. A bot never needs to withdraw. A key that can withdraw is a key that can empty your account if it leaks.
- Locked to one IP address. The key only works from the bot's server, so a copied key is useless anywhere else. On Bybit it also stops the key from expiring: keys without an IP address stop working after 90 days.
- Only the permissions the bot needs. For a futures bot that's Orders and Positions under Contract (or Unified Trading). Nothing else.
Whoever runs the bot should never ask for your password, your two-factor codes, or a key with withdrawals switched on. If they do, stop there.
Before you start
- Consider a sub-account. On Bybit, open Sub-accounts and create a standard sub-account for the bot. It keeps the bot's trades separate from yours and makes its results easy to follow. Make it a Unified Trading Account.
- Move the USDT the bot will trade with into that account (Assets → Transfer).
- Check what the bot needs on the futures page. Many futures bots need a particular margin mode (Cross or Isolated) and Position Mode (One-way or Hedge). The margin mode is the button next to the leverage on a USDT perpetual; the position mode is in the order panel's settings. Change them before the bot starts, with no positions open.
If you use a sub-account, sign in to it (or switch to it) before creating the key, so the key belongs to the account the bot trades on.
Create the key
- Go to API Management (under your profile, or search for it).
- Click Create New Key, choose System-generated API Keys, then API Transaction.
- Give the key a name you'll recognise, such as the bot's name.
Set its permissions
- Choose Read-Write.
- Choose Only IPs with permissions granted are allowed to access the OpenAPI and enter the IP address of the bot's server. The bot's provider should give you this.
- Under Contract (or Unified Trading), tick Orders and Positions.
- Leave Withdraw unticked, and leave everything else you don't need off, such as spot, options, transfers and earn.
- Submit, and complete Bybit's security check.
Bybit then shows the new API key and secret. Copy the secret now: Bybit only shows it once. If you lose it, delete the key and make a new one.
Check it before you use it
Look at the key in API Management and confirm:
- Its permissions show Orders and Positions for contracts, with no Withdraw.
- It shows the IP address you entered, and no expiry date.
A good bot provider checks this too when you connect the key, and refuses a key that can withdraw.
Keep it safe
- Paste the key only into the bot's own connection page, never into a chat, an email or a support ticket. No genuine support team needs your secret.
- Store it nowhere else. If you need to connect again, make a new key.
- Delete keys you no longer use in API Management. If you stop a bot, delete its key too.
- If you think a key has leaked, delete it straight away. Deleting a key stops it at once; your funds stay where they are.
Common problems
- The key expired: it wasn't locked to an IP address. Create a new key with the bot server's IP.
- The bot says the key is invalid: check you copied the whole secret with no spaces, that the IP you entered is the bot server's address, and that the key belongs to the account the bot trades on (main account or sub-account).
- The bot can't open trades: make sure the USDT is in the account's Unified Trading balance, and that the margin and position modes match what the bot asks for.
Hytyde's bots connect with exactly this kind of key, trade-only and locked to our server, and we check it when you connect. You can see every bot's daily results, good days and bad, on the Futures Bots page.
Trading crypto futures can lose you money, including more than you expect when leverage is used. Past results don't guarantee future results. This article is general information, not financial advice.
Comments
No comments yet.