Get started UKENRU
All articles

Crypto Exchange API Key: What It Is and How to Set It Up Securely

Crypto Exchange API Key: What It Is and How to Set It Up Securely

Many third-party platforms that work with crypto exchanges connect to users’ accounts through an API, or application programming interface. An API allows an application to retrieve certain data and, if granted the necessary permissions, submit trading instructions.

This article explains how an API key differs from a password, which permissions you can grant, and how to set up a connection securely.

Contents

  1. What an API is, in simple terms
  2. How a crypto exchange API works
  3. What an API key is and how it differs from a password
  4. Where API keys are used
  5. Which permissions you can grant
  6. Benefits and risks of connecting through an API
  7. How to create an API key: a general guide
  8. Security best practices
  9. Key takeaways

What an API is, in simple terms

An API (Application Programming Interface) is a set of rules that allows one program to send requests to another and receive responses. With a crypto exchange, a request might be for public market data, account information, or a trading action. Access to protected data and actions usually requires authentication.

You can think of an API as a restaurant server: you place an order, the server takes it to the kitchen, and then brings back your food. In this example, the kitchen is the exchange, the order is the platform’s request, and the response is data or the result of an action. What the platform can do depends on the API’s features and the permissions granted to its key.

Depending on the request and the permissions granted, a platform may use an API to:

  • retrieve public market data, such as prices, order book data, and trade history;
  • view account information, such as balances, transaction history, and open positions;
  • create, modify, and cancel orders, if the key has trading permissions.

How a crypto exchange API works

Once a connection is set up, the platform sends requests to the exchange through its API. For protected API endpoints, the exchange verifies the API key and request signature, then checks whether the key has the required permissions. It returns the requested data, performs the authorized action, or rejects the request—for example, if the key lacks the necessary permissions or the request is incorrectly formatted.

An API can provide access to both public and protected data. Authentication may not be required to retrieve public market data. Account balances, transaction history, and other account details are available through protected API endpoints only when the key has the relevant permissions. The available settings and their names vary by exchange.

Data is exchanged automatically, but response times depend on the exchange, the type of request, and network conditions. An API does not guarantee that every operation will be completed within a specific timeframe.

What an API key is and how it differs from a password

Many exchanges use an API Key and a Secret Key to authenticate API requests. The API Key identifies the connection, while the Secret Key is used to sign authenticated requests. Some exchanges also require a passphrase—a separate phrase set when the key is created. The exact authentication method depends on the exchange and API type.

An API key and an account password serve different purposes. A password is used to sign in to an account; an API key lets a platform interact with specific exchange features. You can limit an API key’s permissions, but a key with trading access can still place orders on your behalf.

Enter your API key details only in the official interface of the platform you are connecting to, and check the website address first. Never send your Secret Key in a message or share it with anyone claiming to be a support representative.

Where API keys are used

Trading platforms and working with price discrepancies

Trading platforms use APIs to retrieve data from connected exchanges and submit trading instructions based on the user’s settings. The permissions required depend on the platform’s features.

For example, Fetti Flow uses an API to monitor price discrepancies across exchanges and, once a trade is confirmed, submit orders to open opposing futures positions: a LONG on one exchange and a SHORT on another. To connect, users create API keys with limited permissions on the exchanges they choose, granting access to data and futures trading only. Withdrawal permission is not required: users’ assets remain in their exchange accounts.

Portfolio trackers

A portfolio tracker can bring together available asset data from multiple exchanges in one interface. Read-only access is usually enough to view balances, but the exact permissions depend on the platform’s features and the exchange.

Trade tracking and accounting platforms

Platforms used to track and account for trades may retrieve transaction and trade history through an API to calculate results and generate reports. Before connecting, check what data the platform requests and which permissions it needs.

Which permissions you can grant

Exchanges use different names and group API key permissions in different ways. The table below lists common examples. Check the settings available in the interface of the exchange you use.

Permission What it allows When it may be needed
Read-only access View permitted account information, balances, or transaction history Analytics, accounting, and viewing account data
Spot trading Place and cancel spot orders Platforms that place spot orders
Futures trading Open and close futures positions Platforms that work with futures
Internal transfers Move assets between accounts on the exchange Only if a specific feature requires this access
Withdrawals Withdraw assets from the exchange Not required by most third-party trading platforms

The key principle is to grant only the permissions a platform needs. For example, read-only access may be enough to view account data, while placing orders requires trading permissions. Do not enable withdrawals unless the platform specifically requires them.

Benefits and risks of connecting through an API

An API can automate data retrieval and authorized actions. You can also limit an API key’s permissions and revoke it when needed. If the platform and exchanges support it, one tool can connect to multiple exchanges.

However, an API key with trading permissions can place orders. If the key is exposed, someone else could take unwanted actions within the permissions granted. API connections also rely on the exchange’s infrastructure and are subject to its request limits and maintenance, which may cause delays.

How to create an API key: a general guide

Exchange interfaces vary, but setting up a connection usually involves these steps:

  1. Sign in to your account and enable two-factor authentication (2FA), if available.
  2. Find the “API,” “API Management,” or similarly named section in your account settings.
  3. Create a new key and give it a name that identifies the platform it is for.
  4. Select only the permissions the platform needs to provide its features.
  5. If both the exchange and platform support IP restrictions, add the IP addresses listed in the platform’s official instructions.
  6. Confirm the key creation using the method required by the exchange.
  7. Copy the key details and enter them only in the platform’s official interface.

Many exchanges display the Secret Key only once, when the key is created. If you did not save it or are unsure whether it is secure, delete the key and create a new one. Section names and steps may vary by exchange. Fetti Flow users can find step-by-step instructions for creating and securely configuring API keys for each supported exchange in the knowledge base.

Security best practices

  • Do not enable withdrawal permissions unless the platform requires them.
  • Create a separate key for each platform so you can easily identify which access to revoke.
  • Grant each key only the permissions it needs.
  • Use IP restrictions if they are supported by both the exchange and platform, and the platform provides official IP addresses for this purpose.
  • Store your Secret Key securely. Do not send it through messaging apps or save it in screenshots.
  • Check the website address before connecting. Do not enter key details on pages opened through suspicious links.
  • Review your active API keys regularly and delete any you no longer use.
  • Remember that 2FA protects account sign-ins and changes to account settings, but it does not protect an API key if it is exposed. It does not replace limiting the key’s permissions or storing its details securely.
  • If you suspect a key has been exposed, delete it in your exchange account and create a new one.

Key takeaways

An API allows platforms to interact with an exchange: they can retrieve available data and, if granted the necessary permissions, perform actions on the account. An API key is different from a password, but trading permissions allow a platform to place orders on your behalf.

Grant API keys only the permissions they need and follow the security practices in this article to limit the impact of a potential leak.

API features and settings vary by exchange. Before creating a key, check the latest instructions from both the exchange and the platform you plan to connect.

This material is for informational purposes only. Interfaces and setting names vary by exchange. Trading cryptocurrencies involves the risk of loss.