Skip to content
Coinland

Bybit guidesAPI

Create a Bybit API Key Safely: Permissions, IP Binding, Expiry

Create a Bybit API key on the website in minutes. Pick the narrowest permissions, decide on IP binding or 90-day expiry, and fix invalid-key errors fast.

Published: Last checked: How we check our guides

You create a Bybit API key on the website: open API management, complete a short form and approve it with a Google Authenticator code. The key lets software act on your account, for example a trading bot, a portfolio tracker, a tax tool or a script you wrote. Filling in the form is quick. What deserves your attention is the permissions and IP choice, because they set the limit on what a stolen key could do, and most of this page is about those two settings.

Three things that block key creation

First, the device. Bybit's help center says keys can be made on the website only, and the mobile app has no API option. Second, 2FA. Google Authenticator must already be active, since the last step of the form asks for its code.

Third, account age. Bybit says it may restrict key creation during the first 48 hours after sign-up as a risk-control measure. If the create button does nothing on a fresh account, that window is the probable cause.

Your region and the Bybit entity serving you can also limit API access. When the API page is absent or reduced, read the terms for your entity.

Bybit API key create steps on the website

Sign in on the website, click the profile menu in the top right corner and pick the API entry to reach the API management page. Click the button to create a new key.

Bybit first asks for the key type. A system-generated key means Bybit produces both the key and the secret, and this is what most tools expect. A self-generated key suits people who make their own key pair and upload the public half.

Then you state the purpose. When you connect a third-party application that appears in Bybit's list, pick it there so the key is tied to that service. For anything else, set the key up for personal use and name it after whatever will use it, such as the script or the server, so you can tell keys apart later.

Permissions: give the tool only what it uses

You choose read-only or read-write, then tick the areas the key may reach, for instance orders, positions and account information. Trackers and tax tools need read access and nothing more. A trading bot needs order permissions and rarely anything beyond them.

Keep withdrawal and transfer permissions switched off unless you have a concrete need and accept the risk. If a key that can only read and trade leaks, it still cannot send funds off the exchange. Bybit's error list includes a specific code for requests the key is not permitted to make, so if you left something out, the error points straight to it and you can add the permission afterwards.

IP binding versus the 90-day expiry

The form asks whether to limit the key to particular IP addresses. Once an address is bound, calls from any other address fail even with the right key and secret. For software running on a server with a fixed address, nothing else protects a key as well.

You may leave the key unrestricted, but then it expires. Bybit's API documentation says a key without a bound IP address stops working after 90 days. On the edit screen you can renew it for a further 90 days by confirming the unrestricted setting again with email and authenticator codes. The key and secret do not change.

On a home internet connection whose address changes, you have two realistic options. Renew every 90 days, or move the program to a host with a static address.

Store the secret the moment it appears

Once the authenticator code is accepted, Bybit displays the API key and its secret. Paste the secret directly into a password manager or the secret store on your server. Handle it like a password. It does not belong in chats, screenshots, shared documents or public code repositories.

If you think a key has leaked, delete it from the API management page and make a new one. Deletion takes effect at once, which is safer than trimming permissions on a key that a stranger may already have.

Reading Bybit's invalid-key errors

Bybit's API documentation names an environment mismatch as the usual culprit. Mainnet, testnet and demo trading are three separate environments, each with its own keys. A key made on the live site fails against testnet or demo endpoints, and keys from those environments fail on mainnet. For demo trading, switch the site into demo trading mode before creating the key.

Other problems come with their own errors. A key with no bound IP that passed its 90 days is reported as expired. A call from an address missing from the key's list comes back as an unmatched IP.

A wrong secret or a badly built signature gives a signature error. If your computer clock has drifted, you get a timestamp error, because Bybit refuses requests that fall outside its time window.

A quick fix checklist

Start from the error code and message Bybit returns, not from a guess. Then work down this list. Copy the key and secret again and make sure no spaces came along. Sync the system clock with an internet time source. Confirm the endpoint address belongs to the same environment the key was made in. Check the key's permissions against the call that failed.

Those steps settle most cases. If the key still fails, delete it and create a fresh one with the same settings, since that rules out a copy mistake you cannot see.

Questions and answers

Can I make a Bybit API key in the mobile app?

No. Bybit's help center says API keys are created on the website only.

Do Bybit API keys expire?

Keys without a bound IP address expire after 90 days, and you can renew them for another 90 days on the edit screen. Binding an IP address removes that expiry.

Why won't Bybit let me create an API key on a new account?

Bybit may block key creation for the first 48 hours after registration as a risk-control step. Try again after that period.

Does my trading bot need withdrawal permission?

Almost never. Trackers and bots run on read and trade permissions, and a key without withdrawal rights cannot move funds out if it leaks.

Is a Bybit demo trading API key different from a live one?

Yes. Demo trading is its own environment. Switch the site to demo trading mode, create the key there and send requests to the demo API domain.

Crypto trading carries a high risk of loss, and leveraged products can lose your whole deposit. Nothing here is investment advice. Check that the exchange is available in your country before you sign up.

Related guides

Save up to 50% on fees + get up to $100 in rewards

Eligibility and terms may apply. The link fills in our referral code at sign-up. Check the code field before you submit: a registered code usually cannot be changed.

Get Bybit Offer

Coinland earns a commission from the exchange when you sign up through the links on this page, based on the trading fees you later pay. The link does not raise your fee rate.