def ledger(self, operations='', marker=None, limit=25, sort='desc'): """Get the ledger of user operations Args: operations (str, optional): They type of operations to include. Enum of ('trades', 'fees', 'fundings', 'withdrawals') If None, returns all the operations. marker (str, optional): Returns objects that are older or newer (depending on 'sort') than the object which has the marker value as ID limit (int, optional): Limit the number of results to parameter value, max=100, default=25 sort (str, optional): Sorting by datetime: 'asc', 'desc' Defuault is 'desc' Returns: A list bitso.LedgerEntry instances. """ url = '%s/ledger/%s' % (self.base_url, operations) parameters = {} if marker: parameters['marker'] = marker if limit: parameters['limit'] = limit if sort: parameters['sort'] = sort #headers = self._build_auth_header('GET', self._build_url(url, parameters)) resp = self._request_url(url, 'GET', params=parameters, private=True) return [LedgerEntry._NewFromJsonDict(entry) for entry in resp['payload']]