def order_cancel_success(message, futures):
    """Intercepts order cancel messages (oc) and check for
    Future objets with a matching cid.

    Parameters
    ----------
    message : str
        The unaltered response message returned by bitfinex.
    futures : dict
        A dict of intercept_id's and future objects.
        dict{intercept_id, future_object}

    """
    order_id = message[2][0]
    order_cid = message[2][2]
    future_id = f'oc_{order_id}'
    future_id_cid = f'oc_{order_cid}'
    if future_id in futures.keys():
        future = futures[future_id]
    elif future_id_cid in futures.keys():
        future = futures[future_id_cid]
    if message[2][13] == 'IOC CANCELED':
        future.set_result({'status': 'IOC CANCELED', 'id': message[2][0],
            'cid': message[2][2], 'response': message[2], 'comment': None})
    else:
        future.set_result({'status': 'SUCCESS', 'id': message[2][0], 'cid':
            message[2][2], 'response': message[2], 'comment': None})
    if future_id in futures:
        del futures[future_id]
    elif future_id_cid in futures:
        del futures[future_id_cid]
