gergelyszabo94 / csgo-trader-extension

CSGO Trader Browser Extension to help with CS:GO item trading, marketing and much more
https://csgotrader.app
GNU General Public License v3.0
213 stars 42 forks source link

fix(backend): remove item prices that are way too expensive/inexpensive #398

Open hexiro opened 2 years ago

hexiro commented 2 years ago

I remember someone mentioning this on the steam group, but I couldn't find it so I'm opening an issue here. This came to mind because the AK-47 | Redline FT is 18 cents right now.

example: image image

I believe some kind of calculation can be done to see if an item was just mispriced on the market, just like the functions that check if gloves or knives are mispriced. This might be hard to do if items change price a lot, but maybe exclude the price if it > or < 50% of it's value?

so if an item is 500$ and it gets listed for 0-250$ or 750+ the price will be excluded?

I'm not sure exactly. You're way more experienced of a trader so maybe you can come up with better numbers. I'm not sure what you said to the first person who suggested this, but let me know what you think!

code from here:

def is_mispriced_knife(item_name, price):
    return any(knife in item_name for knife in knives) and price < 50

def is_mispriced_glove(item_name, price):
    return any(glove in item_name for glove in gloves) and price < 60
gergelyszabo94 commented 2 years ago

I think I did not spend much time improving this because I had (still have to some extent) plans for collecting my own market prices so we wouldn't have to rely on pricing providers and their limitations. If we had buy order prices from the market then it would be really simple (if it's lower than the buy order price than something is wrong).

hexiro commented 2 years ago

good luck collecting your own prices, and let me know how that works out. Steam Community Market does rate limit frequently from my experience. "if it's lower than the buy order price than something is wrong" yeah that makes perfect sense to me. I'm guessing the api you're using now doesn't support this

hexiro commented 2 years ago

Sometime a while back i suggested you make the json/objects for all prices itemName: price and I still believe this. Last time you said you didn't want to break anything if people were relying on the price data being the way it is, but If you do end up using your own prices, you'll have to do some refactoring to the pricing system I'd assume. Along with that, instead of steam.json being itemName: last_24h: price you could do steam_last24h.json and make that itemName: price which will make you life with the extension a lot easier. Instead of having to deal with different json structures, you could have itemName: price for everything, and just have more files with more detailed file names. 👍🏼