def remove_holdings(user_id): #selc3 print("Here is a list of your holdings:\n") display_holdings(str(user_id), "pymarket.db") holding_to_delete = input( "Please enter a holding id which you would like to delete: ") delete_holding(user_id, holding_to_delete, "pymarket.db") print('\n\n\n\n') show_menu(user_id)
def update_holdings(user_id): #selc 2 print("Here is a list of your holdings:\n") display_holdings(str(user_id), "pymarket.db") holding_to_change = input( "Please enter a holding id which you would like to change: ") hold_amt = input("Please enter the amount which you are holding: ") bought_at = input("Please enter the price in USD which you bought at: ") update_holding(user_id, holding_to_change, hold_amt, bought_at, "pymarket.db") print('\n\n\n\n') show_menu(user_id)
def create_holding(user_id): #selc4 abrv = str( input( "Please enter the abbreviation of the stock/coin you want to add: " )).upper() hold = float(input("Please enter the amount you bought: ")) bought_at = float(input("Please enter the price which you bought at: $")) cryp = int(input("Please enter 0 for crypto, 1 for stock: ")) make_holding(user_id, abrv, hold, bought_at, cryp, "pymarket.db") print() display_holdings(user_id, "pymarket.db") print('\n\n\n\n') show_menu(user_id)
def check_holdings(self, parent, controller): set_current_holdings(display_holdings(get_login_id(), "pymarket.db")) # Holdings.display_data() controller.show_frame(Holdings)
def check_holdings(user_id): #selc 1 print("Here is a list of your holdings:\n") display_holdings(str(user_id), "pymarket.db") get_net_worth(str(user_id), "pymarket.db") print('\n\n\n\n') show_menu(user_id)