Skip to content

Clarify MARKET immediate-or-cancel behavior and isFillOrKill support #6

Description

@jscrui

We are integrating the official TypeScript SDK 1.3.8 with the mainnet REST API, using an EOA on BNB Smart Chain (chain ID 56). Before enabling automated orders, we need to establish the supported execution semantics. No production order has been submitted for this investigation.

The published create-order schema exposes MARKET, LIMIT and an optional isFillOrKill boolean, but we could not find an explicit IOC/time-in-force contract. The SDK assigns MARKET orders a five-minute signed expiry and ignores a supplied expiresAt. The API also exposes removalLockedUntil and an error named create_order_fill_or_kill_not_supported. The separate OAuth create-order documentation describes FOK for MARKET orders but marks that API as unavailable to the general public; its generated example also combines LIMIT with FOK, contradicting that field description. We are not assuming the same entitlement or semantics for /v1/orders.

Could you clarify:

  1. Does strategy: MARKET with isFillOrKill: false perform one immediate matching pass and permanently discard any unmatched remainder, or can the remainder rest or be matched later? What is the exact supported request for IOC, if one exists? Can the client set a server-enforced acceptance/matching deadline separately from the five-minute signed expiry, so a delayed request cannot enter late?
  2. After a partial match, which response, order query or wallet event proves that the residual amount will not receive new matches? What happens to matched and unmatched quantities if on-chain settlement fails or is retried?
  3. How does removalLockedUntil interact with MARKET orders and residual cancellation? Does a purported IOC residual require a separate on-chain cancellation? We understand that REST removal alone does not invalidate the signed order on-chain.
  4. Is isFillOrKill: true supported for MARKET or marketable LIMIT orders for EOAs on standard mainnet markets, including BTC/5m? Which combinations trigger create_order_fill_or_kill_not_supported, and does successful FOK admission guarantee no partial execution across subsequent settlement attempts?
  5. Is there a supported testnet or dry-run endpoint where full, partial and zero-liquidity cases can be reproduced without mainnet funds? Please provide a documented request/response example or a versioned contract reference.

We distinguish immediate matching from later blockchain confirmation. The required behavior is that no new match can be made against the unfilled remainder after the immediate matching pass; we can keep funds reserved until settlement and terminal account evidence are reconciled.

References:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions