Documentation
    Preparing search index...

    Type Alias PredictPreflightCode

    PredictPreflightCode:
        | "not-live"
        | "no-queue"
        | "retired"
        | "paused"
        | "stuck"
        | "past-cutoff"
        | "queue-full"
        | "account-cap"
        | "fee"
        | "market-cash"
        | "min-premium"
        | "entry-band"
        | "cost-above-payout"
        | "below-min-sell"
        | "record-not-open"
        | "not-record-owner"

    Why a queued-order builder refused to add an enqueue. The builder reads the market first and throws this instead of building a transaction the queue or protocol gates would abort, so a refused order never fails the rest of a transaction. Each code mirrors one on-chain refusal. The order's own limits at the current price are checked only on chain (EOrderFailsLimits).

    Type Declaration

    • "not-live"

      Delayed execution isn't live: Predict's version watermark isn't raised (ECutoverNotReached), or Predict doesn't allowlist the order-flow package yet (EOrderFlowNotAllowed).

    • "no-queue"

      The market has no MarketQueue yet: queue::create_and_share hasn't run for it.

    • "retired"

      A version floor retired code this SDK calls: Predict's watermark is above the Predict version it was built for (protocol_config::EPackageVersionDisabled), or the order desk's floor is above its order-flow package (desk::EPackageVersionDisabled). Update the SDK.

    • "paused"

      Trading is paused, the protocol is frozen, or minting is paused on this market.

    • "stuck"

      The market's pricing is delayed (queue_stuck). Enqueue aborts EQueueStuck.

    • "past-cutoff"

      The order's τ would land at or after the market's order cutoff (EPastCutoff). A read.planMint or read.planSell plan on a market past its expiry throws it too, since the chain has no live price to quote (ELivePricingExpired).

    • "queue-full"

      The market has its maximum unfinished mints or sells (EQueueFull).

    • "account-cap"

      The account has its maximum unfinished orders in this market (EAccountOrderCap).

    • "fee"

      The account balance doesn't cover the order fee (EFeeNotCovered). A read.planMint plan also reports it when the balance doesn't cover the plan's totalDebit, since its limits assume the whole budget, or when the owner has no account yet. Prompt a top-up.

    • "market-cash"

      A mint's cash need is above the market's spare cash (EInsufficientMarketCash).

    • "min-premium"

      The escrowed budget, or an exact-amount mint's premium cap, can't buy the minimum premium, so the order fails its limits. A budget read.planMint plan also reports it when what the budget buys without the fee subsidy, as admission prices it, has a premium below the minimum, and throws it for a budget below the minimum premium or one no fill clears it with.

    • "entry-band"

      The strike's entry probability is outside the market's entry band, so the chain refuses to quote or admit it (EOrderFailsLimits). Pick a strike nearer the money. Only read.planMint reports it, and the probability can still leave the band between plan and placement.

    • "cost-above-payout"

      The order's all-in cost without the fee subsidy is above its payout, so admission refuses it at any slippage (EOrderFailsLimits), or for a budget, the fill costs about its payout, where admission's sizing can't be previewed. Only read.planMint reports it, near a certain outcome.

    • "below-min-sell"

      A sell is below the policy minimum, or leaves a remainder below it (EBelowMinSell).

    • "record-not-open"

      The record to sell is missing or not Open (ERecordNotOpen).

    • "not-record-owner"

      The record to sell belongs to another account (ENotRecordOwner).