API:2/commerce/prices
From Guild Wars 2 Wiki
Jump to navigationJump to search
/v2/commerce/prices
- HTTP method
- GET
- Format
- json
- API version
- version 2
- Release date
- 2014-09-10
- Scope
- none
- Optional
- none
This resource returns current aggregated buy and sell listing information from the trading post.
Parameters
ids(optional list of numbers) – A comma-separated list of item ids to query the listings for.
A single id can also be requested as a subresource.
Response
If the root endpoint (/v2/commerce/prices) is accessed without specifying an id, a list of all ids is returned. When multiple ids are requested using the ids parameter, a list of response objects is returned.
For each requested item id, an object with the following properties is returned:
id(number) – The item id.whitelisted(boolean) – Indicates whether or not a free to play account can purchase or sell this item on the trading post.buys(object) – Buy information.sells(object) – Sell information.
Each buys & sells object has the following properties:
unit_price(number) – The highest buy order or lowest sell offer price in coins.quantity(number) – The amount of items being sold/bought.
Example
https://api.guildwars2.com/v2/commerce/prices/19684
{
"id": 19684,
"whitelisted": false,
"buys": {
"quantity": 145975,
"unit_price": 7018
},
"sells": {
"quantity": 126,
"unit_price": 7019
}
}
http://api.guildwars2.com/v2/commerce/prices?ids=19684,19709
[
{
"id": 19684,
"whitelisted": false,
"buys": {
"quantity": 145975,
"unit_price": 7018
},
"sells": {
"quantity": 126,
"unit_price": 7019
}
},
{
"id": 19709,
"whitelisted": false,
"buys": {
"quantity": 0,
"unit_price": 0
},
"sells": {
"quantity": 1593,
"unit_price": 192
}
}
]