[英]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¤cy=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¤cy=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
.参数是:
country
、 currency
、 language
、 item_nameid
和two_factor
。
Just for example parameters, my country
, currency
, and language
are US
, 1
(USD), and english
.仅以参数为例,我的
country
、 currency
和language
分别为US
、 1
(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.