Open API and connections in your OKX Europe account
Sign in to OKX Europe (my.okx.com), open your Profile and choose API and connections to start your tradingview webhook automation setup.
- OKX requires a minimum balance of 100 USD on the account before it will let you create an API key
Create an API key
Click Create API key. OKX first shows the OKX API Agreement — accept it with Continue to reach the creation form.
- Each main account and sub-account can hold up to 50 active API keys
Fill in the API key form
Give the key a name you will recognise later, then set the options below. Read permission is always on and cannot be switched off.
- Used for — API trading
- Permissions — tick Trade; leave Withdraw, Earn, Loan and Transfer off
- Markets — tick Spot & Margin, plus Perpetual if you trade futures
- Crypto — add at least one coin; OKX will not let you submit the form with an empty list
- Turn on Trusted IP addresses and add
35.75.198.16— a key with trade permission and no IP linked expires after 14 days of inactivity, a linked key does not expire - Passphrase — 8–32 characters, with at least one lowercase, one uppercase, one number and one special character
Create the key on the entity you actually trade on
This guide is for accounts registered on my.okx.com, the European (MiCAR) entity, whose API lives at https://eea.okx.com. Accounts on www.okx.com use the plain OKX connection instead. The two entities keep separate key stores: a key from one does not exist on the other, and the venue answers 50119 - API key doesn't exist when a key reaches the wrong host.
Save API credentials securely
Submit the form, then copy the API key, secret and passphrase before leaving the page — the secret and passphrase are shown only once and cannot be recovered. Continue to page 2 for real-time trade execution webhook setup.