Luois45 / dmarket_bot

This repository is an english translation of https://github.com/timagr615/dmarket_bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Selling items doesn't work [Fixed]

Cfomodz opened this issue · comments

image

2024-01-12 17:20:05.438 | INFO     | __main__:main:113 - The bot is launching
2024-01-12 17:20:05.438 | INFO     | __main__:main:113 - The bot is launching
2024-01-12 17:20:05.439 | DEBUG    | api.dmarketapi:get_money_loop:131 - get money_loop
2024-01-12 17:20:05.439 | DEBUG    | api.dmarketapi:generate_headers:32 - string_to_sign: GET/account/v1/balance
2024-01-12 17:20:05.480 | DEBUG    | __main__:history_loop:53 - History loop
2024-01-12 17:20:05.481 | DEBUG    | api.dmarketapi:generate_headers:32 - string_to_sign: GET/marketplace-api/v1/user-targets/closed?Limit=100&OrderDir=desc
2024-01-12 17:20:05.481 | DEBUG    | api.dmarketapi:closed_targets:238 - https://api.dmarket.com/marketplace-api/v1/user-targets/closed
2024-01-12 17:20:05.481 | DEBUG    | api.dmarketapi:closed_targets:239 - {'Limit': '100', 'OrderDir': 'desc'}
2024-01-12 17:20:05.483 | DEBUG    | __main__:add_to_sell_loop:66 - Add to sell loop
2024-01-12 17:20:05.483 | DEBUG    | modules.offers:add_to_sell:66 - Add to sell
select_not_sell
select_not_sell length: 100
2024-01-12 17:20:05.490 | ERROR    | __main__:add_to_sell_loop:71 -  Failed to list skin/item for sale: 5 validation errors for SellOffer
title
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.5/v/string_type
game
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.5/v/string_type
OfferID
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.5/v/string_type
sellTime
  Input should be a valid datetime [type=datetime_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.5/v/datetime_type
sellPrice
  Input should be a valid number [type=float_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.5/v/float_type. Sleep for 30 seconds.

Steps to recreate: Run main.py with config set as instructed in readme

The issue is caused by the change to the API endpoint /marketplace-api/v1/user-offers/closed (either input or response, I am unsure but will comment when able to debug

Currently, everything else is commented out while it gets worked on, so just the history and sell loop currently function properly. SInce it does something productive now though I figured I would push again as this is honestly quite handy already. It only listed 13 of my items because the rest were depo'ed directly and therefore no buyPrice was available for it to add profit % and fee to before creating an offer, so I will have to go list those. I am unsure if other functions in the bot resolve this need as this is only day 2 for me and I am just taking it one issue at a time.