Skip to main content

Create and Connect API Keys

A short guide on API keys and a tutorial on how to create them on cryptocurrency exchanges.

What is an API key?

An API key (Application Programming Interface key) is a code that gets passed in by computer applications. The program or application then calls the API to identify its user, developer or calling program to a website.

Why do I need an API key?

An API key enables a fast and secure connection between the 3Commas platform and your chosen exchange. This allows 3Commas to place orders and execute trades on your behalf.

Important: When creating an API key on an exchange, please make sure that you provide TRADING access only and DISABLE the withdrawal option. This prevents any third party from withdrawing your funds from the exchange via the API.


One API for All Markets

When you connect an API key to 3Commas, the system automatically load both your Spot and Futures wallets. The only exceptions are exchanges that require separate API keys for different markets, in which case you will need to generate a unique API key for each market.

How to Create an API Key on Your Exchange

Important!

When creating an API key on your exchange and encountering the option to link IP addresses, we recommend checking whether our platform provides whitelisted IP addresses for your exchange.

You can find the IP addresses by navigating to:

3Commas > My Exchanges > Add exchange > Select your exchange
Then check the right side of the screen for the relevant IPs.

Select your exchange from the list:


OKX

  1. Log in to your OKX account.

  2. Move cursor over your profile icon and select "API".

  3. In the newly opened tab, click "Create APIs".

  4. Create API name. In the Used for tab, select "Linking third-party app" and find "3Commas". In Permissions add "Trade". Create "Passphrase" below.

  5. Press "Submit all".

  6. Copy your API Key and API Secret, and insert them under 3Commas > My Exchanges > Add exchange > OKX.


Bybit

  1. Log in to your Bybit account.

  2. Move cursor over your profile icon and select "API".

  3. Press "Create New Key".

  4. Choose "Connect to Third-Party Applications" and find "3Commas".

  5. Select "Read-Write" in API Key Permissions. Enable "Unified Trading" and press "Submit" to create API.

  6. Copy your API Key and API Secret, and insert them under 3Commas > My Exchanges > Add exchange > Bybit.


Binance (incl. Binance Futures)

  1. Log in to your Binance account.

  2. Click on your profile icon.

  3. Press "Account" > "API Management" > "Create API".

  4. Uncheck "Default Security Controls" to allow modification of API restrictions. Turn on "Enable Spot & Margin Trading" and "Enable Futures". In the IP access restrictions section, it is recommended and more secure to select "Restrict access to trusted IPs only" and enter our whitelisted IP addresses.

  5. When you are all set, copy your API Key and API Secret Key, and insert them under 3Commas > My Exchanges > Add exchange > Binance.

Hint:

If you still do not see your Binance balance on 3Commas, make sure that Multi-Assets Mode is chosen on Binance by opening the Futures trading terminal and choosing Settings.

Then go to Asset Mode and select Multi-Assets Mode.


Kraken

  1. Log in to your Kraken account.

  2. Click on your profile icon and select "Settings".

  3. Go to the API tab. Choose between Spot and Futures trading API. Select "Create API Key".

    (Spot trading API)


    ​(Futures trading API)

  4. Spot API creation

    Create an API Key name and set permissions as shown in the image below. Provide IP Addresses (if available), then click "Generate key".

    For the Futures API Key, set permissions as shown in the image below, then click "Generate key".

  5. When you are all set, copy your API Key and API Secret Key, and insert them under 3Commas > My Exchanges > Add exchange > Kraken.


Kucoin

  1. Log in to your Kucoin account.

  2. Move cursor over your profile icon and select "API Management".

  3. Select "Create API".

  4. Choose "Link Third-Party Applications" and find "3Commas" in the Name of Third-Party app field. Create "API name" and "Passphrase" below. Enable "Spot Trading", "Futures Trading"(optional) and "Unified Account"(optional).

  5. Finally, set "IP Restriction" to "No".

  6. When you are all set, copy your API Key and API Secret Key, and insert them under 3Commas > My Exchanges > Add exchange > Kucoin.


Gate.io

  1. Log in to your Gate.io account.

  2. Move cursor over your profile icon and select "API Management".

  3. Click "Create API Key".

  4. On next page, create the API name. If you want to create permanent API Key, you will need to link our whitelisted IP addresses in the "IP Permissions" field. Otherwise, your API Key will be active for only 90 days.

    In the API Key Type section, enable "API v4 Key". Account type should be "Trading Account". In Permissions, choose "Spot Trade" / "Perpetual Futures" and "Delivery Futures", depending on your market choice. Choose "Wallet" as well. Next to each Permission, enable "Read and Write". Click "Submit" when done.

  5. Copy your API Key and API Secret Key, and insert them under 3Commas > My Exchanges > Add exchange > Gate.io.


Bitget

  1. Log in to your Bitget account.

  2. Move your cursor over profile icon and select "API Keys".

  3. Select "Create API Key".

  4. Create an API name (Note) and Passphrase (you will need to enter this password when connecting the API to 3Commas). Enable "Read-write" in the Permission settings field.

  5. In the Permission type, select between permissions for "Futures" and "Spot". For Futures, select "Orders" and "Holdings". For Spot, select "Trade".

  6. For both Futures and Spot, you will need to select "Manage" in the Sub-accounts section. Provide IP Addresses (if available). Click "Next".

  7. Copy your API Key and API Secret Key, and insert them under 3Commas > My Exchanges > Add exchange > Bitget.


Coinbase

  1. Log in into your Coinbase account.

  2. Click on the profile icon and select "My preferences".

  3. Go to the API tab and click on "Create API Key".

  4. Create API Key name. In the IP whitelist field, provide our whitelisted IP addresses (if available). In the restrictions section, enable "Trade".

  5. Copy your API Key and API Secret Key, and insert them under 3Commas > My Exchanges > Add exchange > Coinbase.

    IMPORTANT!
    ​It may take up to 48 hours for your API keys to activate. You won't be able to connect the exchange to 3Commas until this period has passed.


Hyperliquid

See step-by-step guide on how to connect MetaMask, Trust Wallet, Rabby or Rainbow to Hyperliquid here:
https://help.3commas.io/en/articles/16281180-how-to-connect-web3-wallets-to-3Commas-using-hyperliquid

1) Make sure that Arbitrum chain is already added to your wallet.
2) In order to connect wallet, you will need to Enable trading on Hyperliquid, by depositing 100$ to the wallet and clicking "Enable trading" in the trading terminal.
3) Most-likely you will need to have some ETH in Arbitrum chain in order to pay fees for the first USDC transfer to Hyperliquid.
4) Hyperliquid allows only up to 3 APIs.

5) Hyperliquid API keys expire ~6 months after connection to 3Commas

  1. In your 3Commas account go to My Exchanges > Add exchange > Hyperliquid.

  2. Click Connect Wallet and choose your preferred wallet.

    • To connect via mobile, select WalletConnect and scan the QR code.

    • If you're using a browser extension, compatible wallets (e.g., MetaMask, Trust Wallet) will appear automatically.

    • Click Search to browse all supported wallets, including Rainbow, Rabby, OKX Wallet, and more.

  3. Once selected wallet is connected, click Authorize Trading Access.

  4. Confirm 2 signature requests:

If everything went correct, you should be able to see the following window:


Did this answer your question?