Reads an OKX account’s balances and activity, so reconciliation and reporting agents can check them against the books. It is read-only. It reads in place, in your deployment; only ids, hashes and counts reach LightHouse.
It is built from OKX’s public API reference and tested against invented responses; it has not been run against an OKX account (CERTIFICATION.md).
At a glance
Section titled “At a glance”| Collector | OKX, version 0.2.0 |
|---|---|
| Reads | OKX: OKX V5 REST API (the vendor's documentation) |
| Family | Finance |
| Kind | Exchange |
| Ways to connect | Access token |
| Scopes |
|
| Read only | Yes |
| Vendor's API can move money | Yes |
| Personal data | Financial |
| Hosts it may contact | openapi.okx.com, eea.okx.com, us.okx.com, {host} |
| Vendor API versions | V5 REST API (/api/v5) |
| Lowest engine version | 0.47.1 |
What it reads
Section titled “What it reads”- Balances: the trading account’s balance per currency (cash, available and frozen) and the funding account’s balance per currency. One record per account and currency, rewritten only when it changes and removed when it disappears.
- Spot fills: instrument, side, price, size, fee and fee currency, and the order and bill ids, from the fills history (the last three months).
- Deposits and withdrawals: currency, amount, chain, state, address and transaction id, and the withdrawal fee.
- Fills, deposits and withdrawals are read from the last cursor; the first read goes back
history_days(default 90).
It does not read derivatives positions, open orders, sub-accounts, earn or loans.
How to connect
Section titled “How to connect”- In OKX, create a V5 API key with only the Read permission, bound to your deployment’s egress IP addresses, and a passphrase.
- Note where the account is registered: okx.com (
global), my.okx.com, for the European Economic Area (eea), or app.okx.com, for the US and Australia (us). - In LightHouse, open Setup and admin, Connectors and choose OKX.
- Paste the API key, the secret key and the passphrase, and choose the region. Your browser seals them to your deployment; LightHouse never sees them.
The credential is JSON in the variable the source names (AAL_OKX by
default): api_key, api_secret, passphrase, region (global, the default, eea or us), and optionally environment (production, or demo for OKX’s demo trading, which sends x-simulated-trading: 1 to the same host).
Region. OKX requires each account to use the API domain of the site it registered on, and a key does not work on another one (OKX API reference, “Production Trading Services” and “Regional API Domain Requirement”, https://www.okx.com/docs-v5/en/):
region |
Registered on | API host | Reference |
|---|---|---|---|
global (default) |
okx.com | openapi.okx.com |
https://www.okx.com/docs-v5/en/ |
eea |
my.okx.com | eea.okx.com |
https://my.okx.com/docs-v5/en/ |
us |
app.okx.com (US and Australia) | us.okx.com |
https://app.okx.com/docs-v5/en/ |
The region is part of the sealed credential; the collector contacts only that region’s host.
Permissions
Section titled “Permissions”This collector is read-only in what it does.
- What the credential says is checked first: a credential whose
accessis not read-only, or whosescopesorpermissionsname anything but a read (trading, withdrawing, transferring, administering, or any permission the collector does not recognise as a read), is refused before any request is sent. The permissions OKX states for the key are then checked when you connect it and before every read. - Only read endpoints: the collector holds a list of the OKX endpoints it reads; a request to any other is refused before it is sent.
- Refused by the code (an allow-list): OKX states a key’s permissions (
GET /api/v5/account/config, fieldperm: “read_only : Read, trade : Trade, withdraw : Withdraw”; funding transfers are part of Trade, per OKX’s Overview, “API key permissions”, https://www.okx.com/docs-v5/en/). Before every read, and in the health check, onlyread_onlyis accepted. Any other permission,trade,withdrawor a name OKX adds later, is refused, naming it, and so is a key for which OKX states no permission. The error isOKX: refused: the credential can <permissions>; make a view-only one. - IP binding: the check reports whether the key is bound to an IP address (
ip); a key without one is told to pin it to your egress addresses (it is not refused). - Signing: each request carries OK-ACCESS-SIGN, the base64 HMAC-SHA256 of the timestamp, method, request path and body, with OK-ACCESS-KEY, OK-ACCESS-TIMESTAMP and OK-ACCESS-PASSPHRASE. The secret never leaves your store.
- Hosts: only the region’s host (
openapi.okx.com,eea.okx.comorus.okx.com), over https; redirects are never followed.
Limits
Section titled “Limits”- Spot fills only; OKX keeps the fills history for three months.
- Requests are paced and retried on 429 and 5xx with back-off; pages hold 100 rows.
- Amounts are exact decimals; a number that arrives as a float is refused.
- Each record is keyed by OKX’s own id, so one read twice is still one record.
Data handling
Section titled “Data handling”- Records hold financial data: balances, trades and transfers. Documents
carry the
labelyou give the source (defaultconfidential). - Content is read in place, in your deployment. LightHouse receives ids, hashes and counts, never the records, and never opens the credential.
- Errors carry a status and fixed text, never a provider’s body.
- The data is audit-ready for your own agents; nothing here is itself a certification against any standard.
Troubleshooting
Section titled “Troubleshooting”| What you see | What it means | What to do |
|---|---|---|
OKX: refused: the credential can trade; make a view-only one |
The key has the Trade (or Withdraw) permission | Make a key with only Read |
OKX answered HTTP 401 (the key, signature or passphrase was refused) |
Codes 50101 to 50114: the key, signature, passphrase, timestamp or IP was refused | Check the key, secret, passphrase and the key’s bound IP |
OKX answered HTTP 403 (permission denied) |
The key lacks Read | Give the key the Read permission |
OKX answered HTTP 401 ... straight after connecting |
The key belongs to another region’s site | Set region to the site the account is registered on |
region is one of global, eea, us |
The region is missing or misspelt | Choose global, eea or us |
OKX refused /api/v5/...: code 50001 |
OKX reported an error (its code is shown) | Try again later |
Certification
Section titled “Certification”Each entry is a run by Atlantic Agentic Labs, newest first. Only a run against the vendor’s sandbox or a client environment certifies a collector; a certification lasts six months, or less if the vendor publishes an API version the collector does not list. See How collectors are certified.
| Date | Collector | Engine | Vendor API | Method | Expires |
|---|---|---|---|---|---|
| 21 November 2026 | 0.1.0 | 0.47.1 | V5 REST API (/api/v5) | Fixtures only: built, not certified | Not applicable |
Security posture
Section titled “Security posture”From the collector’s last scan on the default branch. What each line means, and what blocks a release: Security posture.
| Last scanned | 25 November 2026 |
|---|---|
| Critical findings | 0 |
| High findings | 0 |
| Medium findings | 0 |
| Low findings | 0 |
| Info findings | 0 |
| Release blocked | No |
| Network allow-list check | Pass |
| Read-only behavioural test | Pass |
| SBOM (CycloneDX) | Produced |
| Dependency licences | Pass |
| Scanners | bandit 1.9.4, semgrep 1.181.1, pip-audit 2.10.1, osv-scanner 2.7.0, cyclonedx-py 7.5.0, pip-licenses 5.5.5, gitleaks repository job aal-secrets, hosts_check tools/hosts_check.py, read-only test pytest -m read_only |