from functools import reduce


def get_earliest_trade(trades):
    """
    Gets the earliest trade from a list of trades.
    """

    return reduce(lambda trade_a, trade_b: trade_a if trade_a.timestamp < trade_b.timestamp else trade_b, trades)