Appearance
sdk.market
Outbound market packets. Nested MarketOfferID lives here; AppearanceTypeUpgradeable stays on the packet builder because other domains reuse it.
lua
local M = require("sdk.market")Constants
Lua 5.4 has no enums — these are integer (or string) fields on the module.
| Name | Value | Summary |
|---|---|---|
MARKET_BROWSE_OWN_HISTORY | 1 | — |
MARKET_BROWSE_OWN_OFFERS | 2 | — |
MARKET_BROWSE_ITEM | 3 | — |
MARKET_KIND_BUY | 0 | — |
MARKET_KIND_SELL | 1 | — |
offer_id
function · offer_id(timestamp, counter)
Heap MarketOfferID (vtable + has_bits=3 + timestamp + counter). Accept and Cancel take this nested object, not raw integers. 32-byte alloc; layout fallback is the last proven official field order.
statistics
function · statistics()
Empty MarketStatistics request. Server answers with the own-offers summary the depot market window shows before a browse.
leave
function · leave()
Leave the market UI / cancel the market session. No payload; the official client sends this on window close.
browse
function · browse(kind, item_id, tier)
kind 1=own history, 2=own offers (no identifier). kind 3=item (identifier required).
create
function · create(kind, item_id, amount, price, tier, anonymous)
kind 0=buy offer, 1=sell offer (official client a2 != 0).
accept
function · accept(timestamp, counter, amount)
Accept an offer by MarketOfferID (timestamp+counter) and amount. Presence 3 = offer + amount. amount 0 is rejected by the server, not here.
cancel
function · cancel(timestamp, counter)
Cancel own offer by MarketOfferID. Presence 1 = offer only; there is no amount on the official cancel packet.