OKX trading journal
FOQUS keeps a trading journal for your OKX account on its own. Every USDT and USDC perpetual swap position appears in it without manual entry — with fees, funding and the history of your stops. To connect, you need an API key with the Read permission only, and its passphrase.
What FOQUS records from OKX
FOQUS records OKX perpetual swaps margined in USDT and USDC — for example BTC-USDT-SWAP and BTC-USDC-SWAP.
While a position is open, you see it in FOQUS, with its profit, stop and time in the trade updating live. Every add and partial close is recorded as an action of its own, with price, size and fee. FOQUS notes when you set, moved or removed a stop-loss or take-profit. Funding goes into the trade at every settlement.
Once a position closes, it has a result with fees and funding, and a liquidation shows as a separate action. Next to it are your limit entry orders: the ones you placed, amended and cancelled.
Around every action FOQUS keeps the context: your balance and other positions at entry, and a market snapshot — price change and volume, RSI, funding, open interest. On top of that, a recording of OKX's own order book, a minute before the action and a minute after. The free plan includes 10 such recordings a day.
Not covered: spot and margin trading, dated futures, options, and coin-margined swaps (BTC-USD-SWAP).
How to create an OKX API key and connect it
- Log in to the OKX site you signed up on, open your profile → API and click Create API key. On some versions of the site the menu item is called API and connections. In the app: Menu (⋮⋮⋮) → API → Create API key.
- Name the key — FOQUS, for example — and choose the account you trade on: your main account or a subaccount.
- Leave the IP address list empty: FOQUS reaches OKX from several addresses.
- Under Permissions, keep Read only. Don't turn on Trade or Withdraw.
- Set a Passphrase — the key's own password — and keep it somewhere safe. OKX can't recover it: if you forget it, you'll have to create a new key.
- Confirm, then copy the API key and the Secret key.
- Create a FOQUS account, pick OKX and fill in three fields: API key, API secret and Passphrase. Click Connect exchange.
Menu names on the OKX site depend on its version and your region, so they may differ slightly. In some regions OKX lets you create a key only if your account holds more than 100 USD in assets.
OKX deletes keys with no IP binding after 14 days of inactivity — but only keys with the Trade or Withdraw permission. A read key that FOQUS uses all the time isn't affected.
Is it safe to give FOQUS an OKX API key?
- FOQUS checks the permissions. When you connect, it asks OKX for the key's settings, and OKX answers with its list of permissions: read, trade, withdraw. FOQUS accepts the key only if that list holds read alone. With trade or withdraw on it, FOQUS replies “The key is not read-only”.
- FOQUS only reads. It doesn't place or cancel orders, and it doesn't transfer or withdraw funds.
- What is stored. The API key, the secret and the passphrase. The secret and the passphrase are encrypted.
- How to disconnect. Delete the account in FOQUS — its data is deleted with it. Delete the key on OKX too: profile → API.
What's next: where to see your OKX trades
| Section | What's in it |
|---|---|
| Journal | all your OKX trades: a table, cards with a chart, a weekly, monthly and yearly report |
| Timeline | every action of a trade, second by second: entry, stops, funding, exit |
| Tags | the setup, the mistake and the emotion of each trade, and the profit of each tag |
| Notes | your review of the trade in your own words — typed or dictated |
| Overview | 28 widgets: profit by day, hour, leverage, coin and tag |
OKX trading journal FAQ
Where do I get the OKX passphrase?
You make it up yourself when you create the key. It isn't your OKX account password, and you can't view it later: if it's lost, delete the key and create a new one.
Why does FOQUS say “Incorrect OKX passphrase”?
OKX didn't recognize the passphrase. It has to be the one you set when you created this very key: each key has its own. Check upper and lower case.
Does an OKX account from the EEA or the US work?
Yes. Those accounts have API addresses of their own: my.okx.com accounts use eea.okx.com, and app.okx.com accounts use us.okx.com. FOQUS finds which site the key was created on and reads your trades through that address.
Will my old OKX history be imported?
No. The journal starts when you connect. FOQUS doesn't record positions opened before that, even if they close later: it never saw their stops or the account at entry.
Does FOQUS work with OKX spot and margin?
No. Only perpetual swaps margined in USDT and USDC go into the journal. Spot, margin, dated futures, options and coin-margined swaps stay out of it.
Can I connect an OKX subaccount?
Yes. Create the key inside the subaccount — with its permissions and a passphrase of its own. FOQUS will record that subaccount's trades.