Grand Exchange
The Grand Exchange lets you buy and sell items with other players through sell orders and buy orders. To interact with the Grand Exchange, your character must be on a map containing a Grand Exchange.
There is a limit of 100 active orders (sell + buy combined) per account.
Browse orders
You can browse all active orders (sell and buy) using this request. Use the type parameter to filter by order type, and code to filter by item.
curl --request GET \
--url 'https://api.artifactsmmo.com/grandexchange/orders?code={ITEM_CODE}&type=sell' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'const url = 'https://api.artifactsmmo.com/grandexchange/orders?code={ITEM_CODE}&type=sell';
const options = {
method: 'GET',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}| Parameter | Description |
|---|---|
code | Filter by item code. |
type | Filter by order type: sell or buy. |
account | Filter by account (requires type to be specified). |
View the API Reference (opens in a new tab)
Sales history
To consult an item's sales history over the last 7 days, you can use this request:
curl --request GET \
--url 'https://api.artifactsmmo.com/grandexchange/history/{ITEM_CODE}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'const url = 'https://api.artifactsmmo.com/grandexchange/history/{ITEM_CODE}';
const options = {
method: 'GET',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}View the API Reference (opens in a new tab)
Sell Orders
Create a sell order
To put items up for sale, use this POST request. The items are removed from your inventory when the order is created.
curl --request POST \
--url https://api.artifactsmmo.com/my/{name}/action/grandexchange/create-sell-order \
--header 'Accept: application/json' \
--header 'Authorization: Bearer INSERT_YOUR_TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data '{
"code": "iron_sword",
"quantity": 5,
"price": 100
}'const url = 'https://api.artifactsmmo.com/my/{name}/action/grandexchange/create-sell-order';
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
Authorization: 'Bearer INSERT_YOUR_TOKEN_HERE'
},
body: JSON.stringify({ code: "iron_sword", quantity: 5, price: 100 })
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}| Field | Description |
|---|---|
code | The item code to sell. |
quantity | Number of items to sell (1–100). |
price | Price per unit. |
View the API Reference (opens in a new tab)
Buy from a sell order
To buy items from an existing sell order, first browse the sell orders to find the order ID, then use this POST request:
curl --request POST \
--url https://api.artifactsmmo.com/my/{name}/action/grandexchange/buy \
--header 'Accept: application/json' \
--header 'Authorization: Bearer INSERT_YOUR_TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data '{
"id": "ORDER_ID",
"quantity": 1
}'const url = 'https://api.artifactsmmo.com/my/{name}/action/grandexchange/buy';
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
Authorization: 'Bearer INSERT_YOUR_TOKEN_HERE'
},
body: JSON.stringify({ id: "ORDER_ID", quantity: 1 })
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}| Field | Description |
|---|---|
id | The sell order ID. |
quantity | Number of items to buy (1–100). |
The gold is deducted from your character and the items are added to your inventory immediately.
View the API Reference (opens in a new tab)
Buy Orders
Buy orders let you place a standing offer to purchase items at a specific price. Other players can then fill your order by selling their items to it.
When you create a buy order, the total gold (price × quantity) is deducted from your character immediately as a guarantee. If no one fills your order and you cancel it, the gold is refunded.
Create a buy order
curl --request POST \
--url https://api.artifactsmmo.com/my/{name}/action/grandexchange/create-buy-order \
--header 'Accept: application/json' \
--header 'Authorization: Bearer INSERT_YOUR_TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data '{
"code": "iron_ore",
"quantity": 50,
"price": 20
}'const url = 'https://api.artifactsmmo.com/my/{name}/action/grandexchange/create-buy-order';
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
Authorization: 'Bearer INSERT_YOUR_TOKEN_HERE'
},
body: JSON.stringify({ code: "iron_ore", quantity: 50, price: 20 })
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}| Field | Description |
|---|---|
code | The item code you want to buy. |
quantity | Number of items you want to buy (1–100). |
price | The price per unit you are willing to pay. |
View the API Reference (opens in a new tab)
Fill a buy order
To sell your items to an existing buy order, use this POST request. The items are removed from your inventory and you receive the gold immediately.
curl --request POST \
--url https://api.artifactsmmo.com/my/{name}/action/grandexchange/fill \
--header 'Accept: application/json' \
--header 'Authorization: Bearer INSERT_YOUR_TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data '{
"id": "BUY_ORDER_ID",
"quantity": 10
}'const url = 'https://api.artifactsmmo.com/my/{name}/action/grandexchange/fill';
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
Authorization: 'Bearer INSERT_YOUR_TOKEN_HERE'
},
body: JSON.stringify({ id: "BUY_ORDER_ID", quantity: 10 })
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}| Field | Description |
|---|---|
id | The buy order ID. |
quantity | Number of items to sell to the order (1–100). |
You cannot fill your own buy orders. The items purchased through a buy order are delivered to the buyer's pending items. The buyer can then claim them with any character on their account.
View the API Reference (opens in a new tab)
Cancel an order
You can cancel any of your active orders (sell or buy). To find an order to cancel, first check your orders list (opens in a new tab).
curl --request POST \
--url https://api.artifactsmmo.com/my/{name}/action/grandexchange/cancel \
--header 'Accept: application/json' \
--header 'Authorization: Bearer INSERT_YOUR_TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data '{
"id": "ORDER_ID"
}'const url = 'https://api.artifactsmmo.com/my/{name}/action/grandexchange/cancel';
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
Authorization: 'Bearer INSERT_YOUR_TOKEN_HERE'
},
body: JSON.stringify({ id: "ORDER_ID" })
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}- Cancelling a sell order: the items are returned to your character's inventory (requires space).
- Cancelling a buy order: the gold is refunded to your character.