Mayson Monorepo Documentation
    Preparing search index...

    Interface IDcaPlan

    DCA Plan for recurring purchases

    interface IDcaPlan {
        _id?: string;
        userId: string;
        symbol: string;
        amount: number;
        amountType: "usd" | "units";
        frequency: DcaFrequency;
        dayOfWeek?: number;
        dayOfMonth?: number;
        hour?: number;
        status: DcaPlanStatus;
        exchange: ExchangeName;
        nextExecutionAt: Date;
        totalInvested: number;
        totalBought: number;
        executionCount: number;
        lastExecutionAt?: Date;
        lastError?: string;
        createdAt: Date;
        updatedAt: Date;
    }
    Index

    Properties

    _id?: string
    userId: string

    User ID

    symbol: string

    Asset symbol (e.g., "BTC", "ETH")

    amount: number

    Investment amount per execution

    amountType: "usd" | "units"

    Is amount in USD or token units

    frequency: DcaFrequency

    Execution frequency

    dayOfWeek?: number

    Day of week (0-6) for weekly plans

    dayOfMonth?: number

    Day of month (1-28) for monthly plans

    hour?: number

    Hour of day to execute (0-23, UTC)

    Plan status

    exchange: ExchangeName

    Exchange to use

    nextExecutionAt: Date

    Next scheduled execution

    totalInvested: number

    Running total USD invested

    totalBought: number

    Running total units bought

    executionCount: number

    Number of successful executions

    lastExecutionAt?: Date

    Last successful execution

    lastError?: string

    Last error message if any

    createdAt: Date

    Created timestamp

    updatedAt: Date

    Updated timestamp