# dYdX vs HTX trading API

> dYdX scores 69.5 (B) to HTX trading's 43.3 (E) for exchange derivatives. Prices, MCP, x402, uptime and agent notes side by side.

- Canonical: https://www.anchorterminal.com/compare/dydx-vs-htx
- Markdown: https://www.anchorterminal.com/compare/dydx-vs-htx.md (~4,850 tokens)
- Site index for agents: https://www.anchorterminal.com/llms.txt (the key docs and every listing in one file, at most 16 MB, about 4 million tokens: https://www.anchorterminal.com/llms-full.txt)
- API: https://www.anchorterminal.com/api/v1/index.json
- MCP: https://www.anchorterminal.com/mcp (the whole catalogue as tools, no key)
- DNS: dig +short TXT <slug>.grade.anchorterminal.com (the grade as a DNS TXT record, for a sandbox with no HTTP where names still resolve; also top., best.<category>. and <a>.vs.<b>. under the zone, and the same under grade.letme.dev)
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)
- Updated: 2026-11-04

dYdX scores 69.5 (B) on agent readiness against HTX trading API's 43.3 (E), and leads in 6 of 7 scored categories. Both do exchange derivatives.

- dYdX: grade B, 69.5/100, rank #222 of 1349. Markdown https://www.anchorterminal.com/tools/dydx.md · JSON https://www.anchorterminal.com/api/v1/tools/dydx.json
- HTX trading API: grade E, 43.3/100, rank #1156 of 1349. Markdown https://www.anchorterminal.com/tools/htx.md · JSON https://www.anchorterminal.com/api/v1/tools/htx.json
- Best crypto exchange APIs and MCP servers for AI agents: https://www.anchorterminal.com/best/crypto-exchanges/index.md
- All 210 exchanges comparisons: https://www.anchorterminal.com/compare/crypto-exchanges/index.md

## Which one, for what

### dYdX (B)

Good for: An agent trading perpetuals from its own Cosmos wallet or through a permissioned key on an owner's account, outside the US, Canada and UK.

Ahead on:
- Reliability, 83 against 38
- Schema & documentation, 58 against 40
- Security & auth, 78 against 51
- Payments & pricing, 60 against 15
- Maintenance & community, 83 against 57
- Transparency & trust, 50 against 25

Also in its favour:
- Open source

Watch for: No official MCP server; the one registry entry is a third party's analytics server

### HTX trading API (E)

Good for: Spot and USDT-margined derivatives for agents that can hold an HTX key, with no MCP server and no testnet.

Watch for: No official MCP server; the only one in the MCP registry is a third party's read-only ticker server


## Why the edge

### Reliability: dYdX +45

- dYdX (83): Read with the hosted lines on the indexer API and the chain endpoints the clients submit to. status.dydx.trade is an Atlassian Statuspage with Frontends, dYdX Chain, Indexer, Order Gateway and Client Libraries components and an RSS history (20). From 1 August to 3 November 2026 the feed has eight items, seven scheduled maintenance windows of 29 minutes to 2 hours (indexer on 9 September, 8 and 15 October, protocol v9.7 on 11 September and v9.8.0 on 12 October, WebSocket compression on 26 and 28 October) and one degraded instant-deposit path through an onboarding partner from 24 to 29 September, outside the trading API. Clean or trivial (30). Rate limits documented with numbers for the indexer, the block limits and the public nodes (15). No 429 shape or Retry-After for the indexer; short-term orders expire by `goodTilBlock` and client IDs let an agent find an order after a timeout (8 of 15). No SLA (0). Mainnet generally available; the Order Entry Gateway is marked testnet-only (10). 20 + 30 + 15 + 8 + 0 + 10 = 83.
- 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.

### Payments & pricing: dYdX +45

- dYdX (60): No machine payment protocol (0). Fees public per tier without login (20). Testnet with a faucet and no card anywhere (20). No signup; an agent with a funded wallet trades, subject to the geographic terms (20). Total 60.
- HTX trading API (15): No machine payment protocol (0). The fee schedule at htx.com/fee is drawn by script and answered no text, so no price is recorded first-hand (0 of 20, unchecked). Public market data needs no key, card or account; trading needs a verified and funded account. Judgement call (15 of 20). A person must sign up in a browser and pass identity checks (0). 0 + 0 + 15 + 0 = 15.

### Security & auth: dYdX +27

- dYdX (78): Orders are signed by the account key or by a permissioned key the owner adds as an authenticator, limited by message type, subaccount and market with AllOf or AnyOf, and revoked by `remove_authenticator`; no shared secret and nothing in a URL (28 of 30). A key can be confined to placing and cancelling orders on one subaccount with withdrawals and transfers excluded, though not to a position or order size, and the interface's default API wallet trades all cross-margin pairs (16 of 20). The API returns no untrusted content (10). Every action is a chain transaction and the indexer lists fills, orders and transfers per subaccount, and authenticators can be listed; no per-key log (10 of 15). A Cantina bug bounty up to $1,000,000 sponsored by dYdX Trading Inc. over the protocol, indexer, web client and SDKs, an Informal Systems audit; no security.txt and no certification (14 of 20). Total 78.
- 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.

### Maintenance & community: dYdX +26

- dYdX (83): Read on the clients and the chain. v4-clients was pushed on 29 October 2026 and protocol v9.8.0 shipped on 12 October (30). Protocol v9.7 on 11 September, v9.8.0 on 12 October, v4-client-js tags 3.5.0 and 3.6.0, three or more in 90 days (20). A Discord, a help centre and 36 open issues on v4-clients whose replies couldn't be read (12 of 25). Official SDKs current, the TypeScript client at 3.6.0 and the Python client at 1.1.6 from February 2026 (12 of 15). CI workflows for lint, test, publish and audit, with trusted publishing and provenance on npm (9 of 10). Total 83.
- 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.

### Transparency & trust: dYdX +25

- dYdX (50): The editorial half. Clients AGPL-3.0 with a terms-bound use condition, the chain under a custom licence, two terms documents (dYdX Trading Inc.'s v4 terms of 12 March 2026 and dYdX International Ltd's of 6 June 2025) that are clear about who runs nothing (22 of 30). The privacy policy of 6 June 2025 names dYdX International Ltd, keeps technical data until no longer necessary with no periods, and names no subprocessors; nothing covers the unnamed indexer operator (12 of 30). Protocol upgrades and the WebSocket compression change were posted as dated maintenance notices, deprecated rate-limit fields are marked, but no deprecation policy or notice period is stated (10 of 20). The policy says data may be processed in the EEA and elsewhere, with no subprocessor list (6 of 20). Total 50.
- 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.

### Schema & documentation: dYdX +18

- dYdX (58): No OpenAPI file found for the indexer; the docs publish a types reference of about 200 pages (OrderSide, TimeInForce, OrderStatus and the rest) and the chain's protobuf messages are in the clients (8 of 25). llms.txt and Markdown docs (10). Endpoint pages describe each call and the guides say when to use short-term against long-term orders and the indexer against the node, but descriptions are short (12 of 20). Enums and types on every field in the reference, with pagination and cursor parameters typed (11 of 15). Examples in Python, TypeScript and Rust for each step; errors are described by HTTP status (400 malformed, 404 not found) with no code list (9 of 15). A /v4 path, protocol releases dated on the status page, deprecated rate-limit fields marked, but no API changelog (8 of 15). Total 58.
- 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.

## Score by category

| Category | Weight | dYdX | HTX trading API | Edge |
| --- | --- | --- | --- | --- |
| Reliability | 16% (20 this run) | 83 | 38 | dYdX +45 |
| Performance | 10%, pending | pending | pending | not scored in this run |
| Schema & documentation | 13% (16.2 this run) | 58 | 40 | dYdX +18 |
| Agent ergonomics | 13% (16.2 this run) | 66 | 69 | HTX trading API +3 |
| Security & auth | 14% (17.5 this run) | 78 | 51 | dYdX +27 |
| Payments & pricing | 10% (12.5 this run) | 60 | 15 | dYdX +45 |
| Task success | 10%, pending | pending | pending | not scored in this run |
| Maintenance & community | 7% (8.8 this run) | 83 | 57 | dYdX +26 |
| Transparency & trust | 7% (8.8 this run) | 50 | 25 | dYdX +25 |
| Negative events | ≤15 | 0 | 0 | |
| **Total** | | **69.5 · B** | **43.3 · E** | |

## Facts side by side

| Fact | dYdX | HTX trading API |
| --- | --- | --- |
| Kind | HTTP API | HTTP API |
| Vendor | dYdX Trading Inc. | HTX |
| Hosted endpoint | no (local only) | no (local only) |
| Transports |  |  |
| Auth | OAuth or key | API key |
| Pricing | Pay per use | Pay per use |
| x402 | no | no |
| Licence | The clients are AGPL-3.0 with a use condition tied to the v4 Terms of Use; the chain software (dydxprotocol/v4-chain) carries a custom licence GitHub cannot classify. The hosted indexer at indexer.dydx.trade and the front end are run by third parties, not dYdX Trading Inc. | none |
| Tools exposed | 0 | 0 |
| Read-only variant documented | no | no |
| llms.txt | yes | no |
| Last release | 2026-10-29 | 2026-10-21 |
| Terms last updated | 2026-03-12 | no date given |
| Privacy policy last updated | 2025-06-06 | no document linked |
| Customer content may train models | not found in the text | not found in the text |
| Terms restrict automated access | not found in the text | not found in the text |
| Terms restrict benchmarking | not found in the text | not found in the text |
| Terms or service can change without notice | yes | yes |
| Arbitration or class-action waiver | yes | yes |
| Popularity | 119 stars, 86k npm/wk | 684 stars |

## Verdicts

**dYdX.** dYdX gives an agent keyless indexer reads, permissioned keys limited by message type, subaccount and market, a Statuspage with a clean 90 days, published fees and a testnet with a faucet. There is no official MCP server or OpenAPI file, orders are chain transactions signed by the clients, and no one entity operates the hosted endpoints.

**HTX trading API.** HTX's API has per-endpoint rate limits, read, trade and withdraw key permissions with IP binding, and SDKs in five languages. No official MCP server exists, the testnet is closed, the public reference is still Huobi's with a 2022 changelog, and the fee schedule, terms and restricted countries are on script-drawn pages we couldn't read.

## Before you call either

### dYdX

1. Ask the account owner for an authenticator limited to `/dydxprotocol.clob.MsgPlaceOrder` and `MsgCancelOrder` on one subaccount, and keep its private key out of prompts
2. Set a unique 32-bit `clientId` on every order and look it up on `/v4/orders` after a timeout; short-term orders expire with `goodTilBlock` (at most 20 blocks ahead)
3. Stay under 2 stateful orders a block and 20 per 100 blocks; failed placements count, so use short-term orders for active trading
4. Enable permessage-deflate on the indexer WebSocket; since 26 October 2026 connections without compression may be refused with 426
5. Check `/v4/geo` and the compliance screen before trading for a person, since the terms exclude the United States, Canada and the United Kingdom

### HTX trading API

1. Ask the operator for a key with Read and Trade only and bound to your IP addresses; a key without IP binding expires after 90 days
2. Send a fresh client-order-id of up to 64 characters with every order and reuse it only on retry; a repeat within 8 hours answers invalid.client.order.id
3. Watch X-HB-RateLimit-Requests-Remain and pace at under 100 order calls per 2 seconds per UID; limits are shared by every key on the account
4. There is no testnet; try order logic with the smallest size the market allows
5. Confirm the person's country is served before trading; the restricted list in the user agreement couldn't be read here

## Questions

### Which is better for AI agents, dYdX or HTX trading API?

dYdX scores 69.5 (B) on agent readiness against HTX trading API's 43.3 (E), and leads in 6 of 7 scored categories.

### Do dYdX and HTX trading API need an API key?

dYdX takes an API key or an OAuth sign-in. HTX trading API needs an API key.

### Can an agent call dYdX and HTX trading API without installing anything?

No hosted endpoint is listed for dYdX. No hosted endpoint is listed for HTX trading API.

### Are dYdX and HTX trading API open source?

dYdX is open source (The clients are AGPL-3.0 with a use condition tied to the v4 Terms of Use; the chain software (dydxprotocol/v4-chain) carries a custom licence GitHub cannot classify. The hosted indexer at indexer.dydx.trade and the front end are run by third parties, not dYdX Trading Inc.). No open-source release is listed for HTX trading API.


## For agents

- This comparison as JSON: https://www.anchorterminal.com/compare/dydx-vs-htx.json, and with the fewest tokens: https://www.anchorterminal.com/compare/dydx-vs-htx.min.md
- Over MCP at https://www.anchorterminal.com/mcp (no key): `compare_tools {"a": "dydx", "b": "htx"}`. From a terminal: `anchor compare dydx htx`
- Each listing in full: https://www.anchorterminal.com/api/v1/tools/dydx.json and https://www.anchorterminal.com/api/v1/tools/htx.json

## Other comparisons with dYdX or HTX trading API

- [Bitfinex API vs dYdX](https://www.anchorterminal.com/compare/bitfinex-vs-dydx.md)
- [Bitfinex API vs HTX trading API](https://www.anchorterminal.com/compare/bitfinex-vs-htx.md)
- [Bitget vs dYdX](https://www.anchorterminal.com/compare/bitget-vs-dydx.md)
- [Bitget vs HTX trading API](https://www.anchorterminal.com/compare/bitget-vs-htx.md)
- [Bithumb Open API vs dYdX](https://www.anchorterminal.com/compare/bithumb-vs-dydx.md)
- [Bithumb Open API vs HTX trading API](https://www.anchorterminal.com/compare/bithumb-vs-htx.md)
- [Bitstamp API vs dYdX](https://www.anchorterminal.com/compare/bitstamp-vs-dydx.md)
- [Bitstamp API vs HTX trading API](https://www.anchorterminal.com/compare/bitstamp-vs-htx.md)
- [Bybit vs dYdX](https://www.anchorterminal.com/compare/bybit-vs-dydx.md)
- [Bybit vs HTX trading API](https://www.anchorterminal.com/compare/bybit-vs-htx.md)
- [Crypto.com Exchange API vs dYdX](https://www.anchorterminal.com/compare/crypto-com-exchange-vs-dydx.md)
- [Crypto.com Exchange API vs HTX trading API](https://www.anchorterminal.com/compare/crypto-com-exchange-vs-htx.md)
- [dYdX vs Uniswap Trading API](https://www.anchorterminal.com/compare/dydx-vs-uniswap.md)
- [dYdX vs Upbit Open API](https://www.anchorterminal.com/compare/dydx-vs-upbit.md)
- [Gate vs HTX trading API](https://www.anchorterminal.com/compare/gate-io-vs-htx.md)
- [Gemini Exchange API vs HTX trading API](https://www.anchorterminal.com/compare/gemini-exchange-vs-htx.md)
- [HTX trading API vs Hyperliquid](https://www.anchorterminal.com/compare/htx-vs-hyperliquid.md)
- [HTX trading API vs Kraken API](https://www.anchorterminal.com/compare/htx-vs-kraken.md)
- [HTX trading API vs KuCoin](https://www.anchorterminal.com/compare/htx-vs-kucoin.md)
- [HTX trading API vs MEXC API](https://www.anchorterminal.com/compare/htx-vs-mexc.md)
- [HTX trading API vs OKX API](https://www.anchorterminal.com/compare/htx-vs-okx.md)
- [HTX trading API vs Uniswap Trading API](https://www.anchorterminal.com/compare/htx-vs-uniswap.md)
- [HTX trading API vs Upbit Open API](https://www.anchorterminal.com/compare/htx-vs-upbit.md)
- [Binance API vs HTX trading API](https://www.anchorterminal.com/compare/binance-vs-htx.md)
- [Coinbase Advanced Trade API vs HTX trading API](https://www.anchorterminal.com/compare/coinbase-advanced-trade-vs-htx.md)
- [Coinbase MCP server (Coinbase for Agents) vs HTX trading API](https://www.anchorterminal.com/compare/coinbase-mcp-vs-htx.md)
- [Binance API vs dYdX](https://www.anchorterminal.com/compare/binance-vs-dydx.md)
- [Coinbase Advanced Trade API vs dYdX](https://www.anchorterminal.com/compare/coinbase-advanced-trade-vs-dydx.md)
- [Deribit vs dYdX](https://www.anchorterminal.com/compare/deribit-vs-dydx.md)
- [Deribit vs HTX trading API](https://www.anchorterminal.com/compare/deribit-vs-htx.md)
- [dYdX vs Gate](https://www.anchorterminal.com/compare/dydx-vs-gate-io.md)
- [dYdX vs Gemini Exchange API](https://www.anchorterminal.com/compare/dydx-vs-gemini-exchange.md)
- [dYdX vs Hyperliquid](https://www.anchorterminal.com/compare/dydx-vs-hyperliquid.md)
- [dYdX vs Kraken API](https://www.anchorterminal.com/compare/dydx-vs-kraken.md)
- [dYdX vs KuCoin](https://www.anchorterminal.com/compare/dydx-vs-kucoin.md)
- [dYdX vs MEXC API](https://www.anchorterminal.com/compare/dydx-vs-mexc.md)
- [dYdX vs OKX API](https://www.anchorterminal.com/compare/dydx-vs-okx.md)
- [Coinbase MCP server (Coinbase for Agents) vs dYdX](https://www.anchorterminal.com/compare/coinbase-mcp-vs-dydx.md)

---

Query this catalogue directly over MCP: https://www.anchorterminal.com/mcp (Streamable HTTP, no key). How: https://www.anchorterminal.com/agents/#mcp
