Updating API keys
Keys are replaced right on the bot card, with the 🔑 API keys button: send a new pair in one message and the bot keeps working with it. There is no need to recreate the bot, the channels or the settings.
What it is
Replacing the key-and-secret pair on an existing exchange bot. You need it when:
- you reissued the key on the exchange (the old one was deleted or compromised);
- the key has expired — the bot reported “API keys have expired. (To update them — «🔑 API keys» on the bot card)”;
- the key will expire soon — the bot sent “⏳ API key will stop working soon” (7, 3 and 1 day before; the 👛 Open account button under it leads to the account page with “Change keys”, see API key permissions and IP whitelist);
- the key lost its permissions — “Your API key is invalid or lacks required permissions. Update API keys according to the instructions”;
- you want to restrict the key by IP and created a new one for that.
Where in the bot
🏠 Home → 🤖 Bots → choose a bot (or 👛 Portfolio → the account) → 🔑 API keys.
In the Sync app the same is done with the 👛 Account button on the bot card → Change keys (with a confirmation in Telegram, see the “On the website” section below).
How to set it up
- Create a new key on the exchange with the required permissions: for a
Bybit Spotbot — spot trading, forBybit Futures— derivatives trading (see API key permissions, IP whitelist and the unified trading account), forBingX Futures— Read and Perpetual Futures Trading. A copy-trading master account key will not work. Step by step — How to create a Bybit API key manually and How to create an API key on BingX; the 📖 How to create a Bybit key manually button (for a BingX bot — 📖 How to create a BingX key) on the key replacement screen opens them too. - On the bot card, tap 🔑 API keys. The connected key status opens: the account, the exchange, the first and last characters of the key and how it was connected — manually or by logging in with the exchange. The 🔍 Check key button asks the exchange and shows the answer: whether it accepts the key, whether trading is allowed, whether withdrawals are closed, whether the key is bound to an IP and when the exchange will disable it. Tap 🔄 Replace key — the bot writes: “Send a new pair separated by a space — the API key and the secret: it replaces the current bot key”, with the exchange login button and the key creation steps below.
- Send the key and the secret in one message, separated by a space, the key first (the bot also accepts the pair on the key status screen, without tapping 🔄 Replace key):
AbCdEfGhIjKlMnOpQr 1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r - The bot checks the format and the length (of a Bybit key), the uniqueness of the pair, its validity and its permissions. On success: “API keys successfully updated”. If the key was created without an IP restriction, a warning “⚠️ API key without IP whitelist” appears below with the address you can add to the key whitelist on the exchange — that is a recommendation, not a requirement. The ‹ Back button returns you to the previous screen — the key status (🔑 API keys); to get to the bot card, tap ‹ Back once more (or 🏠 Home → 🤖 Bots).
- Delete the old pair on the exchange so that nobody can use it. If the old key was obtained with the login button, in API management on Bybit it is the SyncTrade application key.
For a Bybit bot the easy way is the 🔐 Log in with Bybit button on the replacement screen (🔑 API keys → 🔄 Replace key): log in to Bybit, allow access and tap “Confirm in Telegram” — the bot key is replaced automatically, nothing to copy. The bot answers “✅ The key of the bot «MY_FUTURES» is replaced: Bybit account (UID 123456789) is connected.” and shows the 🤖 To the bot card button. Details — Log in with Bybit. BingX has no such button — the key is entered manually only.
While the bot has open trades or running Grid/DCA bots, a new key is accepted only from the same exchange account. A key from another account is rejected: “The new key belongs to a different exchange account, and this account has open trades or running Grid/DCA bots: the positions of the old account would be left unmanaged. Create a key on the same exchange account or close the trades and stop the bots first.”
On the website
Website app.sync.trade → Portfolio → Accounts → the account card → Change keys (in the app this page is opened by the 👛 Account button on the bot card). The New keys — MY_FUTURES form opens with the hint “The new key replaces the current one after you confirm in Telegram. The account bots keep working with the new key.” Enter the API Key and API Secret and press Send for confirmation — the website shows “Waiting for confirmation in Telegram (up to 15 minutes)…”, and the main bot sends:
🔐 Changing API keys
Changing the keys of the account «MY_FUTURES» (…) was requested in the web cabinet: New API key: …
Device: …, IP: …
If this was you, tap «Confirm» (the button works for 15 minutes): we check the new key on the exchange and save it. If not, tap «This was not me»: the request is cancelled and all web cabinet sessions are closed.
Tap ✅ Confirm — the bot checks the key on the exchange and answers “✅ Done: the key was checked on the exchange and saved. You can see the result in the web cabinet too.”, and the website shows “The keys are replaced.” If the key does not fit, the bot writes “⚠️ The key was not accepted: …” with the reason and “Fix it and send it again in the web cabinet.” The 🚫 This was not me button cancels the request and closes all cabinet sessions — so a stolen website sign-in cannot swap the keys unnoticed. The same-exchange-account rule applies here too. More about the page — Accounts on the website.
Example
The bot “MY_FUTURES” sent a notification “API keys have expired. (To update them — «🔑 API keys» on the bot card)”. You created a new key on Bybit with the derivatives trading permission and an IP restriction, opened 🤖 Bots → “MY_FUTURES” → 🔑 API keys and sent “key secret”. The answer “API keys successfully updated” means the channels, the trading settings and the Grid and DCA bots on this bot all stayed in place.
Limits and allowed values
| Parameter | Value |
|---|---|
| Input format | Exactly two values separated by a space: the key, then the secret |
| Key / secret length | On Bybit — 18 / 36 characters; for BingX the length is not checked |
| Uniqueness | The pair must not be registered on any bot |
| Permissions | On Bybit — Spot Trading for a spot bot, Derivatives / Contract for a futures one; on BingX — Read and Perpetual Futures Trading |
| Copy-trading master account | Not accepted |
| Read-only key | Not accepted — Orders and Positions permissions are needed |
| A new key with open trades or running Grid/DCA bots | Only from the same exchange account |
| Changing keys on the website | Only after ✅ Confirm in Telegram, the button works for 15 minutes |
| IP whitelist | Recommended, not required |
| “Log in with Bybit” button | Bybit only; the Bybit account must not be connected with the button to another of your bots |
Common mistakes and what the bot says
- “Send exactly TWO values separated by a space: the API key first, then the secret key. You sent 1 part(s). Example: AbCdEfGhIjKlMnOpQr 1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r” — the key and the secret go in one message, separated by a space.
- “Invalid API key length: 20 chars (must be 18). Copy the full key from Bybit, without extra spaces.” / “Invalid secret key length: 30 chars (must be 36)…” — copy the values again (the bot checks the length of Bybit keys only). The same two replies come if the message contains extra characters or is not a key pair at all.
- “This API key pair already exists in the system” — this pair is already used by another bot.
- “API key is invalid” / “Failed to verify API keys” — the key was deleted on the exchange, entered with a mistake, or the exchange did not answer; check it and try again.
- “API keys do not have the required permissions” — the key has no permission to trade on this bot's market (see API keys do not have the required permissions).
- “This API key belongs to a copy-trading master account. All your Grid/DCA orders would be automatically copied to your followers. Please use a regular account without copy-trading.”
- “This API key is read-only. The bot needs trading permissions: create a key with Orders and Positions permissions (on some exchanges this permission is called «Perpetual Futures Trading»).” — the key has no permission to trade; create a new one with the right permissions.
- “The new key belongs to a different exchange account, and this account has open trades or running Grid/DCA bots…” — create a key on the same exchange account, or close the trades and stop the Grid/DCA bots first.
- “The web cabinet session the keys were sent from is already closed — the keys were not saved. Sign in to the cabinet and send them again.” — you confirmed the change from the website after the cabinet session had ended.
