# HTX trading API vs OKX API (slim)

> OKX scores 64.3 (B) to HTX trading's 43.3 (E) for exchange market data. Prices, MCP, x402, uptime and agent notes side by side.

- Full: https://www.anchorterminal.com/compare/htx-vs-okx.md (~4,750 tokens) · this version ~2,630 tokens · JSON https://www.anchorterminal.com/compare/htx-vs-okx.json · canonical https://www.anchorterminal.com/compare/htx-vs-okx
- Index: https://www.anchorterminal.com/llms.txt · API: https://www.anchorterminal.com/api/v1/index.json · MCP: https://www.anchorterminal.com/mcp · Updated: 2026-11-04
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)

OKX API scores 64.3 (B) on agent readiness against HTX trading API's 43.3 (E), and leads in every scored category. Both do exchange market data.

- HTX trading API: E 43.3, rank #1156 of 1349 · https://www.anchorterminal.com/tools/htx.min.md
- OKX API: B 64.3, rank #432 of 1349 · https://www.anchorterminal.com/tools/okx.min.md
- HTX trading API, good for Spot and USDT-margined derivatives for agents that can hold an HTX key, with no MCP server and no testnet.
- OKX API, good for An agent trading spot, perpetuals, futures or options on a person's OKX account from a local machine, with demo trading to test first and grid or DCA bots through the kit. Ahead on Reliability, 65 against 38; Schema & documentation, 73 against 40; Agent ergonomics, 77 against 69; Security & auth, 68 against 51; Payments & pricing, 20 against 15; Maintenance & community, 81 against 57; Transparency & trust, 62 against 25. Also Runs on your own machine; Free to start without a card.

| Category | HTX trading API | OKX API |
| --- | --- | --- |
| Reliability (16%) | 38 | 65 |
| Performance (10%) | pending | pending |
| Schema & documentation (13%) | 40 | 73 |
| Agent ergonomics (13%) | 69 | 77 |
| Security & auth (14%) | 51 | 68 |
| Payments & pricing (10%) | 15 | 20 |
| Task success (10%) | pending | pending |
| Maintenance & community (7%) | 57 | 81 |
| Transparency & trust (7%) | 25 | 62 |

| Fact (where they differ) | HTX trading API | OKX API |
| --- | --- | --- |
| Vendor | HTX | OKX |
| Transports |  | stdio |
| Licence | none | Proprietary hosted service under OKX's Terms of Service (29 October 2026) and API Agreement (28 July 2026). The Agent Trade Kit (MCP server, CLI and skills) is MIT |
| Tools exposed | 0 | 170 |
| Read-only variant documented | no | yes |
| llms.txt | no | yes |
| Last release | 2026-10-21 | 2026-10-28 |
| Terms last updated | no date given | 2026-10-29 |
| Privacy policy last updated | no document linked | couldn't be read |
| Popularity | 684 stars | 499 stars, 1.8k npm/wk |

Why the edge:
- Transparency & trust, OKX API +37: HTX trading API 25 (The editorial half. A closed service whose user agreement exists but couldn't be read (script-drawn pages), so the licence clarity is unknown rather than unclear (10 of 30). The privacy policy was not read (0 of 30, unchecked). The testnet shutdown and the 2022 changelog entries are dated, with no deprecation policy (5 of 20). No subprocessor or data-location statement read (0 of 20). 10 + 0 + 5 + 0 = 15.); OKX API 62 (The editorial half. A closed service with terms that name the contracting entities by region and an API Agreement for agents; the kit is MIT (17 of 30). The privacy policy was not read (5 of 30). The changelog dates sunsets and labels breaking changes, such as port 8443 on 31 October and 16 November 2026 (16 of 20). No subprocessor or data-location statement read; the MCP server is local and its npm package runs a postinstall script whose purpose we did not trace (0 of 20). 17 + 5 + 16 + 0 = 38.)
- Schema & documentation, OKX API +33: HTX trading API 40 (No OpenAPI or other machine-readable contract found in the docs or the GitHub accounts (0). No llms.txt on htx.com, and the readable reference is a static page (0). Each endpoint states its purpose and parameters, without when-to-use guidance (12 of 20). Parameter tables carry types, required flags and enums for order types and states (10 of 15). Request and response examples throughout and error-code tables with messages (11 of 15). Versions v1 and v2 are mixed in one reference whose last changelog entry is 24 June 2022, while HTX's newer docs on htx.com couldn't be read (7 of 15). 0 + 0 + 12 + 10 + 11 + 7 = 40.); OKX API 73 (No OpenAPI file was found in the V5 docs; the kit's tool definitions are typed TypeScript with annotations, and the organisation has an undescribed ai-builder-openapi-md repository we did not read (12 of 25). okx.com/llms.txt exists and links the API and Agent Trade Kit pages, though the V5 docs have no Markdown twins (5 of 10). Each endpoint states its rate limit, rule, parameters and notes (15 of 20). Enums for ordType, tdMode and instType with required flags (12 of 15). Request and response examples per endpoint and an error code list with messages (14 of 15). A dated changelog with an upcoming-changes section that labels breaking changes and dates sunsets (15). 12 + 5 + 15 + 12 + 14 + 15 = 73.)
- Reliability, OKX API +27: HTX trading API 38 (Read with the hosted lines. No status page found; status.htx.com does not resolve and nothing on htx.com was readable (0). No readable incident history (5). Rate limits documented per endpoint with numbers, 100 order calls per 2 seconds per UID and so on, with remaining-quota headers (15). No 429 or Retry-After behaviour is documented and the only limit error named is 1006 for conditional orders; a client-order-id unique within 8 hours and an idempotent withdrawal id give safe retries on writes (8 of 15). No SLA found (0). The spot and swap APIs are generally available (10). 0 + 5 + 15 + 8 + 0 + 10 = 38.); OKX API 65 (Read with the hosted lines on the V5 REST API. okx.com/status is OKX's own page with issue descriptions, maintenance notices and deposit and withdrawal status, but no component history or feed (10 of 20). It lists no incident between 5 August and 3 November 2026; its newest entry is from March 2024, and whether every incident reaches the page cannot be told, so read as clean with a doubt (20 of 30). Rate limits per endpoint, per User ID and per sub-account with numbers, and WebSocket limits (15). Error 50011 on a limit, a clOrdId on orders and a cap of 3 amendments in flight, but no Retry-After or backoff guidance found (10 of 15). No SLA (0). Generally available (10). 10 + 20 + 15 + 10 + 0 + 10 = 65.)
- Maintenance & community, OKX API +24: HTX trading API 57 (Read as a closed service. The readable changelog ends on 24 June 2022, but the official contract SDKs were pushed on 21 October 2026 and the spot SDKs in April and July 2026, so the API surface is still being maintained; judgement call (20 of 30). SDK pushes on 30 July, 23 August and 21 October 2026 are commits, not releases (10 of 20). A Telegram group for API support and a support centre, neither tested; GitHub issues not read (8 of 15). Official SDKs in five languages (15). No CI seen, dependencies not checked (4 of 10). 20 + 10 + 8 + 15 + 4 = 57.); OKX API 81 (Read as a closed service with an open-source kit. Changelog entry of 27 October 2026 and kit v1.5.0 on 28 October (30). Changelog entries on 3, 6, 11, 18, 20 and 26 August, 15, 29 and 30 September and 27 October, and kit releases on 20 and 21 August, 1, 7, 14 and 23 September, 19 and 28 October (20). A public changelog, a Telegram community for the kit and GitHub issues whose replies were not read (10 of 15). python-okx is named as the official SDK and the kit is current; the MCP server is not in the official registry (12 of 15). The kit runs CI on push and pull request across Node 18, 20 and 26 with unit tests and coverage (9 of 10). 30 + 20 + 10 + 12 + 9 = 81.)
- Security & auth, OKX API +17: HTX trading API 51 (HMAC-signed keys with Read, Trade and Withdraw permissions, sub-user keys without Withdraw, up to 20 bound IPs, revocation in the account and a 90-day expiry without IP binding. The AccessKeyId and the HMAC signature travel as query parameters; the secret does not, so no deduction for a secret in the URL (24 of 30). Read-only keys and withdraw-free keys exist; no server-side confirmation for orders or withdrawals (14 of 20). The API returns the exchange's own data, no untrusted content (10). No per-call log or key-use history found for the operator (3 of 15). No security.txt, disclosure policy or certification found on the pages that loaded (0 of 20). 24 + 14 + 10 + 3 + 0 = 51.); OKX API 68 (Key, secret and passphrase with Read, Trade and Withdraw permissions, up to 20 bound IPs, revocation in the account, and unbound Trade or Withdraw keys that expire after 14 idle days; no OAuth (28 of 30). Read-only keys, sub-account keys, demo trading, the kit's --read-only flag and its startup check that hides order tools when the key cannot trade, and an API Agreement requiring minimum scope; no confirmation step in the kit (18 of 20). The news and smartmoney modules return third-party text and the docs read give no guidance on treating it as untrusted (5 of 15). An account audit log tool in the kit and usage records for unbound keys in the Security Center, no per-call log (9 of 15). No security.txt; SECURITY.md with security@okx.com and GitHub private advisories; certifications and a bounty not read (8 of 20). 28 + 18 + 5 + 9 + 8 = 68.)
- Agent ergonomics, OKX API +8: HTX trading API 69 (Graded on the REST API. Responses can be sized with depth types, size and limit parameters on books, candles and history (15 of 25). Paging by from, size and direct on orders and history (14 of 20). Errors return err-code strings with messages, listed in tables (13 of 20). A client-order-id unique within 8 hours and idempotent withdrawal ids make retries safe, with no idempotency header on other writes (14 of 20). Few required parameters and official SDKs in five languages (13 of 15). 15 + 14 + 13 + 14 + 13 = 69.); OKX API 77 (limit parameters on books, candles and history, and in the kit --modules and --read-only narrow 170 tools to the three default modules; no field selection (17 of 25). after, before and limit cursors on history endpoints (18 of 20). Numeric codes with messages, such as 51020 for an invalid quantity, and the kit returns a structured error block with code, message and endpoint (17 of 20). clOrdId on orders, batch endpoints and a cap of 3 amendments in flight; the kit sets readOnlyHint on query tools but destructiveHint false on order tools and has no idempotency key (13 of 20). python-okx, the CLI and a demo profile, with passphrase and HMAC signing on every private call (12 of 15). 17 + 18 + 17 + 13 + 12 = 77.)
