def get_trades_for(self, ticker): """ return all Trades where account_pk == self.pk. returns a list of Trade objects """ return Trade.all_from_where_clause("WHERE account_pk=? AND ticker=?", (self.pk, ticker))
def get_trades_for(self, ticker): #takes in ticker symbol, return all trades for that symbol return Trade.all_from_where_clause('WHERE account_pk=? AND ticker=?' ( self.pk, ticker))
def get_trades(self): """ return all Trades where account_pk == self.pk. returns a list of Trade objects """ return Trade.all_from_where_clause("WHERE account_pk=?", (self.pk, ))
def get_trades(self): #return all trades by that user return Trade.all_from_where_clause("WHERE account_pk=?", (self.pk, ))