You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: okcoin_ratelimit.go
    path of file: ./repos/gocryptotrader/exchanges/okcoin
    
    the code of the file until where you have to start completion: package okcoin

import (
	"context"
	"errors"
	"time"

	"github.com/thrasher-corp/gocryptotrader/exchanges/request"
	"golang.org/x/time/rate"
)

// Interval instances
const (
	oneSecondInterval   = time.Second
	twoSecondsInterval  = time.Second * 2
	fiveSecondsInterval = time.Second * 5
)

// RateLimit implementa a rate Limiter
type RateLimit struct {
	PlaceTradeOrder                                *rate.Limiter
	PlaceTradeMultipleOrders                       *rate.Limiter
	CancelTradeOrder                               *rate.Limiter
	CancelMultipleOrder                            *rate.Limiter
	AmendTradeOrder                                *rate.Limiter
	AmendMultipleOrders                            *rate.Limiter
	GetOrderDetails                                *rate.Limiter
	GetOrderList                                   *rate.Limiter
	GetOrderHistory                                *rate.Limiter
	GetOrderhistory3Months                         *rate.Limiter
	GetTransactionDetails3Days                     *rate.Limiter
	GetTransactionDetails3Months                   *rate.Limiter
	PlaceAlgoOrder                                 *rate.Limiter
	CancelAlgoOrder                                *rate.Limiter
	CancelAdvancedAlgoOrder                        *rate.Limiter
	GetAlgoOrderList                               *rate.Limiter
	GetAlgoOrderHistory                            *rate.Limiter
	GetFundingCurrencies                           *rate.Limiter
	GetFundingAccountBalance                       *rate.Limiter
	GetAccountAssetValuation                       *rate.Limiter
	FundingTransfer                                *rate.Limiter
	GetFundsTransferState                          *rate.Limiter
	AssetBillsDetail                               *rate.Limiter
	LightningDeposits                              *rate.Limiter
	GetAssetDepositAddress                         *rate.Limiter
	GetDepositHistory                              *rate.Limiter
	PostWithdrawal                                 *rate.Limiter
	PostLightningWithdrawal                        *rate.Limiter
	CancelWithdrawal                               *rate.Limiter
	GetAssetWithdrawalHistory                      *rate.Limiter
	GetAccountBalance                              *rate.Limiter
	GetBillsDetailLast3Month                       *rate.Limiter
	GetBillsDetail                                 *rate.Limiter
	GetAccountConfiguration                        *rate.Limiter
	GetMaxBuySellAmountOpenAmount                  *rate.Limiter
	GetMaxAvailableTradableAmount                  *rate.Limiter
	GetFeeRates                                    *rate.Limiter
	GetMaxWithdrawals                              *rate.Limiter
	GetAvailablePairs                              *rate.Limiter
	RequestQuotes                                  *rate.Limiter
	PlaceRFQOrder                                  *rate.Limiter
	GetRFQTradeOrderDetails                        *rate.Limiter
	GetRFQTradeOrderHistory                        *rate.Limiter
	FiatDepositRate                                *rate.Limiter
	FiatCancelDepositRate                          *rate.Limiter
	FiatDepositHistoryRate                         *rate.Limiter
	FiatWithdrawalRate                             *rate.Limiter
	FiatCancelWithdrawalRate                       *rate.Limiter
	FiatGetWithdrawalsRate                         *rate.Limiter
	FiatGetChannelInfoRate                         *rate.Limiter
	SubAccountsList                                *rate.Limiter
	GetAPIKeyOfASubAccount                         *rate.Limiter
	GetSubAccountTradingBalance                    *rate.Limiter
	GetSubAccountFundingBalance                    *rate.Limiter
	SubAccountTransferHistory                      *rate.Limiter
	MasterAccountsManageTransfersBetweenSubaccount *rate.Limiter
	GetTickers                                     *rate.Limiter
	GetTicker                                      *rate.Limiter
	GetOrderbook                                   *rate.Limiter
	GetCandlesticks                                *rate.Limiter
	GetCandlestickHistory  
    
func (r *RateLimit) Limit(ctx context.Context, ep request.EndpointLimit) error {
	switch ep {
	case placeTradeOrderEPL:
		return r.PlaceTradeOrder.Wait(ctx)
	case placeTradeMultipleOrdersEPL:
		return r.PlaceTradeMultipleOrders.Wait(ctx)
	case cancelTradeOrderEPL:
		return r.CancelTradeOrder.Wait(ctx)
	case cancelMultipleOrderEPL:
		return r.CancelMultipleOrder.Wait(ctx)
	case amendTradeOrderEPL:
		return r.AmendTradeOrder.Wait(ctx)
	case amendMultipleOrdersEPL:
		return r.AmendMultipleOrders.Wait(ctx)
	case getOrderDetailsEPL:
		return r.GetOrderDetails.Wait(ctx)
	case getOrderListEPL:
		return r.GetOrderList.Wait(ctx)
	case getOrderHistoryEPL:
		return r.GetOrderHistory.Wait(ctx)
	case getOrderhistory3MonthsEPL:
		return r.GetOrderhistory3Months.Wait(ctx)
	case getTransactionDetails3DaysEPL:
		return r.GetTransactionDetails3Days.Wait(ctx)
	case getTransactionDetails3MonthsEPL:
		return r.GetTransactionDetails3Months.Wait(ctx)
	case placeAlgoOrderEPL:
		return r.PlaceAlgoOrder.Wait(ctx)
	case cancelAlgoOrderEPL:
		return r.CancelAlgoOrder.Wait(ctx)
	case cancelAdvancedAlgoOrderEPL:
		return r.CancelAdvancedAlgoOrder.Wait(ctx)
	case getAlgoOrderListEPL:
		return r.GetAlgoOrderList.Wait(ctx)
	case getAlgoOrderHistoryEPL:
		return r.GetAlgoOrderHistory.Wait(ctx)
	case getFundingCurrenciesEPL:
		return r.GetFundingCurrencies.Wait(ctx)
	case getFundingAccountBalanceEPL:
		return r.GetFundingAccountBalance.Wait(ctx)
	case getAccountAssetValuationEPL:
		return r.GetAccountAssetValuation.Wait(ctx)
	case fundingTransferEPL:
		return r.FundingTransfer.Wait(ctx)
	case getFundsTransferStateEPL:
		return r.GetFundsTransferState.Wait(ctx)
	case assetBillsDetailEPL:
		return r.AssetBillsDetail.Wait(ctx)
	case lightningDepositsEPL:
		return r.LightningDeposits.Wait(ctx)
	case getAssetDepositAddressEPL:
		return r.GetAssetDepositAddress.Wait(ctx)
	case getDepositHistoryEPL:
		return r.GetDepositHistory.Wait(ctx)
	case postWithdrawalEPL:
		return r.PostWithdrawal.Wait(ctx)
	case postLightningWithdrawalEPL:
		return r.PostLightningWithdrawal.Wait(ctx)
	case cancelWithdrawalEPL:
		return r.CancelWithdrawal.Wait(ctx)
	case getAssetWithdrawalHistoryEPL:
		return r.GetAssetWithdrawalHistory.Wait(ctx)
	case getAccountBalanceEPL:
		return r.GetAccountBalance.Wait(ctx)
	case getBillsDetailLast3MonthEPL:
		return r.GetBillsDetailLast3Month.Wait(ctx)
	case getBillsDetailEPL:
		return r.GetBillsDetail.Wait(ctx)
	case getAccountConfigurationEPL:
		return r.GetAccountConfiguration.Wait(ctx)
	case getMaxBuySellAmountOpenAmountEPL:
		return r.GetMaxBuySellAmountOpenAmount.Wait(ctx)
	case getMaxAvailableTradableAmountEPL:
		return r.GetMaxAvailableTradableAmount.Wait(ctx)
	case getFeeRatesEPL:
		return r.GetFeeRates.Wait(ctx)
	case getMaxWithdrawalsEPL:
		return r.GetMaxWithdrawals.Wait(ctx)
	case getAvailablePairsEPL:
		return r.GetAvailablePairs.Wait(ctx)
	case requestQuotesEPL:
		return r.RequestQuotes.Wait(ctx)
	case placeRFQOrderEPL:
		return r.PlaceRFQOrder.Wait(ctx)
	case getRFQTradeOrderDetailsEPL:
		return r.GetRFQTradeOrderDetails.Wait(ctx)
	case getRFQTradeOrderHistoryEPL:
		return r.GetRFQTradeOrderHistory.Wait(ctx)
	case fiatDepositEPL:
		return r.FiatDepositRate.Wait(ctx)
	case fiatCancelDepositEPL:
		return r.FiatCancelDepositRate.Wait(ctx)
	case fiatDepositHistoryEPL:
		return r.FiatDepositHistoryRate.Wait(ctx)
	case fiatWithdrawalEPL:
		return r.FiatWithdrawalRate.Wait(ctx)
	case fiatCancelWithdrawalEPL:
		return r.FiatCancelWithdrawalRate.Wait(ctx)
	case fiatGetWithdrawalsEPL:
		return r.FiatGetWithdrawalsRate.Wait(ctx)
	case fiatGetChannelInfoEPL:
		return r.FiatGetChannelInfoRate.Wait(ctx)
	case subAccountsListEPL:
		return r.SubAccountsList.Wait(ctx)
	case getAPIKeyOfASubAccountEPL:
		return r.GetAPIKeyOfASubAccount.Wait(ctx)
	case getSubAccountTradingBalanceEPL:
		return r.GetSubAccountTradingBalance.Wait(ctx)
	case getSubAccountFundingBalanceEPL:
		return r.GetSubAccountFundingBalance.Wait(ctx)
	case subAccountTransferHistoryEPL:
		return r.SubAccountTransferHistory.Wait(ctx)
	case masterAccountsManageTransfersBetweenSubaccountEPL:
		return r.MasterAccountsManageTransfersBetweenSubaccount.Wait(ctx)
	case getTickersEPL:
		return r.GetTickers.Wait(ctx)
	case getTickerEPL:
		return r.GetTicker.Wait(ctx)
	case getOrderbookEPL:
		return r.GetOrderbook.Wait(ctx)
	case getCandlesticksEPL:
		return r.GetCandlesticks.Wait(ctx)
	case getCandlestickHistoryEPL:
		return r.GetCandlestickHistory.Wait(ctx)
	case getPublicTradesEPL:
		return r.GetPublicTrades.Wait(ctx)
	case getPublicTradeHistroryEPL:
		return r.GetPublicTradeHistrory.Wait(ctx)
	case get24HourTradingVolumeEPL:
		return r.Get24HourTradingVolume.Wait(ctx)
	case getOracleEPL:
		return r.GetOracle.Wait(ctx)
	case getExchangeRateEPL:
		return r.GetExchangeRate.Wait(ctx)
	case getInstrumentsEPL:
		return r.GetInstrumentsRate.Wait(ctx)
	case getSystemTimeEPL:
		return r.GetSystemTimeRate.Wait(ctx)
	case getSystemStatusEPL:
		return r.GetSystemStatusRate.Wait(ctx)
	default:
		return errors.New("unknown endpoint limit")
	}
}