diff --git a/bitstamp/client.py b/bitstamp/client.py index f781eba..9537e58 100755 --- a/bitstamp/client.py +++ b/bitstamp/client.py @@ -253,8 +253,8 @@ def account_balance(self, base="btc", quote="usd"): url = self._construct_url("balance/", base, quote) return self._post(url, return_json=True, version=2) - def user_transactions(self, offset=0, limit=100, descending=True, - base=None, quote=None): + def user_transactions(self, offset=0, limit=1000, descending=True, + base=None, quote=None, since_timestamp=None, since_id=None): """ Returns descending list of transactions. Every transaction (dictionary) contains:: @@ -273,9 +273,32 @@ def user_transactions(self, offset=0, limit=100, descending=True, 'limit': limit, 'sort': 'desc' if descending else 'asc', } + if since_timestamp is not None: + data.update({'since_timestamp': since_timestamp}) + if since_id is not None: + data.update({'since_id': since_id}) url = self._construct_url("user_transactions/", base, quote) return self._post(url, data=data, return_json=True, version=2) + def crypto_transactions(self, offset=0, limit=1000): + """ + Returns list of crypto transactions. Every transaction (dictionary) + contains:: + {u'currency' : u'LTC' + u'destinationAddress': u'Destination Address' + u'txid': u'Transaction Hash' + u'amount' u'1.0' + u'datetime': int(timestamp)} + + Instead of the keys btc and usd, it can contain other currency codes + """ + data = { + 'offset': offset, + 'limit': limit, + } + url = "crypto-transactions/" + return self._post(url, data=data, return_json=True, version=2) + def open_orders(self, base="btc", quote="usd"): """ Returns JSON list of open orders. Each order is represented as a