models
public long portfolioId
public java.lang.String typeOf
public java.lang.String ticker
public long qty
public double price
public ObjectNode getJson()
public ObjectNode getJson(double price)
public static java.util.List<Position> getAllPortfolioPositions(long portfolioId)
public static java.util.List<Position> getAllOwnPositions(long portfolioId)
portfolioId - is the unique database id of the portfoliopublic static java.util.List<Position> getAllOwnPositionsForTicker(long portfolioId, java.lang.String ticker)
portfolioId - is the unique database id of the portfolioticker - is the ticker symbol of the stock positions to retrieve.public static Position addOwnPosition(long portfolioId, long qty, Stock stock)
portfolioId - is the unique database id of the portfolioqty - is the number of shares to ownstock - is the stock information to conduct the tradepublic static Position addCashPosition(long portfolioId, double price)
portfolioId - is the unique database id of the portfolioprice - is the amount of cash to add to the portfoliopublic static Position getCashPosition(long portfolioId)
portfolioId - is the unique database id of the portfolio