Appearance
Max Orders API
This documentation explains how to use the aggregatedMaxOrders
GraphQL query to fetch the maximum buy order prices for items across multiple marketplaces.
Authentication
All API requests require authentication using a JWT token. Include the following header in your requests:
Header | Value | Description |
---|---|---|
api-token | <generated_jwt> | Your JWT authentication token |
For information on how to generate your JWT token, please refer to the Authentication Guide.
Query
graphql
query MaxOrders($markets: [String!]!) {
aggregatedMaxOrders(markets: $markets) {
market_hash_name
orders {
market_name
offers
price
}
}
}
Variables
json
{
"markets": [
"steamcommunity",
"csgotm",
"buff163"
]
}
Parameters
Parameter | Type | Description | Required |
---|---|---|---|
markets | [String!]! | Array of marketplace names to include in the comparison | Yes |
Supported Markets
The following marketplaces are supported for max order querying:
Market Name | Description |
---|---|
steamcommunity | Steam Community Market |
csgotm | CS.MONEY |
buff163 | Buff163 |
Response Fields
Root Object
Field | Type | Description |
---|---|---|
market_hash_name | String | The unique identifier of the item |
orders | [OrderInfo] | Array of order information for each marketplace |
OrderInfo Object
Field | Type | Description |
---|---|---|
market_name | String | Name of the marketplace |
offers | Integer | Number of available buy orders |
price | Integer | Maximum price among buy orders (divide by 1000 to get the real value) |
Code Examples
js
const axios = require('axios');
async function getMaxOrders(markets) {
const query = `
query MaxOrders($markets: [String!]!) {
aggregatedMaxOrders(markets: $markets) {
market_hash_name
orders {
market_name
offers
price
}
}
}
`;
try {
const response = await axios({
url: 'https://api.csmarketcap.com/api/v2/graphql',
method: 'post',
headers: {
'Content-Type': 'application/json',
'api-token': 'YOUR_JWT_TOKEN_HERE'
},
data: {
query: query,
variables: {
markets: markets
}
}
});
console.log('Max orders:', response.data.data.aggregatedMaxOrders);
return response.data.data.aggregatedMaxOrders;
} catch (error) {
console.error('Error fetching max orders:', error);
}
}
// Compare maximum buy orders across supported marketplaces
getMaxOrders(['steamcommunity', 'csgotm', 'buff163']);
bash
curl -X POST https://api.csmarketcap.com/api/v2/graphql \
-H "Content-Type: application/json" \
-H "api-token: YOUR_JWT_TOKEN_HERE" \
-d '{
"query": "query MaxOrders($markets: [String!]!) { aggregatedMaxOrders(markets: $markets) { market_hash_name orders { market_name offers price } } }",
"variables": {
"markets": ["steamcommunity", "csgotm", "buff163"]
}
}'
Example Response
json
{
"data": {
"aggregatedMaxOrders": [
{
"market_hash_name": "★ Sport Gloves | Hedge Maze (Factory New)",
"orders": [
{
"market_name": "buff163",
"offers": 2,
"price": 25230580
},
{
"market_name": "csgotm",
"offers": 1,
"price": 6397079
},
{
"market_name": "steamcommunity",
"offers": 1,
"price": 1408386
}
]
},
{
"market_hash_name": "★ Sport Gloves | Pandora's Box (Factory New)",
"orders": [
{
"market_name": "buff163",
"offers": 3,
"price": 24815610
},
{
"market_name": "csgotm",
"offers": 1,
"price": 6409584
},
{
"market_name": "steamcommunity",
"offers": 1,
"price": 1431577
}
]
},
{
"market_hash_name": "Sticker | Vox Eminor (Holo) | Katowice 2014",
"orders": [
{
"market_name": "csgotm",
"offers": 1,
"price": 16953135
},
{
"market_name": "steamcommunity",
"offers": 1,
"price": 1408386
}
]
},
]
}
}
Usage Notes
- This endpoint provides information about the highest buy orders (the maximum price buyers are willing to pay) for items across different marketplaces
- The
offers
field indicates the total number of buy orders available, not just those at the maximum price - Price values are provided in cents (divide by 1000 to get dollar value)
- Use this data to identify the best marketplace to sell your items for maximum profit
- Compare with the Aggregated Min Prices endpoint to understand the full price range (buy and sell sides) across marketplaces