Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 3.04 KB

README.md

File metadata and controls

35 lines (25 loc) · 3.04 KB

StalcraftAuctionMonitor

Auction monitor for STALCRAFT: X. It is a console app that allows you to send requests to the STALCRAFT: X API (https://eapi.stalcraft.net/reference#/).
It only works for active lots on the auction and its sells history. Only RU region is available, all items are found by their cyrillic names.

Usage

You need a token (more info here) to get access to the Production API. Otherwise this app will be dealing with Demo API.
This project does not provide you with a token for Production API, you need to get your own.

To start using this app, you need to make sure the database is up-to-date (you need to do it regularly).
You can either download the source files from https://github.com/EXBO-Studio/stalcraft-api.git or use a pull script from this project (you must have git installed on your OS).

Afterwards provide the token if you have one, fill empty fields in the config (data/client.json). If you do not have the token, you can use the Demo API.

Launch the application, if you provided the token and got authorized you can use the Production API now, otherwise you will be delaing with the Demo API.

Commands

All commands from below must be typed into this application's console window.

If there was an update to the database (meaning you just pulled it), you need to remap items. Run command map in the console, then init_items.
Now you have the up-to-date item map to use.

There is a maximum of lots to get from the API. By default it is set to 4 000.
You can change this value by running offset <number>.
The bigger this value is, the longer it would take to process everything. Alas this can not be done in multi-threaded way. One request yields a maximum of 200 lots, to process 4 000 lots you will need to send 20 requests. The problem is, if you send requests too frequently, responds cease to contain data you need.

To check active lots run check <qlt> <ptn> <name>. qlt can be in range from -1 to 5, -1 means any, ptn is in range from -1 to 15, -1 means any. name is either a cyrillic name or item's id. You can look up these in data/items/item_map.json.
This command will return all active lots from the auction.

You can also view sells history for each item. There is a limit for lots, by reaching it the app stops to send requests and process yielded data. It is set to 20 but you are free to change this. Run lots <number>.
Run find <qlt> <ptn> <name>. Arguments are the same as in check. This process will take a while if you set the maximum offset too big. Once there is enough lots to fit the lots limit, the process stops.
Now you can see for how much that item was sold and when.

Build

To build this project yourself, you are going to need libcurl and Boost installed. There is some trick with Boost on Windows - after installation you will need to provide the correct path to the CMakeLists.txt.
Afterwards just run one of the build scripts.