Documentation
    Preparing search index...
    OrderView: OrderViewBase & (
        | {
            autoRefundByMs: bigint;
            awaitingPrice: boolean;
            canRequestRefund: boolean;
            deadlineMs: bigint;
            state: "placed";
            tauMs: bigint;
        }
        | {
            autoRefundByMs: bigint;
            canRequestRefund: boolean;
            deadlineMs: bigint;
            msToDeadline: bigint;
            priceRaw: bigint;
            state: "priced";
            tauMs: bigint;
            tickMs: bigint;
        }
        | {
            canRequestRefund: boolean;
            deadlineMs: bigint;
            reason: RefundReasonInfo;
            state: "refunding";
        }
        | {
            amountRaw: bigint;
            finishedAtMs: bigint;
            parkedRaw: bigint;
            position: queue.HeldPosition
            | null;
            quantityRaw: bigint;
            sellable: boolean;
            state: "filled";
        }
        | {
            finishedAtMs: bigint;
            parkedRaw: bigint;
            position: queue.HeldPosition
            | null;
            positionBackAsOpenRecord: boolean;
            reason: RefundReasonInfo;
            sellable: boolean;
            state: "refunded";
        }
        | {
            amountRaw: bigint;
            finishedAtMs: bigint;
            parkedRaw: bigint;
            quantityRaw: bigint;
            state: "closed";
        }
        | { state: "unknown" }
    )

    What the app shows for one queued order. placed → priced → one of filled / refunded. Report filled only from the record or the fill event, never from a resolve simulation.

    Type Declaration

    • {
          autoRefundByMs: bigint;
          awaitingPrice: boolean;
          canRequestRefund: boolean;
          deadlineMs: bigint;
          state: "placed";
          tauMs: bigint;
      }
      • autoRefundByMs: bigint

        Keepers refund an unfinished order at its deadline.

      • awaitingPrice: boolean

        τ has passed and the price hasn't been committed yet.

      • canRequestRefund: boolean

        Offer "Refund my order": unfinished and REFUND_REQUEST_GRACE_MS past the deadline.

      • deadlineMs: bigint
      • state: "placed"
      • tauMs: bigint
    • {
          autoRefundByMs: bigint;
          canRequestRefund: boolean;
          deadlineMs: bigint;
          msToDeadline: bigint;
          priceRaw: bigint;
          state: "priced";
          tauMs: bigint;
          tickMs: bigint;
      }
      • autoRefundByMs: bigint
      • canRequestRefund: boolean
      • deadlineMs: bigint
      • msToDeadline: bigint
      • priceRaw: bigint

        The committed Pyth price, 1e9-scaled.

      • state: "priced"
      • tauMs: bigint
      • tickMs: bigint

        The committed update's tick: τ, or a backup tick.

    • {
          canRequestRefund: boolean;
          deadlineMs: bigint;
          reason: RefundReasonInfo;
          state: "refunding";
      }
    • {
          amountRaw: bigint;
          finishedAtMs: bigint;
          parkedRaw: bigint;
          position: queue.HeldPosition | null;
          quantityRaw: bigint;
          sellable: boolean;
          state: "filled";
      }
      • amountRaw: bigint

        Cost paid (mint) or proceeds before the order fee (sell).

      • finishedAtMs: bigint
      • parkedRaw: bigint
      • position: queue.HeldPosition | null

        The Open record's position: a filled mint, or a partial sell's remainder.

      • quantityRaw: bigint

        Filled quantity (mint) or closed quantity (sell). A partial sell's remainder is position.quantityRaw.

      • sellable: boolean

        Whether enqueue_redeem_open can sell this record now.

      • state: "filled"
    • {
          finishedAtMs: bigint;
          parkedRaw: bigint;
          position: queue.HeldPosition | null;
          positionBackAsOpenRecord: boolean;
          reason: RefundReasonInfo;
          sellable: boolean;
          state: "refunded";
      }
      • finishedAtMs: bigint
      • parkedRaw: bigint
      • position: queue.HeldPosition | null
      • positionBackAsOpenRecord: boolean

        A refunded sell keeps its position as an Open record, sellable again.

      • reason: RefundReasonInfo
      • sellable: boolean
      • state: "refunded"
    • {
          amountRaw: bigint;
          finishedAtMs: bigint;
          parkedRaw: bigint;
          quantityRaw: bigint;
          state: "closed";
      }
      • amountRaw: bigint
      • finishedAtMs: bigint
      • parkedRaw: bigint
      • quantityRaw: bigint
      • state: "closed"

        A filled mint's record whose position was later sold or settled.

    • { state: "unknown" }