Security & Setup

How to Set Up a Read-Only API Key on OKX

Connecting your OKX account to a portfolio tracker is simple, but you need to do it safely. Here is a step-by-step guide to creating a read-only API key that keeps your funds protected.

4 min read·Mar 16, 2026
🔑

Connecting your OKX account to SmartViewAI lets you see your entire portfolio in one place without logging in and out of the exchange. But there is a right way and a wrong way to set this up. The right way uses a read-only API key, which means the tracker can see your data but can never touch your funds.

Why Read-Only Matters More Than You Think

An API key with full permissions is dangerous. If it gets leaked, someone can trade on your account or even withdraw your funds. A read-only key removes that risk entirely. The absolute worst case is someone seeing your balances. Your crypto stays safe.

Always use read-only keys for third-party apps. No portfolio tracker or analytics tool needs withdrawal or trading permissions.

Step One: Log Into Your OKX Account

Go to OKX.com and log in. Navigate to your profile menu in the top right corner. Select API from the dropdown options. This takes you to the API management page where you can create and manage your keys.

Step Two: Create a New API Key

Click Create API Key. You will see options for the key type. Choose API Key (not a trading bot key). Give it a name you will recognise, like "SmartViewAI Read Only".

  • Set a Passphrase. This is required by OKX and adds an extra layer of security. Store it somewhere safe.
  • Under Permissions, select Read only. Do not enable Trade, Withdraw, or any other permission.
  • Under IP Access, you can optionally restrict the key to specific IP addresses for extra security.

Step Three: Copy and Save Your Keys

Once created, OKX shows you the API Key and Secret Key. You will only see the Secret Key once. Copy both immediately and store them temporarily in a secure location while you complete the setup.

Do not share these keys in screenshots, emails, or chat messages. Treat them like a password.

Step Four: Connect to SmartViewAI

In SmartViewAI, go to your portfolio settings and select Connect Exchange. Choose OKX from the list. Enter your API Key, Secret Key, and Passphrase. SmartViewAI will verify the connection and begin syncing your portfolio data.

Once connected, your positions, balances, and trade history will update automatically. You get a live view of your portfolio without ever handing over trading control.

What to Do If Something Feels Wrong

If you suspect a key has been compromised, go back to the OKX API management page and delete it immediately. You can create a new one at any time. Revoking a key does not affect your account or funds in any way.

This entire process takes about five minutes and it is worth doing correctly from the start. Security shortcuts in crypto tend to be expensive lessons.

Enjoyed this article? Put it into practice.

SmartViewAI gives you live portfolio analytics, AI-graded signals, and a built-in academy. All in one place.

Educational Content Only. Not Financial Advice.

This article is published for educational and informational purposes only. It does not constitute financial, investment, tax, or trading advice and should not be treated as such. Cryptocurrency investments are highly speculative and carry a significant risk of total loss. Market conditions can change rapidly. Past performance is not a reliable indicator of future results. Do your own research and seek advice from a qualified financial professional before making any investment decisions. SmartViewAI provides analytical tools, not regulated financial advice.