OmG3r/steam-trade

Any ideas on how to get item wear?

Opened this issue · 1 comments

Thank you for this amazing library. Any ideas on how to fetch item wear for a particular item? Thanks!

OmG3r commented

This library alone is not enough to get the a csgo item wear value.

however it can provide you with the item's inspect URL and you can send it to CSGO Float API to get the wear value

you will have to get the non-trimmed version of your target's inventory match link each item with it's description as shown in the readme.

then you would get the inspection link for each item you want its float value ( item['actions'][0]['link'] should give you the link)

the link will look something like this "steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20S%owner_steamid%A%assetid%D14134723931320265265" you'd need to fill in "%owner_steamid%" and "%assetid%" with their respctive values to get the final inspection link

finally, you make a request to CSGO float API with this link

"https://api.csgofloat.com/?url=steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20S76561198084749846A698323590D7935523998312483177"

you replace url parameter with the inspection link you created