OKX trading journal
FOQUS keeps a trading journal for your OKX account by itself. Every USDT and USDC perpetual swap position goes in without manual entry, with its fees, funding and stop history. To connect, you need a key with the Read permission only, its secret and its passphrase. The journal is free forever.
What FOQUS records from OKX
FOQUS records OKX perpetual swaps margined in USDT and USDC, such as BTC-USDT-SWAP and BTC-USDC-SWAP.
While a position is open, it shows in FOQUS with its profit, stop and time in the trade updating live. Every add and partial close is written as an action of its own, with price, size and fee. FOQUS marks when you set, removed or moved the stop-loss and take-profit. Funding goes into the trade at every settlement.
Once the position closes, it has a result with fees and funding, and a liquidation shows as an event of its own. Next to it are your limit entry orders: which ones you placed, amended and cancelled.
Around your fills FOQUS keeps the context: your balance and other positions at entry, and a market snapshot — price change and volume, RSI, funding, open interest. It also records OKX's own order book, a minute either side of every entry, add, partial close and exit. The free plan includes 10 such recordings a day.
Not covered: spot and margin trading, dated futures, options, and coin-margined swaps such as BTC-USD-SWAP. Nor are positions opened before you connect: an account's history at OKX has no order book, and OKX keeps a cancelled regular order with no fill for 2 hours only. So FOQUS records each trade itself, from the minute you connect.
Which OKX sites work
OKX has three separate sites, each with its own API address, and a key works only through its own site's address. FOQUS connects accounts from all three:
| Where you signed up | The API address FOQUS reads |
|---|---|
| okx.com | openapi.okx.com |
| my.okx.com (European Economic Area) | eea.okx.com |
| app.okx.com (United States and Australia) | us.okx.com |
FOQUS works the site out by itself: it tries openapi.okx.com first, then eea.okx.com, then us.okx.com, and stores whichever recognised the key. If none does, nothing is saved, and the connect screen reads “OKX doesn’t know this key. Check the API key.”
How to create a read-only OKX API key
- Log in on the OKX site where you signed up. Open your profile → API and connections → Create API key. In the app: Menu (⋮⋮⋮) → API → Create API key.
- Enter a key name, FOQUS for example. Choose the account you trade on, the main one or a subaccount, and what the key is used for.
- Leave the IP address allowlist empty: FOQUS publishes no addresses.
- Under Permissions, keep Read only. Don't turn on Trade or Withdraw, nor Transfer, Loan or Earn if you see them.
- Make up a Passphrase for the key and write it down. OKX can't recover it: if you forget it, you'll have to create a new key.
- Confirm and save 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.
The names of the menu items depend on the OKX site version and region. In some regions OKX lets you create a key only if the account holds at least 100 USD in assets.
OKX deletes a key without an IP binding that has Trade or Withdraw after 14 days without use. That rule doesn't touch a key for FOQUS: it has no such permissions. OKX states its other expiry rules in its own API FAQ, under “Will the API key expire?”. Should OKX ever disable the key, the account in FOQUS shows “The exchange refused the key — the account is not being recorded” and waits for a new one.
The guide to the read-only API key sets OKX's key beside Binance's and Bybit's.
Is it safe to give FOQUS an OKX key?
- Permissions come from OKX itself. At connection FOQUS fetches the key's configuration, where OKX lists its permissions as read_only, trade or withdraw. Anything beyond read_only means “The key is not read-only”, and the key is dropped.
- Nothing but reads. FOQUS sends OKX only requests that read. It can't place or cancel an order, move funds between accounts or withdraw.
- Encrypted at rest: the secret and the passphrase. The API key and the address of the key's OKX site are kept as they are.
- Disconnecting: delete the account in FOQUS, and its trades go with it. Then remove the key under profile → API on OKX.
The journal gathers an account's trades into a table, cards with a chart, or a weekly, monthly and yearly report. From there, MAE and MFE tell you how much of each move you kept, and the position size calculator plans the next entry against its stop — its OKX futures position size calculation turns the size into contracts. A hand-kept log works too: the trading journal template is free. Also connected: Binance, Bybit, MetaTrader 5.
OKX trading journal FAQ
Where do I get the OKX passphrase?
You make it up when you create the key. It is not your OKX account password. 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 knew the key but didn't accept the passphrase. You need the one you set when you created this particular key: every key has its own. Check your keyboard layout and letter case.
Will an OKX account from Europe, the US or Australia work?
Yes. FOQUS finds out which site the key was created on, okx.com, my.okx.com or app.okx.com, and reads your trades through that site's address.
Will my old OKX history be imported?
No, by design: an old history holds too little to review a trade. It has no order book, and OKX keeps a cancelled regular order with no fill for 2 hours only. So FOQUS records each trade itself from the minute you connect. Positions opened before that are skipped even when they close later, because FOQUS never saw their stops or the account at entry.
Can I connect an OKX subaccount?
Yes. Create the key inside the subaccount, with its permissions and its own passphrase. Don't mix the main account's and the subaccount's key and passphrase. FOQUS will record that subaccount's trades.
Sources
- OKX: API FAQ — the steps to create a key on the website and in the app; the Passphrase can't be viewed or recovered; the Transfer, Loan and Earn permissions; the 100 USD condition in some regions; subaccount keys; key expiry. Updated 28 September 2026.
- OKX API: Order history (last 7 days) — a cancelled regular order with no fill is kept for 2 hours.
- OKX API: Order book — the order-book request takes an instrument and a depth, never a time, and returns the current book.
- OKX API v5 — the Read, Trade and Withdraw permissions; up to 20 IP addresses per key; a key without an IP binding that has trade or withdraw expires after 14 days without use; the API addresses for my.okx.com and app.okx.com; the perm field FOQUS checks.