Creates a PortfolioBalancer object using the supplied parameters. See class methods.

Hierarchy (view full)

Constructors

Properties

Logger: any
last_balance_data: any
log_mode: string
state: any

Methods

  • Performs a portfolio re-balance using the supplied parameters

    Returns Promise<{
        balance_needed: boolean;
        balanced: boolean;
        info: any;
    }>

  • Retrieve data about a potential rebalancing

    Returns Promise<{
        base_amt: number;
        base_delta: number;
        base_market_amt: number;
        base_price: number;
        current_ratio: number;
        portfolio_value: number;
        quote_amt: number;
        ratio_error: number;
        target_achieved: boolean;
        target_base_amt: number;
        target_precision: number;
        target_ratio: number;
        trade_type: common.trading.portfolio_balancer_lib.MarketTradeType;
    }>