AgentSkillsCN

wow-api-currency-economy

WoW Retail货币、拍卖行、代币、商店、交易站、黑市、邮件,以及玩家交易API的完整参考。涵盖C_CurrencyInfo(货币数据、追踪、背包管理)、拍卖行(完整上架/竞价/购买/出售/搜索/商品管理)、C_WowTokenPublic(魔兽世界代币市场)、AccountStore(游戏内商店)、CatalogShop、C_PerksProgram(交易站——商人之约)、BlackMarket(BMAH)、TradeInfo(玩家交易)、MailInfo(邮箱),以及相关事件。当您需要处理货币、拍卖行界面、魔兽世界代币、游戏内商店、交易站、黑市、邮件,或玩家间的交易时,此参考手册将为您提供全面支持。

SKILL.md
--- frontmatter
name: wow-api-currency-economy
description: "Complete reference for WoW Retail Currency, Auction House, Token, Store, Trading Post, Black Market, Mail, and Player Trading APIs. Covers C_CurrencyInfo (currency data, tracking, backpack), Auction House (full listing/bidding/buying/selling/search/commodity), C_WowTokenPublic (WoW Token market), AccountStore (in-game shop), CatalogShop, C_PerksProgram (Trading Post — Trader's Tender), BlackMarket (BMAH), TradeInfo (player trading), MailInfo (mailbox), and related events. Use when working with currencies, auction house UI, WoW Tokens, the in-game store, Trading Post, black market, mail, or player-to-player trading."

Currency & Economy API (Retail — Patch 12.0.0)

Comprehensive reference for currency, auction house, store, token, trading post, mail, and trade APIs.

Source: https://warcraft.wiki.gg/wiki/World_of_Warcraft_API Current as of: Patch 12.0.0 (Build 65655) — January 28, 2026 Scope: Retail only.


Scope

  • C_CurrencyInfo — Currency data, tracking, backpack display
  • Auction House — Listing, bidding, buying, selling, commodities
  • C_WowTokenPublic / C_WowTokenUI — WoW Token market
  • AccountStore / StorePublic — In-game shop
  • CatalogShop — Catalog shop system
  • C_PerksProgram — Trading Post (Trader's Tender)
  • BlackMarket — Black Market Auction House
  • TradeInfo — Player-to-player trading
  • MailInfo — Mailbox system

C_CurrencyInfo — Currency System

Currency Data

FunctionReturnsDescription
C_CurrencyInfo.GetCurrencyInfo(currencyType)currencyInfoCurrency info by type
C_CurrencyInfo.GetCurrencyInfoFromLink(link)currencyInfoFrom hyperlink
C_CurrencyInfo.GetCurrencyIDFromLink(link)currencyIDID from hyperlink
C_CurrencyInfo.GetCurrencyLink(currencyType, amount)linkCurrency hyperlink
C_CurrencyInfo.GetCurrencyListSize()sizeNumber of entries
C_CurrencyInfo.GetCurrencyListInfo(index)infoEntry at index
C_CurrencyInfo.GetCurrencyListLink(index)linkLink at index

Currency Info Fields

  • name — Currency name
  • description — Description text
  • currencyID — Unique ID
  • iconFileID — Icon texture
  • quantity — Current amount
  • maxQuantity — Max cap (0 = none)
  • canEarnPerWeek — Has weekly cap?
  • quantityEarnedThisWeek — Earned this week
  • maxWeeklyQuantity — Weekly max
  • totalEarned — Total ever earned
  • isTradeable — Can be traded?
  • quality — Item quality
  • isDiscovered — Has been discovered?
  • isShowInBackpack — Shown in Backpack?

Backpack & Tracking

FunctionReturnsDescription
C_CurrencyInfo.GetBackpackCurrencyInfo(index)currencyDataBackpack slot
C_CurrencyInfo.GetNumBackpackCurrencies()numSlotsNum backpack slots
C_CurrencyInfo.SetCurrencyBackpack(index, backpack)Toggle backpack
C_CurrencyInfo.IsCurrencyTracked(currencyID)isTrackedIs tracked?
C_CurrencyInfo.SetCurrencyTracked(currencyID, tracked)Set tracked

Currency List Management

FunctionReturnsDescription
C_CurrencyInfo.ExpandCurrencyList(index, expand)Expand/collapse header
C_CurrencyInfo.IsCurrencyHeader(index)isHeaderIs header?
C_CurrencyInfo.GetFactionGrantedByCurrency(currencyID)factionIDAssociated faction
C_CurrencyInfo.DoesCurrentFilterPassFilter(currencyID)passesPasses filter?

Gold Functions (Global)

FunctionReturnsDescription
GetMoney()copperPlayer's money in copper
GetCoinTextureString(copper)textGold/silver/copper string
GetMoneyString(copper, ...)textFormatted money string

Auction House

Browse & Search

FunctionReturnsDescription
C_AuctionHouse.SearchForItemKeys(itemKeys, sorts)Search by item keys
C_AuctionHouse.SendBrowseQuery(query)Browse query
C_AuctionHouse.SendSearchQuery(itemKey, sorts, separateOwnerItems)Item search
C_AuctionHouse.GetBrowseResults()browseResultsBrowse results
C_AuctionHouse.GetNumItemSearchResults(itemKey)numResultsNum search results
C_AuctionHouse.GetItemSearchResultInfo(itemKey, index)resultInfoSearch result info
C_AuctionHouse.RefreshItemSearchResults(itemKey)Refresh search
C_AuctionHouse.GetFilterGroups()filterGroupsAvailable filters

Commodities

FunctionReturnsDescription
C_AuctionHouse.SendSellSearchQuery(itemKey, sorts, separateOwnerItems)Commodity search
C_AuctionHouse.GetCommoditySearchResultInfo(itemID, index)resultInfoCommodity result
C_AuctionHouse.GetNumCommoditySearchResults(itemID)numResultsNum commodity results
C_AuctionHouse.StartCommoditiesPurchase(itemID, quantity)Start commodity buy
C_AuctionHouse.ConfirmCommoditiesPurchase()Confirm commodity buy
C_AuctionHouse.CancelCommoditiesPurchase()Cancel commodity buy
C_AuctionHouse.GetCommodityQuote(itemID)quotePrice quote

Listing & Selling

FunctionReturnsDescription
C_AuctionHouse.PostItem(itemLocation, duration, quantity, bid, buyout)List item
C_AuctionHouse.PostCommodity(itemLocation, duration, quantity, unitPrice)List commodity
C_AuctionHouse.GetItemKeyInfo(itemKey)keyInfoItem key info
C_AuctionHouse.MakeItemKey(itemID, itemLevel, itemSuffix, battlePetSpeciesID)itemKeyCreate item key
C_AuctionHouse.GetAvailablePostCount(itemLocation)countHow many to list
C_AuctionHouse.CalculateItemDeposit(itemLocation, duration, quantity)depositDeposit cost
C_AuctionHouse.GetQuoteDurationRemaining()secondsQuote time remaining

Bidding & Buying

FunctionReturnsDescription
C_AuctionHouse.PlaceBid(auctionID, bidAmount)Place bid
C_AuctionHouse.GetBidInfo(index)bidInfoBid info
C_AuctionHouse.GetNumBids()numBidsActive bids
C_AuctionHouse.HasFavorite(itemKey)isFavoriteIs favorited?
C_AuctionHouse.SetFavoriteItem(itemKey, isFavorite)Set favorite
C_AuctionHouse.GetFavoriteItems()itemKeysAll favorites

Own Auctions

FunctionReturnsDescription
C_AuctionHouse.GetNumOwnedAuctions()numAuctionsOwn auctions
C_AuctionHouse.GetOwnedAuctionInfo(index)auctionInfoOwn auction info
C_AuctionHouse.CancelAuction(auctionID)Cancel auction
C_AuctionHouse.QueryOwnedAuctions(sorts)Query own auctions

Auction House State

FunctionReturnsDescription
C_AuctionHouse.IsAuctionHouseAvailable()isAvailableAH available?
C_AuctionHouse.CloseAuctionHouse()Close AH
C_AuctionHouse.GetAuctionHouseTimeLeftBand(timeLeftEnum)secondsTime left
C_AuctionHouse.ReplicateItems()Full AH scan
C_AuctionHouse.GetNumReplicateItems()countReplicate count
C_AuctionHouse.GetReplicateItemInfo(index)infoReplicate item

C_WowTokenPublic — WoW Token

FunctionReturnsDescription
C_WowTokenPublic.GetCurrentMarketPrice()priceGold price
C_WowTokenPublic.GetGuaranteedPrice()priceGuaranteed price
C_WowTokenPublic.UpdateMarketPrice()Request update
C_WowTokenPublic.GetCommerceSystemStatus()statusSystem status
C_WowTokenPublic.BuyToken()Buy token (gold)
C_WowTokenPublic.SellToken(auctionID)Sell token

AccountStore / StorePublic — In-Game Shop

FunctionReturnsDescription
C_StorePublic.IsEnabled()enabledShop enabled?
C_StorePublic.IsDisabledByParentalControls()disabledParental block?
C_StorePublic.DoesGroupHavePurchaseableProducts(group)hasPurchaseableHas products?

C_PerksProgram — Trading Post

FunctionReturnsDescription
C_PerksProgram.GetAvailableActivities()activitiesCurrent activities
C_PerksProgram.GetPendingChestRewards()rewardsPending rewards
C_PerksProgram.GetTimeRemaining()secondsRotation time left
C_PerksProgram.GetCurrencyAmount()amountTrader's Tender
C_PerksProgram.GetVendorItemInfo(perksVendorItemID)itemInfoVendor item
C_PerksProgram.GetAvailableVendorItemIDs()itemIDsCurrent rotation
C_PerksProgram.GetFrozenPerksVendorItemInfo()infoFrozen item
C_PerksProgram.RequestPurchase(perksVendorItemID)Purchase item
C_PerksProgram.RequestRefund(perksVendorItemID)Refund item
C_PerksProgram.GetDraggedPerksVendorItemInfo()itemInfoDragged item
C_PerksProgram.IsFrozenItem(perksVendorItemID)isFrozenIs frozen?
C_PerksProgram.SetFrozenPerksVendorItem(perksVendorItemID)Freeze item
C_PerksProgram.ClearFrozenPerksVendorItem()Unfreeze
C_PerksProgram.GetPerksVendorCategoryIDs()categoryIDsCategory IDs
C_PerksProgram.GetPerksVendorCategoryInfo(categoryID)categoryInfoCategory info

Black Market

FunctionReturnsDescription
C_BlackMarket.GetNumItems()numItemsCurrent BMAH items
C_BlackMarket.GetItemInfoByIndex(index)infoBMAH item info
C_BlackMarket.GetHotItem()infoHot item of the day
C_BlackMarket.ItemPlaceBid(index, amount)Place BMAH bid
C_BlackMarket.RequestItems()Request item list
C_BlackMarket.IsViewOnly()isViewOnlyView-only mode?

Trade (Player-to-Player)

FunctionReturnsDescription
InitiateTrade(unit)Start trade
AcceptTrade()Accept trade
CancelTrade()Cancel trade
AddTradeMoney()Add gold offer
SetTradeMoney(copper)Set gold amount
GetTargetTradeMoney()copperTheir gold offer
GetPlayerTradeMoney()copperYour gold offer
GetTradeTargetItemInfo(slotIndex)name, texture, quantity, quality, isUsable, enchantTheir item
GetTradePlayerItemInfo(slotIndex)name, texture, quantity, quality, isUsable, enchantYour item
ClickTradeButton(slotIndex)Click trade slot
GetNumTradeItems()numPlayerItems, numTargetItemsItem counts

Mail System

FunctionReturnsDescription
GetInboxNumItems()numItems, totalItemsInbox count
GetInboxHeaderInfo(index)packageIcon, stationeryIcon, sender, subject, money, CODAmount, daysLeft, hasItem, wasRead, wasReturned, textCreated, canReply, isGMMail header
GetInboxText(index)bodyText, stationeryBG, stationeryBGR, stationeryBGG, stationeryBGB, colorMail body
GetInboxItem(index, itemIndex)name, itemID, texture, count, quality, canUseAttachment
GetInboxItemLink(index, itemIndex)linkAttachment link
TakeInboxItem(index, itemIndex)Take attachment
TakeInboxMoney(index)Take gold
TakeInboxTextItem(index)Take text item
DeleteInboxItem(index)Delete mail
ReturnInboxItem(index)Return mail
AutoLootMailItem(index)Auto-loot all
InboxItemCanDelete(index)canDeleteCan delete?
SendMail(recipient, subject, body)Send mail
SetSendMailMoney(copper)Set gold to send
SetSendMailCOD(copper)Set COD amount
GetSendMailPrice()costSending cost
GetSendMailItem(index)name, texture, count, qualityAttached item
GetSendMailItemLink(index)linkAttached link
ClickSendMailItemButton(itemIndex, clearItem)Add/remove attachment
SendMailCanSend()canSendCan send?

Common Patterns

Display Currency with Cap

lua
local function ShowCurrency(currencyID)
    local info = C_CurrencyInfo.GetCurrencyInfo(currencyID)
    if info then
        local text = info.name .. ": " .. info.quantity
        if info.maxQuantity > 0 then
            text = text .. " / " .. info.maxQuantity
        end
        if info.canEarnPerWeek and info.maxWeeklyQuantity > 0 then
            text = text .. " (Weekly: " .. info.quantityEarnedThisWeek .. "/" .. info.maxWeeklyQuantity .. ")"
        end
        print(text)
    end
end

Auction House Search

lua
-- Register for results
local f = CreateFrame("Frame")
f:RegisterEvent("ITEM_SEARCH_RESULTS_UPDATED")
f:SetScript("OnEvent", function(self, event, itemKey, ...)
    local numResults = C_AuctionHouse.GetNumItemSearchResults(itemKey)
    for i = 1, numResults do
        local result = C_AuctionHouse.GetItemSearchResultInfo(itemKey, i)
        if result then
            print(result.buyoutAmount, "copper -", result.quantity, "available")
        end
    end
end)

-- Initiate search
local itemKey = C_AuctionHouse.MakeItemKey(12345) -- itemID
C_AuctionHouse.SendSearchQuery(itemKey, {}, false)

Check WoW Token Price

lua
C_WowTokenPublic.UpdateMarketPrice()

local f = CreateFrame("Frame")
f:RegisterEvent("TOKEN_MARKET_PRICE_UPDATED")
f:SetScript("OnEvent", function()
    local price = C_WowTokenPublic.GetCurrentMarketPrice()
    if price then
        print("WoW Token: " .. GetCoinTextureString(price))
    end
end)

Key Events

EventPayloadDescription
CURRENCY_DISPLAY_UPDATEcurrencyType, quantity, quantityChange, quantityGainSource, quantityLostSourceCurrency changed
AUCTION_HOUSE_SHOWAH opened
AUCTION_HOUSE_CLOSEDAH closed
AUCTION_HOUSE_BROWSE_RESULTS_UPDATEDBrowse results ready
ITEM_SEARCH_RESULTS_UPDATEDitemKeyItem search ready
COMMODITY_SEARCH_RESULTS_UPDATEDitemIDCommodity search ready
AUCTION_HOUSE_NEW_RESULTS_RECEIVEDitemKeyNew results
ITEM_SEARCH_RESULTS_ADDEDitemKeyResult added
AUCTION_HOUSE_AUCTION_CREATEDauctionIDAuction posted
AUCTION_CANCELEDauctionIDAuction canceled
TOKEN_MARKET_PRICE_UPDATEDresultToken price updated
TOKEN_STATUS_CHANGEDToken status changed
PERKS_PROGRAM_CURRENCY_REFRESHTrader's Tender updated
PERKS_PROGRAM_PURCHASE_SUCCESSTrading Post purchase
PERKS_PROGRAM_SET_FROZEN_ITEMItem frozen
MAIL_INBOX_UPDATEInbox updated
MAIL_SEND_SUCCESSMail sent
MAIL_SHOWMailbox opened
MAIL_CLOSEDMailbox closed
TRADE_SHOWTrade window opened
TRADE_CLOSEDTrade ended
TRADE_ACCEPT_UPDATEplayerAccept, targetAcceptAccept state
TRADE_MONEY_CHANGEDGold offer changed
TRADE_PLAYER_ITEM_CHANGEDslotIndexPlayer item changed
TRADE_TARGET_ITEM_CHANGEDslotIndexTarget item changed
BLACK_MARKET_ITEM_UPDATEBMAH items updated
BLACK_MARKET_OUTBIDOutbid on BMAH

Gotchas & Restrictions

  1. Auction House hardware event — Posting, buying, and bidding require hardware events (user clicks).
  2. Commodity vs. item — Commodities (stackable) use a different API path than equipment/unique items.
  3. AH throttling — Searches are rate-limited. Rapid queries get throttled by the server.
  4. Mail COD — COD mail auto-deducts gold when attachment is taken. Test with InboxItemCanDelete().
  5. GetMoney() returns copper — Divide by 100 for silver, 10000 for gold.
  6. Currency caps — Always check maxQuantity and maxWeeklyQuantity before displaying progress.
  7. WoW Token price is async — Call UpdateMarketPrice() then wait for TOKEN_MARKET_PRICE_UPDATED.
  8. ReplicateItems() is slow — Full AH scan is expensive. Use sparingly and handle results incrementally.