Skip to content
Integrations

Integrations

Discord Webhooks

XAuctionHouse can send rich embeds to Discord channels via webhooks. There are two separate webhook configurations:

Sales webhook

Sends notifications for marketplace events. Enable in config.yml:

discord-sales:
  enabled: true
  webhook-url: "https://discord.com/api/webhooks/..."

Events sent to the sales webhook:

EventEmbed ColorDescription
New ListingBlueA player listed an item for fixed-price sale
New AuctionPurpleA player started an auction
Item PurchasedGreenA fixed-price item was bought
Bid PlacedYellowA bid was placed on an auction
Auction WonGoldAn auction ended with a winner
Server SaleGoldA server listing was bought (money sink)

Admin webhook

Logs administrative actions for audit purposes:

discord-admin:
  enabled: true
  webhook-url: "https://discord.com/api/webhooks/..."
EventEmbed ColorDescription
Force RemoveRedAn admin force-removed a player's listing
PurgeOrangeAn admin purged expired or sold items
Auction BanRedAn admin banned a player from the auction house, in game or from the dashboard

All embeds include a timestamp. When cross-server sync is enabled, the server name is included in the footer.

Either webhook address can be kept out of config.yml, in secrets.yml: see Discord Webhooks under Configuration.

Embeds are batched and sent through XCore, so a busy market delays the notifications rather than losing them: a channel that answers "too many requests" is left alone for as long as Discord asks, then the queue resumes.

PlaceholderAPI

If PlaceholderAPI is installed, XAuctionHouse registers the following placeholders:

PlaceholderDescription
%xauctionhouse_sell_limit%Maximum sell slots for the player (based on ah.limit.* permission)
%xauctionhouse_sell_count%Current number of active listings
%xauctionhouse_expired_count%Current number of expired listings
%xauctionhouse_active_auctions%Number of active auction listings by this player
%xauctionhouse_active_bids%Number of items where this player is the highest bidder

These placeholders work in scoreboards, tab lists, holograms, and anywhere PlaceholderAPI is supported. Use them to show players their auction house stats.

Web Dashboard API

XAuctionHouse registers a web module with the XCore dashboard. It provides 6 pages (Listings, Expired, Sales History, Bans, Statistics, Market), fills the auction house section of the dashboard's player profile, and serves the following API endpoints.

All endpoints require Authorization: Bearer <session token>. The token comes from the link /xcore dashboard hands out — there is none to configure. Requests count towards the dashboard's shared limit of 120 per IP per minute.

A session acts with the in-game permissions of the player it belongs to, checked on every request. Every page and endpoint needs xcore.dashboard.xauctionhouse, and each POST endpoint also needs the permission listed beside it, which for an action that has a command is the one the command asks for in game. A request without it is answered 403 with the permission it lacked, and a button its reader may not use is left off the page. A player's auction data, as their profile shows it, needs ah.admin and xcore.dashboard.players. The configuration editor needs xcore.dashboard.config, and saving the file there xcore.dashboard.config.save and ah.admin as well, like /ah reload. Operators have every one of these permissions.

GET endpoints

EndpointDescription
GET /api/xauctionhouse/listingsReturns the 100 most recent active listings
GET /api/xauctionhouse/salesReturns the 100 most recent completed sales
GET /api/xauctionhouse/statsAggregate stats: active listings count, total sold, total expired
GET /api/xauctionhouse/stats/dailyLast 7 days: daily volume, top 10 sellers, top 10 buyers. Won auctions count at their winning bid
GET /api/xauctionhouse/expired?page=1&limit=50Paginated expired/cancelled listings
GET /api/xauctionhouse/history?page=1&limit=50&search=namePaginated transaction history with optional player search
GET /api/xauctionhouse/player/{name}?page=1&limit=50Player's active listings, sold items, bought items, and expired listings, a page at a time. Needs ah.admin and xcore.dashboard.players
GET /api/xauctionhouse/player/{name}/historyPlayer's complete buy/sell transaction history. Needs ah.admin and xcore.dashboard.players
GET /api/xauctionhouse/bansAll auction-house bans with a computed Active/Expired status

POST endpoints

EndpointBodyDescriptionPermission
POST /api/xauctionhouse/listing/cancel{"id": int}Cancel a single active listing by IDah.admin.remove or ah.admin
POST /api/xauctionhouse/listing/cancel-all{"player": "name"}Cancel all active listings by a playerxcore.dashboard.xauctionhouse.manage
POST /api/xauctionhouse/expired/clear{"player": "name"} or {}Hand expired listings back to their sellers (in hand if online, mailbox otherwise) and remove them, for one player or for everyone, 500 per call. The dashboard's "Clear all expired" button can be pressed again for the restah.admin
POST /api/xauctionhouse/bans/add{"player", "duration", "reason"}Ban a player (def or empty duration = permanent, any other word than a duration is refused); resolves offline players. Recorded under the admin signed in, spares online staff under exempt-admins, tells the player and posts to the Discord admin webhookah.admin
POST /api/xauctionhouse/bans/remove{"player": "name"}Lift a player's auction-house banah.admin

Response format

All responses are JSON. Listing objects include item details extracted from the serialized ItemStack:

{
  "sellerName": "Steve",
  "price": 500.0,
  "currency": "coins",
  "listingType": "FIXED_PRICE",
  "itemDetails": {
    "material": "DIAMOND_SWORD",
    "amount": 1,
    "displayMaterial": "Diamond Sword",
    "enchantments": [
      {"name": "Sharpness", "level": 5}
    ]
  }
}

For auction listings, additional fields are included: startingBid, currentBid, bidCount, and highBidder.

POST endpoints that modify listings automatically publish cross-server sync messages, so changes are reflected on all servers immediately.

Cross-Server Sync

When cross-server sync is enabled in XCore, XAuctionHouse registers a sync channel to propagate listing changes across all servers in real-time.

Sync events include:

  • ADD — A new listing was created
  • REMOVE — A listing was purchased, cancelled, or force-removed
  • BID — A bid was placed on an auction

This means players on any server see the same auction house contents. When a listing is bought on Server A, it immediately disappears from the GUI on Server B.

Every five minutes, each server also holds the listings it has in memory against the database and repairs any difference, so a sync message that went missing cannot leave a sold or removed listing on show.

Auction bans use their own sync channel (BAN / UNBAN events), so banning a scammer on one server applies everywhere instantly.

For instant sync, configure Redis in XCore. Without Redis, sync falls back to database polling with a configurable delay.