from typing import OrderedDict


def prepare_api_params(params):
    """Construct ordered dict of params for API call.

    This method returns an alphabetized OrderedDict in order
    to maximize cache hits on the API.

    """
    new_params = []
    for key, val in list(params.items()):
        new_params.append((key, val))
    new_params.sort()
    ordered = OrderedDict(new_params)
    return ordered