Connect OKX Futures
OKX Futures is included in every plan. You can start with a demo account.
1. Create the API key
On okx.com, open your profile, then API keys, and create a key. Choose a passphrase and write it down: you enter it as the API passphrase.
- Permissions: Trade.
- Never enable withdrawals or transfers. BotEdge only places orders.
If the exchange offers it, restrict the key to the addresses BotEdge trades from: 161.35.155.159. A stolen key is then useless anywhere else.
2. Add it to BotEdge
- In the dashboard, click Add connection and choose OKX Futures.
- Choose Live for your real account or Demo / testnet for a demo key.
- Paste the values from the exchange:
- API key
- API secret (secret)
- API passphrase (secret)
Secrets are encrypted before they are stored and are never shown again.
- Save. The connection card shows your pointer, the webhook URL and the alert message.
3. Set up the alert
- Chart and ticker: An OKX perpetual chart, for example OKX:BTCUSDT.P. The connection trades the matching USDT perpetual swap (BTC-USDT-SWAP).
- Quantity: Contracts of the perpetual swap. Contract sizes differ by market (one BTC-USDT-SWAP contract is 0.01 BTC): check the size on OKX before setting your order size.
Then follow the TradingView guide to create the alert.
Demo account
Demo uses OKX demo trading: switch your OKX account to Demo Trading, create an API key there and choose Demo when you add the connection.
Order rejected?
The error email explains what OKX Futures answered. The error guide covers the most common causes.