This repository is an english translation of https://github.com/timagr615/dmarket_bot
Last updated Dec 9, 2025
18
Stars
2
Forks
4
Issues
0
Stars/day
Attention Score
7
Topics
Language breakdown
Python 100.0%
▸ Files
click to expand
README
dmarket_bot
Bot for automatic trading on dmarketSetup:
- git clone https://github.com/Luois45/dmarket_bot.git
- cd dmarket_bot
- Create a virtual environment python3 -m venv venv
- Activate the virtual environment . venv/bin/activate
- pip install -r requirements.txt
- Create a file
credentials.pyin the root directory with the following content:
PUBLIC_KEY = "your public api key"
SECRET_KEY = "your secret api key"
- The bot is being run using
main.py
Features:
- Supports all games available on dmarket.
- Automatic analysis of the skins/items for each game
- Placing orders which are determined by 15 different parameters
- Automatic setting of skins/items for sale after purchase. Adjusting of prices in accordance with the settings.
Configuration
All configuration parameters are set in the config.py file in the root directory of the bot.
Detailed description of the configuration:
logger_config- logger configuration
logger_config = {
"handlers": [
{"sink": sys.stderr, 'colorize': True, 'level': 'INFO'},
# {"sink": "log/debug.log", "serialize": False, 'level': 'DEBUG'},
{"sink": "log/info.log", "serialize": False, 'level': 'INFO'},
]
}
logger.configure(**logger_config)
"sink": sys.stderr - output logs to the console
"sink": "log/info.log" - output logs to a file
'level': 'INFO' is the level of the logs. Possible settings: TRACE, DEBUG, INFO, SUCCESS, WARNING, ERROR , CRITICAL. Each level from left to right prohibits the output of lower levels. IF the level INFO is set messages with the levels TRACE, DEBUG won't be displayed.
GAMES = [Games.CS, Games.DOTA, Games.RUST]- a lisit of games that will be used for trading. Available values:Games.CS, Games.DOTA, Games.RUST, Games.TF2PREVBASE = 60 60 4- update the skin database everyPREVBASEsecondsORDERSBASE = 60 * 10- update the order databaseORDERSBASEsecondsBAD_ITEMS- a blacklist of words. If the word is included in the name of the item it won't be bought.
BuyParams - configuration parameters for placing orders
STOPORDERSBALANCE = 1000- Stop placing orders if the balance is <= 10 dollars more than the minimum order priceMINAVGPRICE = 400- The minimum average price for the last 20 purchases of an item in cents. Items with a lower won't be added to the skin databaseMAXAVGPRICE = 3500- The maximum average price for the last 20 purchases of an item in cents. Items with a higher price will not be added to the skin database.FREQUENCY = True-PROFITPERCENT = 6or less, and the parameterGOODPOINTS_PERCENT = 50or higher.MIN_PRICE = 300- minimum price. The order won't be placed below this priceMAX_PRICE = 3000- maximum price. The order won't be placed above this price
PROFIT_PERCENT = 7-GOODPOINTSPERCENT = 50- the minimum percentage of points in the history of the last 20 sales corresponding to the parameterPROFIT_PERCENT = 7. In this case, if less than 50 % of points were sold with a profit of less than 7 %, then an order for such a skin/item won't be placedAVGPRICECOUNT = 7- calculating the average price for the last 7 sales to form the estimated profitALL_SALES = 100- the minimum number of sales for the entire period, if sales are below this number, the order won't be placedDAYSCOUNT = 20- at leastSALECOUNT = 15sales forDAYS_COUNT = 20days. Selection by popularitySALECOUNT = 15- at leastSALECOUNT = 15sales forDAYS_COUNT = 20days. Selection by popularityLASTSALE = 2- last sale is no older than LASTSALE days agoFIRSTSALE = 15- first purchase is no later than FIRSTSALE days ago
MAXCOUNTSELL_OFFERS = 30- The maximum number of items for sale. Above 30 the order won't be placed
BOOST_PERCENT = 24- remove up to 3 points that are 24 % higher than average priceBOOST_POINTS = 3- remove up to 3 points that are 24 % higher than average price
MAXTHRESHOLD = 1- the maximum price increase by MAXTHRESHOLD in % of the current order. The maximum increase in the price of your order from the price of the current first orderMIN_THRESHOLD = 3- the maximum decrease in the price of your order from the price of the current one. Sets the price change boundaries for the order
SellParams - configuration parameters for selling
MIN_PERCENT = 7- minimum profit percentageMAX_PERCENT = 15- maximum profit percentage
🔗 More in this category