Changelog
Record of all API changes and updates for Derivatives Trading.
2026-11-22
Position Mode (Hedge Mode Default & One-Way Switching)
- New: Full Hedge Mode (
dualSidePosition: true) and One-way Mode (dualSidePosition: false) support across matching settlement, order admission, order preview, FAPI, and website APIs. All regular users default to Hedge Mode and can hold independentLONGandSHORTpositions simultaneously on the same contract. - Changed:
GET /fapi/v1/positionSide/dualnow returns each account's persisted setting (defaulttrue), andPOST /fapi/v1/positionSide/dualswitches between Hedge and One-way modes (returning-4068if open positions exist or-4067if open/trigger orders exist). - New: Website endpoints
GET /api/v1/account/position-modeandPOST /api/v1/account/position-mode(supportingdual_side_positionorposition_mode: "hedge" | "one_way"). - Changed:
POST /fapi/v1/order,POST /fapi/v1/order/test,POST /fapi/v1/algoOrder,POST /api/v1/orders, andPOST /api/v1/orders/previewnow accept and enforcepositionSide(LONG/SHORTin Hedge Mode;BOTHin One-way Mode).
Testnet Faucet & Trading Compatibility
- New: Arbitrum Sepolia (
421614) testnet Mock USDT faucet endpoints (GET /api/v1/faucet/status,POST /api/v1/faucet/claim) enabling one-time gas-free claiming of1,000mock USDT directly to the connected wallet. - New:
POST /fapi/v1/order/test,GET /fapi/v1/leverageBracket, andDELETE /api/v1/orders(website one-click cancel-all) are live onhttps://api.ztdxtest.xyz.
2026-11-19
Testnet API
- Changed: the testnet API base URL is
https://api.ztdxtest.xyz. Perp WebSocket iswss://api.ztdxtest.xyz/ws. Spot WebSocket iswss://api.ztdxtest.xyz/spot/ws. https://api-sepolia.ztdx.iodoes not answer. Useapi.ztdxtest.xyzfor this testnet.GET /ws/externalreturns404.
The rest of this entry is what the testnet gateway on chain 421614 actually returns.
Payloads that differ from the old examples
ticker:{symbol}pusheslast_price,mark_price,index_price,funding_rate,open_interest,volume_24h, and thereference_*fields.next_funding_timeis Unix seconds.server_timeandtimestampare milliseconds.orderbook:{symbol}levels are{price, size}objects.user_orderslevels are[price, qty]arrays. Each frame also hassource,epoch,book_seq, andsnapshot_type.- The listed spot market is
SOLUSDT(tick0.01, lot0.001, min notional1, max notional10000, maker/taker fee 10 bps).DFUSDTreturnsMARKET_NOT_FOUND. - Spot klines are 11-element arrays. Indexes 9 and 10 are buyer base volume and buyer quote volume.
- An unknown spot channel returns
{"type":"error","code":"INVALID_SUBSCRIPTION"}. An unknown perp channel returnsUNSUPPORTED_CHANNEL.
Routes that return 404 on the testnet gateway
GET /fapi/v1/fundingRate, GET /fapi/v1/fundingInfo, GET /fapi/v1/openInterest, GET /futures/data/*, GET /fapi/v1/adlQuantile, GET /fapi/v1/forceOrders, GET /fapi/v1/userTrades/slippage, POST /fapi/v1/order/test, GET /metrics, GET /api/v1/spot/health, points and epochs, on-chain referral reads, GET /api/v1/account/pnl, GET /api/v1/account/stats, GET /api/v1/account/performance-summary, POST /api/v1/account/margin-mode, GET /api/v1/unified/liquidations, POST /api/v1/unified/risk/simulate, and public POST /api/v1/admin/spot/*.
Substitutes that answer on testnet: GET /api/v1/funding-rates, GET /fapi/v1/premiumIndex, GET /api/v1/markets/{symbol}/ticker, GET /api/v1/markets/{symbol}/details, GET/POST /fapi/v1/marginType (401 without a key), GET /api/v1/spot/markets, and GET /health.
POST and PUT /fapi/v1/batchOrders are not batch place/modify. Without an API key they return 401 {"code":-2015,"msg":"API key is required."}. Batch cancel remains DELETE /fapi/v1/batchOrders.
Collateral used by testnet
- Perp mock USDT, Arbitrum Sepolia
421614:0xe125f700924e33b77f3343a9dd8aac7c24b4f68e, 6 decimals. - BSC spot vault:
0x375365F809243728E520C25D779d7bF9878DEa8D. BSC spot USDT:0xe665c19c47c85cc0236345d9a3d64060b6a9ac19, 18 decimals. Native BNB uses the zero address.
2026-05-07
REST API — Account / User Data Stream
- New:
POST / PUT / DELETE /fapi/v1/listenKey(HMAC SHA256). Issue, refresh, and revoke a 64-character listenKey for the user data stream. TTL 3600s, one active key per user (POST is idempotent). See User Data Stream. - New:
GET / POST /fapi/v1/marginType(HMAC SHA256). Stub for Binance compatibility —GETalways returnsmarginType=CROSSED,POST CROSSEDis idempotent,POST ISOLATEDis rejected with-4046(the fapi/HMAC namespace runs cross-only). For genuine isolated mode, use the JWT-authenticatedPOST /api/v1/account/margin-mode. See Margin Type.
REST API — Market Data
- Changed:
GET /fapi/v1/exchangeInfonow populatessymbols[*].filters(previously absent). Filters returned:PRICE_FILTER,LOT_SIZE,MARKET_LOT_SIZE,MIN_NOTIONAL. See Exchange Information. - Changed:
GET /api/v1/markets(non-fapi list endpoint) now also exposesmin_order_size_usd,lot_size, andtick_sizeso clients can size orders without round-tripping to the per-symbol detail endpoint.
REST API — Orders
- Changed:
POST /fapi/v1/ordernow bypasses theMIN_NOTIONALfilter whenreduceOnly=true. A position bled below 10 USD by funding fees can now be closed via reduce-only — it could previously not be placed at all.LOT_SIZEandMAX_NOTIONALare still enforced. - Changed:
-1013rejection messages now start with the standard BinanceFilter failure: <FILTER>.prefix (LOT_SIZE,MIN_NOTIONAL, orMAX_NOTIONAL) so clients can switch on the failed filter type.
WebSocket — Authentication
- New: WebSocket auth accepts a fapi listenKey:
{"type":"auth","listenKey":"<key>"}. The lookup also refreshes the TTL on the underlying Redis keys, so a long-running WebSocket connection acts as implicit keepalive. See WebSocket General.
2026-04-28
REST API — Orders
- New:
PUT /fapi/v1/order(modify order). Implemented as cancel‑and‑resubmit with proper margin re‑freezing; preserves theorderIdfrom the caller's perspective. Thesidefield is optional (defaults to the existing order's side). See Modify Order. - New: Symbol‑sharded routing (Plan A) — write‑side requests are
transparently forwarded to the pod that owns the symbol's shard. No client
change required;
clientOrderIdround‑trips remain stable. - New: Listing helpers
GET /orders,GET /orders/open, andGET /positions/activefor clients that prefer non‑Binance‑style routes. - Changed:
POST /fapi/v1/ordernow enforces lot size and the symbol's min/max notional before the matching engine is touched. Sub‑lot quantities are floored to the lot grid (no rejection); orders outside notional bounds return-1013. - Changed:
timeInForceacceptsGTX(post‑only). CrossingGTXorders are rejected with-2010instead of being silently filled as takers.IOC/FOK/GTCsemantics are now strictly honored at the engine layer (previously partially silent onIOC). - Changed: Trigger orders that would fire immediately (e.g.
STOPwithstopPricealready breached) are rejected with-2021instead of executing on the next tick. - Changed:
STOP_LIMITandTAKE_PROFIT_LIMITare accepted as aliases forSTOPandTAKE_PROFITrespectively. - Changed:
reduceOnlyorders are clamped to the opposite‑side position size at admission. If areduceOnly=trueorder would otherwise open or flip a position, it is rejected. - Changed: Trigger orders (
trigger_orders) are now honored by the cancel paths —DELETE /fapi/v1/order,DELETE /fapi/v1/allOpenOrders, andDELETE /fapi/v1/batchOrders. Cancelling a parent order also cascade‑cancels its TP/SL trigger orders. Frozen margin attributable tofapi‑created orders is correctly released on cancel‑all and batch‑cancel paths. - Changed: Trigger orders submitted via
POST /fapi/v1/ordernow honorstopPricecorrectly (previously diverted to the resting book in some edge cases). - Fix: Persistence of
newClientOrderId.avg_priceis now stored per order soquery-order/all-ordersreturn consistent average fill prices instead of recomputing per request. - Fix:
timeInForceis persisted;openOrderreturns terminal status correctly;userTradesfilter parameters (startTime,endTime,fromId) honored. Three pre‑existing P0 data‑integrity bugs in/fapi/v1and/api/v1/account/tradesplugged. - Fix: Sub‑lot fill drift — partially filled orders that drift below
one lot size are clamped and transitioned to
FILLEDinstead of remainingPARTIALLY_FILLEDindefinitely. - Fix: Position partial‑vs‑flip branching is decided in token units
(not USD), eliminating a class of phantom‑credit drift on flip‑close.
Unspent collateral is credited back on flip‑close. Manual close /
liquidation / ADL paths emit complete
realized_pnl_events.
REST API — Account & Funds
- New:
GET /account/fee-infois reachable without authentication. Anonymous callers receive the public VIP tier schedule (VIP 0 baseline); authenticated callers additionally see their tier, 14d/30d rolling volume, pending downgrade, and effective discount stack. - New: Trader PnL leaderboard, backed by Timescale continuous aggregates for sub‑second response on whole‑population queries.
- New:
WITHDRAWALS_PAUSEDoperational kill switch — when enabled during incident‑reconciliation windows,POST /withdraw/requestreturns503 SERVICE_UNAVAILABLEwith codeWITHDRAWALS_PAUSED. Cancel/confirm/history endpoints are unaffected. - Changed:
/account/tradesand/account/ordersnow support keyset pagination via an opaquecursorquery parameter and anext_cursorresponse field.cursormode returnstotal: -1(the count is not computed); legacyoffsetpaging is preserved for backward compatibility but is O(N) pastoffset > 5000. - Changed:
POST /account/margin-modeacceptsmodeas an alias formargin_mode(so the same body works for the Binance‑stylemarginTypeswitch). - Perf:
/account/tradesrewritten asUNION ALL— query time dropped from ~17.5 s to ~7 ms (≈2,500×) on hot accounts.
REST API — Margin / Leverage / Position Mode
- Changed:
POST /fapi/v1/leverageis now persisted per(user, symbol)and applied automatically when a subsequent order arrives without an explicit leverage value. - Changed:
POST /fapi/v1/positionSide/dualrejects hedge‑mode toggles (dualSidePosition=true) with-4059. One‑way mode is the only supported mode. The field is accepted asboolorstringfor client compatibility. - New:
GET /fapi/v2/positionRiskis registered as an alias of the v1 route. - Changed:
/unified/accountnow includes the initial margin reserved by resting (open) orders in the snapshot, so equity / available‑balance /uniMMRreflect the same world that the order admission path sees. - Changed: Reduce‑only orders on
/api/v1/ordersare subject to the same cap+reject rule as the fapi path.
REST API — Market Data
- Changed:
GET /fapi/v1/ticker/24hrno longer emits a correlated subquery; symbol filter is pushed down. Multi‑symbol responses are materially faster. - Changed:
GET /fapi/v1/incomerewritten asUNION ALLover commission / funding / realized‑PnL sources.
Authentication
- Changed: HMAC SHA‑256 signature verification accepts both
raw and URL‑encoded payloads. Clients that emit one form versus the
other (e.g.
requestsvs rawurllib3) no longer need to align before signing.
REST API — Input Tolerance
The following fields now accept Binance‑compatible bool or string input forms (previous strict typing rejected one form or the other):
| Endpoint | Field | Accepted |
|---|---|---|
POST /fapi/v1/order | reduceOnly | true / false / "true" / "false" |
POST /fapi/v1/order | dualSidePosition | same |
POST /fapi/v1/leverage | leverage | int / "int" (numeric string) |
WebSocket
- New: Private channel
balances— PostgresLISTEN/NOTIFY‑driven push of balance changes (decimal fields are emitted as strings to preserve precision). Eliminates the need for REST polling onGET /account/balances. See User Data Stream. - Changed:
orderbookchannel depth expanded from 20 to 30 levels. - Fix: Subscribe path no longer starves under high broadcast load — the WS handler was rewritten to use a writer task, biased select, bounded MPSC, and a snapshot semaphore. Initial subscribe snapshots now arrive promptly even when ~50 trade events/s are flowing.
2026-04-15
- New: 6-tier VIP fee schedule (VIP 0 – VIP 5) with 14-day rolling volume windows. See VIP Tier Fee Schedule. Upgrades take effect immediately; downgrades are buffered until the next UTC 00:00.
- New:
GET /account/fee-inforeturns full tier schedule, user's current/effective rates, 14d/30d rolling volumes, progress to the next tier, and the active referral / token-staking discount stack. - New: Private WebSocket channel
vip_tierpushesvip_tier_changedevents (upgrade_immediate/downgrade_scheduled/downgrade_applied). - Changed:
/fapi/v1/commissionRatenow returns effective rates (base ×discount_multiplier) instead of base rates. - Fix:
POST /orders/previewest_slippageis now a real orderbook scan instead of hard-coded zero;max_slippageis actually enforced and rejectsSLIPPAGE_EXCEEDEDbefore reaching the matching engine for market orders. - Fix:
next_funding_timeon/external/markets/:symbol/tickernow returns the next UTC top-of-hour instead of 0. - Fix: Symbol path params (
/funding-rates/:symbol,.../details,/markets/:symbol/...) accept both upper- and lower-case.
2026-03-26
- Initial release of base documentation / USDⓈ-M Futures