def get_trade_offer(self, trade_offer_id): params = { "key": self._api_key, "tradeofferid": trade_offer_id, "language": self._language } r = api.call("GET", "IEconService", "GetTradeOffer", "v1", params) return json.loads(r.text)
def get_trade_offers(self, get_sent_offers=True, get_received_offers=True, get_descriptions=True, active_only=True, historical_only=False, time_historical_cutoff=None): params = { "key": self._api_key, "get_sent_offers": get_sent_offers, "get_received_offers": get_received_offers, "get_descriptions": get_descriptions, "language": self._language, "active_only": active_only, "historical_only": historical_only, "time_historical_cutoff": time_historical_cutoff } r = api.call("GET", "IEconService", "GetTradeOffers", "v1", params) return json.loads(r.text)
def get_trade_history(self, max_trades=10, start_after_time=None, start_after_tradeid=None, get_descriptions=True, navigating_back=True, include_failed=True, include_total=True): params = { 'key': self._api_key, 'max_trades': max_trades, 'start_after_time': start_after_time, 'start_after_tradeid': start_after_tradeid, 'get_descriptions': get_descriptions, 'navigating_back': navigating_back, 'include_failed': include_failed, 'include_total': include_total } r = api.call("GET", "IEconService", "GetTradeHistory", "v1", params) return json.loads(r.text)
def decline_trade_offer(self, trade_offer_id): params = {"key": self._api_key, "tradeofferid": trade_offer_id} r = api.call("POST", "IEconService", "DeclineTradeOffer", "v1", params) return json.loads(r.text)