Beispiel #1
0
    def generate_trade_history(session, page_size=None, offset=None, sort_column=None, sort_order="ASC"):
        trades = Trade.get_last_trades(session, page_size, offset, sort_column, sort_order)
        trade_list = []
        for trade in trades:
            trade_list.append(
                [
                    trade.id,
                    trade.symbol,
                    trade.side,
                    trade.price,
                    trade.size,
                    trade.buyer_id,
                    trade.seller_id,
                    trade.buyer_username,
                    trade.seller_username,
                    trade.created,
                    trade.order_id,
                    trade.counter_order_id,
                ]
            )
        return trade_list

        # trades = Trade.get_last_trades( session, since ).all()
        # return trades
        pass
Beispiel #2
0
def generate_trade_history(page_size=None,
                           offset=None,
                           sort_column=None,
                           sort_order='ASC'):
    trades = Trade.get_last_trades(page_size, offset, sort_column, sort_order)
    trade_list = []
    for trade in trades:
        trade_list.append([
            trade.id, trade.symbol, trade.side, trade.price, trade.size,
            trade.buyer_username, trade.seller_username, trade.created
        ])
    return trade_list
def generate_trade_history(page_size = None, offset = None, sort_column = None, sort_order='ASC'):
    trades = Trade.get_last_trades(page_size, offset, sort_column, sort_order)
    trade_list = []
    for trade in  trades:
        trade_list.append([ 
          trade.id,
          trade.symbol,
          trade.side,
          trade.price,
          trade.size,
          trade.buyer_username,
          trade.seller_username,
          trade.created
        ])
    return trade_list
Beispiel #4
0
def generate_trade_history(session, page_size = None, offset = None, sort_column = None, sort_order='ASC', show_username=False):
    trades = Trade.get_last_trades(session, page_size, offset, sort_column, sort_order)
    trade_list = []
    for trade in  trades:
        rec = [
          trade.id,
          trade.symbol,
          trade.side,
          trade.price,
          trade.size,
          trade.buyer_id,
          trade.seller_id,
          trade.created
        ]
        if show_username:
          rec.append(trade.buyer_username)
          rec.append(trade.seller_username)
        trade_list.append(rec)
    return trade_list
Beispiel #5
0
    def generate_trade_history(session,
                               page_size=None,
                               offset=None,
                               sort_column=None,
                               sort_order='ASC'):
        trades = Trade.get_last_trades(session, page_size, offset, sort_column,
                                       sort_order)
        trade_list = []
        for trade in trades:
            trade_list.append([
                trade.id, trade.symbol, trade.side, trade.price, trade.size,
                trade.buyer_username, trade.seller_username, trade.created,
                trade.order_id, trade.counter_order_id
            ])
        return trade_list

        #trades = Trade.get_last_trades( session, since ).all()
        #return trades
        pass
Beispiel #6
0
def generate_trade_history(session,
                           page_size=None,
                           offset=None,
                           sort_column=None,
                           sort_order='ASC',
                           show_username=False,
                           since=None):
    trades = Trade.get_last_trades(session, since, page_size, offset,
                                   sort_column, sort_order)
    trade_list = []
    for trade in trades:
        rec = [
            trade.id, trade.symbol, trade.side, trade.price, trade.size,
            trade.buyer_id, trade.seller_id, trade.created
        ]
        if show_username:
            rec.append(trade.buyer_username)
            rec.append(trade.seller_username)
        trade_list.append(rec)
    return trade_list
Beispiel #7
0
 def get_last_trades(self):
     """" get_last_trades. """
     return Trade.get_last_trades(self.db_session)
Beispiel #8
0
 def get_last_trades(self):
     """" get_last_trades. """
     return Trade.get_last_trades()
Beispiel #9
0
 def get_last_trades(self):
     """" get_last_trades. """
     return Trade.get_last_trades(self.db_session)
 def get_last_trades(self):
     """" get_last_trades. """
     return Trade.get_last_trades()