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

tip

You must set a passphrase when creating a Bitget API key. This is your password for actions with the key. Remember the passphrase, it will not be shown and cannot be reset or restored. If you forgot the passphrase, create another API key.

  1. Go to Profile → API keys → Create API key.
  2. Come up with a name for the key. For Bitget only: come up with a passphrase, it is needed for actions with the key. Remember it.
  3. Set permissions for the key:
    • Read only. A key with no trading features.
    • Read & write. A key with trading enabled.
    • Spot trading. Provides access to spot trading.
    • Futures trading. Provides access to futures trading.
  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.
  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 will see the created API key. To trade, you will need both the public key and the secret key.

caution

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. Never store keys unencrypted or share them with others.

caution

Due to technical limitations of the Bitget exchange, API keys will have to be re-created if any temporary restrictions were applied to the personal account

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. 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).