Creating an API key on OKX
TrendX uses this key to place orders for you. If the permissions are wrong, your strategy will start but never place a single order.
Step 1: Open API management
Sign in to the OKX website → account centre, top right → API → create an API key.
Step 2: Make up a Passphrase (this one is specific to OKX)
OKX asks you to choose your own Passphrase. It isn't generated for you, and it isn't your login password. Write it down now — you'll need to enter it in TrendX along with the key and secret. There's no way to look it up later; if you forget it you have to delete the key and start again.
Step 3: Tick these permissions
| Permission | What to do |
|---|---|
| Read | ✅ Turn it on |
| Trade | ✅ Turn it on — without this your strategy cannot place a single order |
| Withdraw | 🔴 Leave it off |
If your account also shows Transfer, Loan or Earn options, you don't need any of them.
Step 4: Fill in the IP field
Put this address in the IP box:
47.237.207.18One key can have up to 20 IPs, separated by commas or spaces.
🔴 OKX also has this rule: a key that has trading permission but no IP bound is deleted automatically after 14 days of sitting unused. Filling in the IP prevents that.
Step 5: Switch your account out of Spot mode (only for futures strategies)
An OKX account is in Spot mode by default, and in that mode OKX rejects futures orders outright — regardless of what your API key is allowed to do. To run futures strategies, go into your OKX account settings and switch the trading mode to one that supports futures.
If something goes wrong
| What you see | What it usually means |
|---|---|
| Binding said success, but every order fails | Trade was never turned on. Binding only checks that we can read your account, so a read-only key binds successfully too |
| It says the Passphrase is wrong | The Passphrase is the one you invented when creating the key, not your login password. If you're not sure, delete the key and create a new one |
| Spot strategies are fine, futures get rejected immediately | The account is still in Spot mode — change the trading mode on OKX first |
| The key disappeared after a while | A trading key with no IP bound is deleted by OKX after 14 days unused. Create a new one and fill in the IP |
The safety line: never turn on Withdraw. Even if someone gets hold of your key,
without withdrawal permission they cannot move your money. Never send your Secret or Passphrase to anyone —
and we will never ask you for them.