I have a website that a Steam user can sign into, I plan on adding a function to pull all the tradeable items from their inventory and list them on the page.
I can't think of how it could be possible, but would there be anyway to get the prices of the items in the user's inventory without using market listing on Steam's marketplace? The reason I want to do this is to stop price manipulation of items that have 1-2 listings where a seller can set the price.
My only idea to stop price manipulation is something like this...:
If (item_current_number_of_listings < 10 || weekly_item_sold < 50)
{
//check to see if price has risen by certain % within week
var price_rise_percentage = (Median_price_current - Median_price_start_of_week) / Median_price_current
if(price_rice_percentage >= 50){
item = untradeable
}
}
(This is just the layout of idea - not actual code)
This code seems like it might not cut it to me, and could bring up problems like legitimate price rises of items, and still allows small price manipulations.
In summary:
Is it possible to get accurate prices of steam marketplace items that can't be manipulated and NOT from the steam marketplace.
What kind of precautions could be put in place in the code to stop price manipulation of items if the price IS taken from the steam marketplace.
- Is it possible to get accurate prices of steam marketplace items that can't be manipulated and NOT from the steam marketplace.
Such a thing as a "true price" doesn't exist. The price of an object is always determined by what others are willing to pay for it.
Since that value only exists inside people's heads and probably differs from person to person, your only chance is to use the data available to you to approximate the average value of an item and the history of that value.
If you had access to a table containing the records of all items sold together with timestamp and amount of money the seller receives, you might be able to calculate the price an item would or should have if its price curve behaved like a radioactive decay curve.
However, such a model would be entirely theoretical.
Truly calculating the value of an item is impossible, as that would require not only a complex probability model of human motives [1] together with the current availability of the desired item and the people's assumptions for the future availability and price of that item, but also the reason(s) and probability for each of the afore mentioned.
Building such a model for every eventuality basically equals predicting the future.
[1]: Some people buy items because they want to sell them at a higher price, some because they have too much money, some because they just want it, some because they need it to complete a badge, and then we can start with badges: some people want a badge just to level up their steam profile, others because they are huge fans of the game it belongs to, etc.
- What kind of precautions could be put in place in the code to stop price manipulation of items if the price IS taken from the steam marketplace.
Price manipulation in cartel-style (convince all selling users to increase their price) you probably can't counteract, but I don't believe that's really happening on Steam.
Price manipulation by buying everything and selling it at a higher price you can detect by watching out for many or all items of a type being bought in a very short time by one or only a few users (probably even a group, but that would be really large-scale already).
How much action you can take against it depends on how many items are available/how many of those you have in stock.
I think the most effective counter measure would be to make other users that are willing to sell, sell at the price you have in mind or lower.
I assume that most people set the price based on the value shown by Steam as "cheapest item of that type on the market", so in order to make (most of) them sell at that price or lower, you'd need to distribute an item at that price yourself.
To last as long as possible against those trying to push the prices, only ever sell one item at a time and try to waste as much of their time as possible, e.g. don't sell the next item immediately after your last one has been bought, but add a delay from e.g. 15-60 seconds just to make them wait. Also, to increase your stock, when you detect the begin of a buyout, try to acquire as much as possible yourself.
And at last, remember which users/groups have been participating in price pushes and assume a buyout as soon as such a user buys more than one item of a type in, let's say a minute, or as soon as more than two members of such a group buy the same item in the same amount of time.
You might have to do a lot of fiddling to find the right values and you'll certainly loose money when buying and redistributing items at the same price (curse those 15% fees).