Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to create sell orders #390

Open
pudjojotaro opened this issue May 14, 2024 · 1 comment
Open

Failing to create sell orders #390

pudjojotaro opened this issue May 14, 2024 · 1 comment

Comments

@pudjojotaro
Copy link

Ok, so I'm using the same code that worked fine 6 months ago, using the default create_sell_order function. I get past the login and getting the inventory, I get the correct item IDs, but when I call the create_sell_order I get a response saying "There was a problem listing your item. Refresh the page and try again"

Any suggestions why this might be happening? Thanks in advance.

image

image

@borisenko09
Copy link
Contributor

image
this is what I use

@login_required
    def create_sell_order(self, assetid: str, game: GameOptions, money_to_receive: str) -> dict:
        data = {
            'assetid': assetid,
            'sessionid': self._session.cookies.get_dict("steamcommunity.com")['sessionid'],
            'contextid': game.context_id,
            'appid': game.app_id,
            'amount': 1,
            'price': money_to_receive,
        }
        headers = {'Referer': f'{SteamUrl.COMMUNITY_URL}/profiles/{self._steam_guard["steamid"]}/inventory'}

        response = self._session.post(f'{SteamUrl.COMMUNITY_URL}/market/sellitem/', data, headers=headers).json()
        has_pending_confirmation = 'pending confirmation' in response.get('message', '')
        if response.get('needs_mobile_confirmation') or (not response.get('success') and has_pending_confirmation):
            return self._confirm_sell_listing(assetid)

        return response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants