API keys
OKX API keys
The key lets bots trade on your OKX account (USDT perpetual swaps). It cannot be used to withdraw funds.
Never enable withdrawals (Withdraw)
ArbiSnake does not accept an OKX key that allows withdrawals. Trading does not need it.
Before you start
- Sign in to ArbiSnake. We recommend turning on two-factor sign-in (2FA) on the Account page: then an exchange key can be deleted only with a code.
- Open Settings → API keys and copy the ArbiSnake server IP address — you will need it in the “IP binding” step.
- Your OKX account mode must be Futures or Multi-currency margin. Spot mode cannot trade swaps, and Portfolio margin has no reduce-only, so keys on those modes are not accepted. Switch the mode in the OKX app: Trade → settings → account mode.
- ArbiSnake switches the position mode to One-way itself if the account has no open positions or orders. Margin is Cross in every order.
Create the key
- Open API managementOn OKX: profile → API → Create API key.
- Name the key and set a passphraseFor example, arbisnake. The passphrase is the key's third secret: remember it, ArbiSnake needs it.
- Save the keySave the API Key and Secret Key: the secret is shown only once.
Which permissions to give
✓Readrequired
✓Traderequired
Withdrawnever
IP binding
In the key's IP address field, enter only the ArbiSnake server IP from the API keys page.
This is required
ArbiSnake does not accept a key without an IP binding. Also, OKX itself disables trading keys without an IP after 14 days of inactivity.
Add the key to ArbiSnake
- Settings → API keysPaste the API Key, Secret Key and Passphrase in the OKX row.
- Choose your account regionGlobal (okx.com), EEA (my.okx.com) or US / Australia (app.okx.com) — a key works only on its own region's address.
- Click “Check on the exchange and save”ArbiSnake checks the key's permissions, IP binding and account mode (read-only, no orders) and shows the available USDT balance.
If the key is rejected
| Message | What to do |
|---|---|
| Withdrawals are allowed | Create a new key without Withdraw. It is best to delete the old one on OKX. |
| The key is read-only | Give the key the Trade permission. |
| The account is in Spot or Portfolio margin mode | Switch the account mode to Futures or Multi-currency margin and add the key again. |
| OKX did not accept the key | Check the key, secret, passphrase and account region. |
Tip
Create a separate key just for ArbiSnake. To disconnect the service, delete this key on OKX or click “Delete key” in ArbiSnake (with a 2FA code if 2FA is on).