Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ with SteamClient('MY_API_KEY', 'MY_USERNAME', 'MY_PASSWORD', 'PATH_TO_STEAMGUARD
```


**create_sell_order(assetid: str, game: GameOptions, money_to_receive: str) -> dict**
**create_sell_order(assetid: str, game: GameOptions, money_to_receive: str, amount: int = 1) -> dict**

Using `SteamClient.login` method is required before usage

Expand All @@ -531,11 +531,13 @@ from steampy.models import GameOptions
with SteamClient('MY_API_KEY', 'MY_USERNAME', 'MY_PASSWORD', 'PATH_TO_STEAMGUARD_FILE') as client:
asset_id_to_sell = 'some_asset_id'
game = GameOptions.DOTA2
sell_response = client.market.create_sell_order(asset_id_to_sell, game, "10000")
sell_response = client.market.create_sell_order(asset_id_to_sell, game, "10000", 1)
```

⚠️ `money_to_receive` has to be in cents, so "100.00" should be passed has "10000"

⚠️ `money_to_receive` per one item, if amount above 1

**create_buy_order(market_name: str, price_single_item: str, quantity: int, game: GameOptions, currency: Currency = Currency.USD) -> dict**

Using `SteamClient.login` method is required before usage
Expand Down
4 changes: 2 additions & 2 deletions steampy/market.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ def get_my_market_listings(self) -> dict:
return listings

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