# QFEX — dated pitfalls and invariants

This table summarizes protocol traps that change client decisions. Observed behavior is limited to its dated scope; documentation-only statuses and toolkit safeguards remain labeled separately.

## TL;DR

Keep exact IDs, original sent quantity, complete page evidence, signed positions, and unknown outcomes. No client-ID retry rule can substitute for resolution.

## 1. Dated findings

| Date / evidence | Trap | Rule | Detail |
|---|---|---|---|
| Observed 2026-10-01 | Repeated client ID creates another order | Never replay an unknown placement | [orders.md](orders.md) §2 |
| Observed 2026-10-01 | Filled event quantity is one execution | Sent minus remaining; deduplicated trades | [orders.md](orders.md) §3 |
| Observed 2026-10-01 | FILLED can retain a remainder | Await terminal evidence | [orders.md](orders.md) §3 |
| Observed 2026-10-01 | NO_SUCH_ORDER has zero/default fields | It proves neither fill nor clean cancel | [orders.md](orders.md) §4 |
| Observed 2026-10-01 | Resting reduce-only survives flat exposure | Do not assume its displayed quantity is capped | [orders.md](orders.md) §5 |
| Observed 2026-10-01 | Capacity combines both sides | 20 resting orders per symbol total | [orders.md](orders.md) §5 |
| Observed 2026-10-01 | LIMIT GTC waits for speed bump | Passive LIMIT is delayed too | [orders.md](orders.md) §1 |
| Observed 2026-10-01 | Crossing ALO cancels after ACK | ACK does not mean resting | [orders.md](orders.md) §1 |
| Observed 2026-10-01 | STP removes resting self-order | Incoming IoC may continue matching | [orders.md](orders.md) §4 |
| Observed 2026-10-01 | Historic order appears late | History miss is not rejection | [orders.md](orders.md) §6 |
| Observed 2026-10-01 | REST order counts lag socket | Temporary mismatch is not wrong-account proof | [account-and-leverage.md](account-and-leverage.md) §2 |
| Observed 2026-10-01 | Position rows are signed and can remain zero | Do not infer size from a separate side | [account-and-leverage.md](account-and-leverage.md) §1 |
| Observed 2026-10-01 | Leverage fails while symbol occupied | Lock by symbol, not account | [account-and-leverage.md](account-and-leverage.md) §4 |
| Observed 2026-10-01 | UUID case affects selection | Use canonical server account ID | [api-and-auth.md](api-and-auth.md) §2 |
| Observed 2026-10-01 | Auth result differs from one docs example | Accept known explicit variants | [api-and-auth.md](api-and-auth.md) §3 |
| Observed 2026-10-01 | Numeric strings/nonboolean flags rejected | Serialize numeric literals and boolean flags | [orders.md](orders.md) §1 |
| Public probe 2026-09-30 | Refdata cached beyond its immediate fetch | Live band for IoC clamp | [markets-and-numbers.md](markets-and-numbers.md) §4 |
| Public probe 2026-09-30 | `clobPairId` repeats | Full symbol identity | [markets-and-numbers.md](markets-and-numbers.md) §1 |
| Public probe 2026-09-30 | REST book padded with zero levels | Validate filtered bid/ask pair | [market-data.md](market-data.md) §3 |
| Public probe 2026-10-03 | Inventory changes | Query current listings | [markets-and-numbers.md](markets-and-numbers.md) §1 |
| Documentation | Broad cancellation affects account | Separate explicit scope from exact cancel | [orders.md](orders.md) §4 |
| Implementation inference | Read types have no request ID | One outstanding request per response kind | [api-and-auth.md](api-and-auth.md) §3 |
| Experimental toolkit | Fill journal has limited freshness evidence | Opt-in, uncertainty exposed, never proof | [orders.md](orders.md) §6 |

## 2. Diagnostic families

Distinguish `InvalidJSONFormat` wire errors, broad `InvalidOrder`, tick/quantity bounds, `FAILED_MARGIN_CHECK`, symbol risk/open-interest limits, order-capacity rejection, `RateLimited`, and KYC/terms/permission conditions. Unknown names remain visible. A server error after ACK cannot erase acceptance evidence.

Documented and observed frame/reply variants can differ. Preserve compatible decoding rather than assume one page is exhaustive. The fake exchange's adverse controls stress the client and must not become dated venue claims.

## Open questions / not verified

- Resting reduce-only matching at zero exposure, subaccount scope, throttle shape/limits, stop visibility, equity freshness/floor, and stream cadence.
- Optional fill-ledger and binding-probe behavior remains experimental.

## Sources

The topic files linked above contain primary URLs and evidence dates. Official index: [Official documentation index](https://docs.qfex.com/llms.txt). Documentation checked through 2026-10-03; venue behavior and response shapes can change.

<!-- license-footer -->
_© markpaper authors. Licensed under [CC BY 4.0](LICENSE.md): when publishing or adapting this material, credit “markpaper — QFEX knowledge base” and link to the original and the license._
