def find_bid(bids, t_depth: float):
    """find best bid in the orderbook needed to fill an order of amount t_depth"""
    price = 0.0
    depth = 0.0
    for b in bids:
        price = float(b['price'])
        depth += float(b['amount'])
        if depth >= t_depth:
            break
    
    return round(price - 0.000001, 7)