<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def buy_limit(self, market, quantity, rate):
 """ Used to place a buy order in a specific market. Use buylimit to place limit orders Make sure you have the proper permissions set on your API keys for this call to work Endpoint: 1.1 /market/buylimit 2.0 NO Direct equivalent. Use trade_buy for LIMIT and MARKET buys :param market: String literal for the market (ex: BTC-LTC) :type market: str :param quantity: The amount to purchase :type quantity: float :param rate: The rate at which to place the order. This is not needed for market orders :type rate: float :return: :rtype : dict """

        return self._api_query(path_dict={
            API_V1_1: '/market/buylimit',
        }, options={'market': market,
                    'quantity': quantity,
                    'rate': rate}, protection=PROTECTION_PRV)