Documentation
    Preparing search index...

    One record's state rebuilt from events, for the app's event path (indexer or own effects).

    interface OrderEventState {
        deadlineMs: bigint | null;
        kind: number | null;
        marketId: string;
        parkedRaw: bigint;
        payoutRaw: bigint | null;
        payoutSkipped: boolean;
        position: queue.HeldPosition | null;
        price: number | null;
        reason: RefundReasonInfo | null;
        recordId: bigint;
        sourceRecordId: bigint | null;
        state: "filled" | "refunded" | "closed" | "placed" | "priced" | "settled";
        tauMs: bigint | null;
        tickMs: bigint | null;
    }
    Index
    deadlineMs: bigint | null
    kind: number | null
    marketId: string
    parkedRaw: bigint

    USDC the record holds parked (RecordFundsParked, summed) until RecordFundsClaimed. See ParkedFunds.

    payoutRaw: bigint | null

    Set when settle_step or pay_open paid the record (0 for a loser).

    payoutSkipped: boolean

    True after OpenRecordPayoutSkipped: the record stays Open, unpaid for now.

    position: queue.HeldPosition | null

    The position the record holds now, or null. A sell's record takes its source's position at enqueue and keeps it through a refund, a fill leaves a mint's new position or a partial sell's remainder, and a later sell, a full close or settlement clears it.

    price: number | null

    Set once priced: the committed Pyth price as a float (spot / 1e9) and its tick.

    reason: RefundReasonInfo | null

    Set on a refund. The settlement drain (settle_step) refunds the orders still waiting at expiry with reason 5 (deadline), like a keeper's deadline refund.

    recordId: bigint
    sourceRecordId: bigint | null

    For a sell: the record its position came from.

    state: "filled" | "refunded" | "closed" | "placed" | "priced" | "settled"

    closed: the record's position moved into a later sell's record (enqueue_redeem_open closes the source record), so this record holds nothing any more.

    tauMs: bigint | null
    tickMs: bigint | null