Answer the question
In order to leave comments, you need to log in
How to solve my problem with SteamClient?
Help solve the problem!! What am I doing wrong? Everything seems to be correct:
import requests
import json
from time import sleep
from threading import Thread
from steampy.client import SteamClient
api = '**********'
# Set steam API key
api_key = '***************'
# Set path to SteamGuard file
steamguard_path = 'C:/pytest/maFiles/aoaoaoaoao.maFile'
# Steam username
username = '**************'
# Steam password
password = '*******************'
offers = requests.get(
f'http://api.steampowered.com/IEconService/GetTradeOffers/v1/?key={api_key}&get_sent_offers=1&time_historical_cutoff=1').json()[
'response']['trade_offers_sent']
for offer in offers[:1]:
offer_id = offer['tradeofferid']
message = offer['message']
account_other_id = offer['accountid_other']
state = offer['trade_offer_state']
if int(state) == 9:
print('Предложение с айди ' + str(offer_id) + ' было отклонено!')
if int(state) == 6:
print('Подтвердите предложение с айди ' + str(offer_id) + ' на моб. устройстве!')
steam_client = SteamClient(api_key)
steam_client.login(username, password, steamguard_path)
steam_client._confirm_transaction(str(offer_id))
if int(state) == 3:
print('Предложение с айди ' + str(
offer_id) + ' было успешно совершено! Все предметы были обменены!')
if int(state) == 1:
print('Предложение с айди ' + str(
offer_id) + ' является недействительным. Т.е его срок истек(не путать с 9 положением)')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question