Documentation
    Preparing search index...

    Interface RedeemReceipt

    interface RedeemReceipt {
        accountId: string;
        builderCodeId: string | null;
        fees: {
            builder: number;
            inventoryImpactRebate: number;
            penalty: number;
            trading: number;
        };
        gross: number;
        marketId: string;
        orderId: bigint;
        owner: string;
        positionRootId: bigint;
        proceeds: number;
        quantityClosed: number;
        raw: {
            builderFee: bigint;
            gross: bigint;
            inventoryImpactRebate: bigint;
            penaltyFee: bigint;
            proceeds: bigint;
            quantityClosed: bigint;
            remaining: bigint;
            tradingFee: bigint;
        };
        remaining: number;
        replacementOrderId: bigint
        | null;
    }
    Index
    accountId: string
    builderCodeId: string | null
    fees: {
        builder: number;
        inventoryImpactRebate: number;
        penalty: number;
        trading: number;
    }

    Fee breakdown. inventoryImpactRebate is the path-independent inventory-impact rebate credited back on the close.

    gross: number

    Gross close value before fees (the event's redeem_amount).

    marketId: string
    orderId: bigint
    owner: string
    positionRootId: bigint
    proceeds: number

    NET quote credited to the account: gross + inventoryImpactRebate − trading − builder − penalty — the same expression the chain asserts min_proceeds against, and what settle_live_redeem_payment actually deposits.

    quantityClosed: number
    raw: {
        builderFee: bigint;
        gross: bigint;
        inventoryImpactRebate: bigint;
        penaltyFee: bigint;
        proceeds: bigint;
        quantityClosed: bigint;
        remaining: bigint;
        tradingFee: bigint;
    }
    remaining: number
    replacementOrderId: bigint | null

    A partial close RETIRES the old order id and issues this replacement for the remaining quantity — update your stored id or it goes silently stale.