A Go application to post DMarket Sales, Purchases and Closed Targets transactions to Telegram channel.
cmd/transactionTracker/: Main executable entrypoint.services/: Shared Go modules (API headers, transaction logic, timestamp management).types/: Data structures and API response definitions.config/: Configuration file template (real keys are ignored by .gitignore).
[Action] [Status]
Item Name
Float: 0.1842... (Hidden if item has no float)
Phase: Phase 2 (Hidden if item has no phase)
Pattern: 123 (Hidden if item has no pattern)
Change: + 600.00 $ (Amount spent or gained)
Profit: + 100.00 $ (Hidden if buy price not found. Shows "/ +20.00 %" if profit_percent = true)
Balance: 500.00 $ (Usable balance. Shows "/ pending $" if advanced_balance = true)
- Download
DmarketTracker*.zipfrom the Releases page - Read the
Use guide.txtinside the archive. - Run
DmarketTracker(Linux) orDmarketTracker.exe(Windows)
Dependencies:
- Go 1.21+ (tested on Go 1.24.5, Windows 10)
- Telegram Bot API v5.5.1
-
Clone the repo:
git clone https://github.com/cyberbebebe/dmarket-transactions-poster.gitcd dmarket-transactions-poster -
Copy and fill config:
Windows:
copy config\config.example.json config\config.jsonUnix/Mac:
cp config/config.example.json config/config.jsonOpen config/config.json and fill in your accounts and telegram data. The file must start with
[and end with].Fields Guide:
- dmarket_key: (Required) Your Private API key from DMarket.
- csfloat_key: Your CSFloat API (dev) Key. (optional, leave empty "" if not used)
- telegram_token: Get this from @BotFather.
- telegram_chat_id: Your channel or group ID.
Open web.telegram.org, go to your channel, and check the URL. If it ends in
#-721752185, your chatID is-100721752185. - advanced_balance: Set to true (recommended) to show pending balance (e.g., / 271.2 $).
- profit_percent: Set to true (recommended) to show profit percentage (e.g., / + 7.52%).
- ignore_released: Set to true (recommended) to ignore transactions that changed status from "trade_protected" to "success" ("Reverted" transactions will still be posted)
-
Install dependencies:
go mod tidy -
Run the app: Directly
go run cmd/transactionTracker/main.go
Build .exe (Recommended):
go build -o DmarketTracker.exe ./cmd/transactionTracker
Troubleshooting:
- App crashes immediately?. Run it via the terminal (cmd or PowerShell) to see the error message.
- JSON Error? Ensure your
config.jsonhas commas,between fields and account blocks, but no comma after the last field/block. - CSFloat not syncing? The auto-updater runs on app start and then every 3 days. Check if your API key is valid.
Sold with trade-protected status post example:
Target Closed with trade-protected status post example:
Reverted Sell post example:
-
This is almost fully vibecoded project by Go beginner amateur for self usage.
This code is not what professional project should be like.
-
Notes due to DMarket's history, Telegram and dumb programmer:
2.1) This code uses web
/historyendpoint with sorting by updatedAt (default). This means that transactions that were trade protected will be posted again with the new status "Success" or "Reverted". This "double-posting" can be "fixed" by- adding
&sortBy=createdAthttp param to the endpoint infunc FetchNewTransactions(). Critical: this will not let you know if a transaction got "Reverted" or moved from "trade_protected" to "success".
or
- setting "ignore_released" to "true" in account config (recommended).
2.2) Default settings requests up to 50 last updated transactions, with a frequency of 15 seconds.
- This can be modified by decreasing the limit from
&limit=50to&limit=10(or any other) in func FetchNewTransactions() endpoint or/and changing the timing in main.go:time.Sleep(15 * time.Second)for something liketime.Sleep(5 * time.Minute). - If you set
ignore_releasedtofalse: At trade unlock time (8:00 GMT) DMarket verifies the status of trades and pushes a bunch of transactions to the top of the history. This means there may be many posts at that time if you have a lot of "trade_protected" transactions. - Critical: If more transactions happen during your
time.Sleep()period than yourlimitallows (e.g., 15 transactions happen but limit is 10), the older transactions will be ignored. For properly handle this, use higher&limit=and useignore_released:true.
This "ignoring" behavior could be fixed by queueing messages, but i recommend to set
ignore_releasedtotrue.Alert: Telegram can mute your bot or/and channel up to 1 minute if you spam too many messages in a few seconds (e.g., 25 messages per 2 second).
2.3) This code does not print stickers info (applied on skins). Maybe i will add this later.
- adding
-
You can ask anything or suggest any feature/bug/idea.


