code: def lendbook(self, currency, parameters=None):
          
          data = self._get(self.url_for(PATH_LENDBOOK, path_arg=currency, parameters=parameters))
  
          for lend_type in data.keys():
  
              for lend in data[lend_type]:
  
                  for key, value in lend.items():
                      if key in ['rate', 'amount', 'timestamp']:
                          new_value = float(value)
                      elif key == 'period':
                          new_value = int(value)
                      elif key == 'frr':
                          new_value = value == 'Yes'
  
                      lend[key] = new_value
  
          return data
docs: curl "https://api.bitfinex.com/v1/lendbook/btc"
  
          {"bids":[{"rate":"5.475","amount":"15.03894663","period":30,"timestamp":"1395112149.0","frr":"No"},{"rate":"2.409","amount":"14.5121868","period":7,"timestamp":"1395497599.0","frr":"No"}],"asks":[{"rate":"6.351","amount":"15.5180735","period":5,"timestamp":"1395549996.0","frr":"No"},{"rate":"6.3588","amount":"626.94808249","period":30,"timestamp":"1395400654.0","frr":"Yes"}]}
  
          Optional parameters
  
          limit_bids (int): Optional. Limit the number of bids (loan demands) returned. May be 0 in which case the array of bids is empty. Default is 50.
          limit_asks (int): Optional. Limit the number of asks (loan offers) returned. May be 0 in which case the array of asks is empty. Default is 50.