Class PortfolioBalancerAbstract
Constructors
Properties
last_balance_data
last_balance_data: any
Methods
balance_portfolio
- balance_portfolio(): Promise<{
balance_needed: boolean;
balanced: boolean;
info: any;
}> Returns Promise<{
balance_needed: boolean;
balanced: boolean;
info: any;
}>
get_balance_data
- get_balance_data(): 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;
}> 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;
}>
Abstract
get_base_balance
- get_base_balance(ba): Promise<number>
Returns Promise<number>
Abstract
get_base_price
- get_base_price(ba, qa): Promise<number>
Returns Promise<number>
Abstract
get_quote_balance
- get_quote_balance(qa): Promise<number>
Returns Promise<number>
set_log_mode
- set_log_mode(s): void
Returns void
Abstract
symbol_generator
- symbol_generator(ba, qa): string
Returns string
Creates a PortfolioBalancer object using the supplied parameters. See class methods.