API key security: trade-only permissions and an IP whitelist

When you create an API key on OKX or Binance, enable only read and trade, never withdraw, bind it to our server's IP, and ideally use a sub-account. Do these three things and even a leaked key can't be used to take your money.

Contents
  1. Why no withdraw permission
  2. Why bind an IP
  3. Why a sub-account
  4. OKX: create an API key
  5. Keys for OKX paper trading
  6. Binance: create an API key
  7. Add it to ChainMakes
  8. To revoke a key, or if you think it leaked
  9. Avoid scams
  10. Checklist

The short version: an API key for ChainMakes needs exactly three things right:

  1. Permissions: Read and Trade only. Never enable Withdraw.
  2. Bind an IP whitelist with only our server’s IP: 13.159.228.77.
  3. Use a dedicated sub-account, separate from your main funds.

Do all three and a leaked key is useless to anyone else — and no one can withdraw your money with it.

The ChainMakes server's IP is on the whitelist, so it can read and trade. Someone else with the key is rejected by the exchange because their IP isn't whitelisted. The key has no withdraw permission.
Our server is whitelisted and can place orders. Anyone else holding the key is rejected. With no withdraw permission, nobody can move funds out.

Why no withdraw permission

ChainMakes is non-custodial. The grid places orders in your own exchange account, and your funds never leave it. Placing orders needs only Trade; checking positions and balances needs only Read.

We have no use for withdrawals, so we don’t ask for them. The app checks a key’s permissions before saving it, and a key with withdraw permission is rejected outright.

Why bind an IP

With an IP whitelist, the exchange only accepts requests from that IP. Every order ChainMakes places comes from our server, whose outbound IP is:

13.159.228.77

Once bound, even if someone gets your key, secret and passphrase, they can’t use them from their own machine.

If the app says “the server IP is not on this key’s whitelist”, go back to the exchange and check the IP — look for typos and extra spaces.

Why a sub-account

Two reasons:

  • Contain the risk: move only what the grid needs into the sub-account. Your main account isn’t affected.
  • Don’t disturb other orders: if the connection drops, the app’s protection may cancel all open orders in the account. With a sub-account, your manual orders elsewhere are safe.

Create one key per sub-account, and add each one as a separate connection in ChainMakes.

OKX: create an API key

  1. Log in to OKX on the web, open API management and click Create API key.
  2. Account: choose the sub-account you’ll run the grid in (or the main account if you don’t have one).
  3. Used for: choose API trading.
  4. Permissions: Read is on by default. Also tick Trade. Leave Withdraw, Onchain, Earn, Loan and Transfer unticked.
  5. Markets: this appears once Trade is ticked. The grid trades perpetual swaps, so Perpetual is all you need. Spot, Expiry and Options can stay off.
  6. Crypto: OKX requires at least one. Add both legs of the pair you plan to trade — for ETH / XRP, add ETH and XRP. If you switch pairs later, come back and add the new coins.
  7. Security: turn on Trusted IP addresses and enter 13.159.228.77.
  8. Set a passphrase and keep a note of it.
  9. After submitting, save the API key, secret key and passphrase. The secret is usually shown only once.
OKX create API key page: Trade ticked, Withdraw and the other permissions unticked; Markets set to Perpetual; coins added under Crypto; Trusted IP addresses on with 13.159.228.77
OKX's create API key page (November 2026, interface shown in Chinese). Read and Trade only, Perpetual market, coins added, trusted IP on.

OKX notes on that page that API keys with trade or withdraw permission expire after 14 days of inactivity. If a grid has been stopped for a long time and the connection fails when you restart it, check on OKX whether the key still exists.

Keys for OKX paper trading

To start on paper: switch OKX to Demo trading, create a demo API key from your profile, and again enable only Read and Trade.

Demo trading has no sub-accounts. For a second paper account, use a demo key from a different OKX account.

Binance: create an API key

  1. Log in to Binance, open API management and create an API key (choose system-generated).
  2. Under API restrictions, tick Enable Reading and Enable Futures. The grid doesn’t need spot & margin trading, so you can leave that off.
  3. Don’t tick Enable Withdrawals, and leave every other permission off.
  4. Leave Enable Symbol Whitelist unticked: that way every pair can be traded, and you won’t need to come back when you change pairs.
  5. Under IP access restrictions, choose Restrict access to trusted IPs only (recommended), enter 13.159.228.77 and confirm.
  6. Save, and keep the API key and secret key.
Binance API restrictions: Enable Reading and Enable Futures ticked; Withdrawals and Symbol whitelist not ticked; IP access restricted to trusted IPs with 13.159.228.77
Binance API restrictions (November 2026, interface shown in Chinese, key cropped out).

Binance states on that page that API keys with unrestricted IP access and any permission beyond reading will be deleted. So binding an IP isn’t just safer — it’s what keeps the key working long term.

Two more settings on your Binance futures account:

  • Use single-asset margin (turn Multi-Assets Mode off).
  • We suggest turning off BNB fee deduction. Otherwise fees are paid in BNB, aren’t counted in P&L, and your P&L will look better than it is.

Add it to ChainMakes

  1. Open ChainMakes, go to Account & settings → Exchange API, and click Add connection.
  2. Choose the exchange (OKX or Binance), then the environment (paper or live).
  3. Enter the API key and secret (plus the passphrase for OKX) and save.

Before saving, the app connects to the exchange once with the key to check the environment and permissions. Once it passes, the key is stored encrypted, and the app only ever shows its last 4 characters.

ChainMakes Add connection, step 3: account name, API key, secret key and passphrase, then Check and save
ChainMakes Add connection, step 3 (OKX shown).

To revoke a key, or if you think it leaked

Delete the key on the exchange. ChainMakes loses access immediately: running grids stop placing orders, and existing positions stay in your account for you to manage.

Avoid scams

  • Enter your key, secret and passphrase only in the ChainMakes app. Never send them to anyone.
  • ChainMakes will never DM you asking for API keys or passwords, and will never ask you to transfer funds. Anyone claiming to be “support” and asking for these is a scammer.

Checklist

  • Permissions are Read + Trade only (Binance: Enable Reading + Enable Futures)
  • No withdraw permission
  • The IP whitelist contains only 13.159.228.77
  • It’s a sub-account holding only the funds you plan to run the grid with
  • The secret and passphrase are stored safely and not shared with anyone

Back to Learn