简体   繁体   English

Steam API/JSON 中物品的买卖订单

[英]Buy and Sell orders of an item in Steam API/JSON

I'm trying to get buy and sell orders in JSON format like with the price history, but couldn't find any info.我正在尝试以 JSON 格式获取买卖订单,例如价格历史记录,但找不到任何信息。 Is there a method to do so?有没有办法这样做?

Buy and Sell orders screenshot买卖订单截图

I tried:我试过:

https://steamcommunity.com/market/pricehistory/?country=ru&currency=3&appid=730&market_hash_name=Operation%20Riptide%20Case

And:和:

https://steamcommunity.com/market/listings/730/AWP%20%7C%20Asiimov%20%28Field-Tested%29/render?start=0&count=1&currency=3&language=english&format=json

But they don't display buy and sell orders.但它们不显示买卖订单。 Thanks谢谢

Try this endpoint: https://steamcommunity.com/market/itemordershistogram试试这个端点: https://steamcommunity.com/market/itemordershistogram : https://steamcommunity.com/market/itemordershistogram

It's the orderbook chart at the bottom of the market pages of popular items, but you can fetch it for any item.它是流行商品市场页面底部的订单簿图表,但您可以为任何商品获取它。 Parameters are: country , currency , language , item_nameid , and two_factor .参数是: countrycurrencylanguageitem_nameidtwo_factor

Just for example parameters, my country , currency , and language are US , 1 (USD), and english .仅以参数为例,我的countrycurrencylanguage分别为US1 (USD) 和english two_factor can always be set to 0 , and item_nameid is what defines which item you're looking up. two_factor始终可以设置为0 ,并且item_nameid定义了您要查找的项目。 There's not an easy way to find it, but you can scrape it from here https://steamcommunity.com/market/listings/<appid>/<market_hash_name> for each item you need.找到它并不容易,但您可以从这里https://steamcommunity.com/market/listings/<appid>/<market_hash_name>为您需要的每个项目抓取它。 You can find it passed as an argument to the Market_LoadOrderSpread function in the page source.您可以在页面源代码中找到它作为参数传递给Market_LoadOrderSpread函数。 Scraping the ids from this page though is rate limited to ~5 requests per minute.从此页面抓取 id 的速率限制为每分钟约 5 个请求。

Best of luck!祝你好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM