Documentation
    Preparing search index...

    read.planMint: everything a purchase form shows, and the enqueue options that carry its slippage. Display only: the fill prices at τ, within the limits in order.

    interface MintPlan {
        accepting: boolean;
        balance: {
            available: number | null;
            covers: boolean | null;
            hasAccount: boolean;
        };
        budget: number;
        expectedDebit: number;
        maxNow: number
        | null;
        minPayout: number;
        minPayoutMultiple: number;
        order:
            | { builder: "enqueueMintCost"; options: EnqueueMintCostOptions }
            | { builder: "enqueueMint"; options: EnqueueMintOptions };
        orderFee: number;
        payoutMultiple: number;
        potentialPayout: number;
        pricePerContract: number;
        quote: MintQuote;
        quoteForAccount: boolean;
        raw: {
            budget: bigint;
            maxCost: bigint | null;
            maxProbability: bigint | null;
            minQuantity: bigint;
            orderFee: bigint;
            pricePerContract: bigint;
            slippage: bigint;
            totalDebit: bigint;
            worstPricePerContract: bigint;
        };
        refusal: PredictPreflightCode
        | null;
        shape: "budget" | "exact-quantity";
        slippage: AppliedSlippage;
        target: PlanTarget;
        timing: TimingPreview;
        totalDebit: number;
        worstPricePerContract: number;
    }
    Index
    accepting: boolean

    Whether tx.enqueuePlan would build the order now and admission would take it at the current price: the builder's preflight (the queue gates, the order fee, the minimum premium and the market's cash), the balance against totalDebit, the payout bound and, for a budget, the floor admission buys without the fee subsidy. Two admission conditions are checked only on chain, at placement: the market's SVI age under the order desk's svi_max_age_ms, and room in the payout tree for a new strike's boundary nodes.

    balance: {
        available: number | null;
        covers: boolean | null;
        hasAccount: boolean;
    }

    Type Declaration

    • available: number | null

      The account's USDC, or null without an account.

    • covers: boolean | null

      Whether the balance covers totalDebit, or null without an account.

    • hasAccount: boolean

      Whether the owner has a Predict account yet.

    budget: number

    USDC escrowed for the premium and fees. Unused budget comes back at the fill.

    expectedDebit: number

    quote.cost + orderFee: what the order costs if it fills at the current price.

    maxNow: number | null

    The largest amount (budget plans) or quantity (exact plans) the market's spare cash and, with an account, the balance allow now. An exact plan's balance bound prices each contract at the plan's worstPricePerContract. Null when neither binds.

    minPayout: number

    The smallest payout the order accepts, at the worst price. A smaller fill is refunded.

    minPayoutMultiple: number

    minPayout / totalDebit: the multiple at the worst price.

    order:
        | { builder: "enqueueMintCost"; options: EnqueueMintCostOptions }
        | { builder: "enqueueMint"; options: EnqueueMintOptions }

    Pass order.options to tx[order.builder].

    orderFee: number

    The flat order fee, read from the order desk, charged once per order.

    payoutMultiple: number

    potentialPayout / expectedDebit ("Payout multiple"), order fee included.

    potentialPayout: number

    The payout if it wins, at the current price ("Potential payout").

    pricePerContract: number

    All-in price per contract now in USDC (0.42 is 42¢), after the fee subsidy, order fee excluded.

    quote: MintQuote

    The quote at the current price.

    quoteForAccount: boolean

    Whether the quote is the account's own (quote_mint_*_for_account, with its builder fee). A visitor without an account, or a balance below the order, gets quote_mint's quote instead, with a budget's quantity found by a short search.

    raw: {
        budget: bigint;
        maxCost: bigint | null;
        maxProbability: bigint | null;
        minQuantity: bigint;
        orderFee: bigint;
        pricePerContract: bigint;
        slippage: bigint;
        totalDebit: bigint;
        worstPricePerContract: bigint;
    }
    refusal: PredictPreflightCode | null

    The PredictPreflightError code the order would get now, or null. 'fee' also covers a missing account or a balance below totalDebit.

    shape: "budget" | "exact-quantity"
    slippage: AppliedSlippage
    target: PlanTarget

    The owner, market and strike range the plan was quoted for.

    τ, deadline and cutoff for an order placed now, from the local clock.

    totalDebit: number

    budget + orderFee: what enqueue debits.

    worstPricePerContract: number

    The worst price the limits admit: the price per contract without the fee subsidy, plus the slippage. Enqueue admission checks the order without the subsidy, and the subsidy can run out before the fill, so the limits never count on it.