Skip to main content

Creating API Keys

To start trading, you need to create API keys.

BEFORE YOU START, YOU NEED TO ENABLE TWO-FACTOR AUTHENTICATION

How to create an API key

  1. Go to Profile → API keys → Create API key.
  2. Come up with a name for the key.
  3. Set permissions for the key:
    • Reading is enabled by default. The setting cannot be disabled.
    • Spot trading. Provides access to spot account trading using the key.
    • Futures trading. Provides access to futures account transactions using the key.
  4. Set IP access restrictions:
    • Unlimited access from any IP. Using the key allows you to connect from any IP address. Not recommended.
    • Only trusted IP addresses. The connection will only be available from the specified IP addresses. Recommended setting, even if third parties got access to your key, they won't be able to use it without the device or proxy with this IP address.
  5. Trusted IP addresses:
    • Enter address.
    • Click Add.
    • You can add multiple addresses one after another.
  6. Confirm adding the key with two one-time codes.
    • Code from your email.
    • Code from Google Authenticator.
  7. Save the keys.

After confirmation, you need to copy the secret key. To trade, you will need the public key + the secret key. Never store keys unencrypted or share them with others.

THE SECRET KEY IS ONLY SHOWN ONCE. IF YOU DID NOT COPY THE SECRET KEY, YOU CAN DELETE THE CREATED API KEY AND CREATE A NEW ONE.

Restricting access by IP address

Used to further protect your keys from unauthorized access. When restricted by IP, keys can only be used from a registered address.

BYBIT LIMITS THE LIFETIME OF ALL API KEYS WITHOUT IP ADDRESS RESTRICTIONS TO 90 DAYS.

Please note that you will need your external IP 1 . Otherwise, trading functions will not work. Here are examples of addresses that are not suitable for setting restrictions. If your address has a similar subnet mask

Intranet addresses: 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16

Addresses for internal use: 127.0.0.0/8 – used for communications within the host (see localhost).