Skip to content

Resource ItemTradingResource

CrucifiedPain edited this page Jun 26, 2026 · 9 revisions

ItemTradingResource (client.item_trading)

Endpoints: • itemTrading.getPrices • tradingOrder.getTopOrders • tradingOrder.getPublicOrdersByOwner • itemOffer.getById

.get_offer()

Get a specific item market offer by ID.

Signature

await client.itemtrading.get_offer(item_offer_id: 'str') -> 'ItemOffer'

Parameters

Name Type Default
item_offer_id str *Required*

Return Models

ItemOffer

Field Type Required Description
_id string \| null
__v integer \| null
itemCode string \| null
price number \| null
quantity integer \| null
sellerId string \| null
countryId string \| null
regionId string \| null
createdAt string \| null
offerAt string \| null
type string \| null
user string \| null

.get_price()

Client-side helper: get the price for a single item.

Signature

await client.itemtrading.get_price(item_code: 'str') -> 'ItemPrice | None'

Parameters

Name Type Default
item_code str *Required*

Return Models

ItemPrice

Field Type Required Description
_id string \| null
__v integer \| null
itemCode string \| null
price number \| null
quantity integer \| null
countryId string \| null
updatedAt string \| null

.get_prices()

Get current market prices for all items. Returns a dict keyed by item code.

Signature

await client.itemtrading.get_prices() -> 'dict[str, ItemPrice]'

Return Models

ItemPrice

Field Type Required Description
_id string \| null
__v integer \| null
itemCode string \| null
price number \| null
quantity integer \| null
countryId string \| null
updatedAt string \| null

.get_public_orders_by_owner()

Get all public trading orders for a country's market, grouped by buy/sell and with aggregated statistics.

Args: country_id: The country whose public market orders to fetch.

Returns: A :class:PublicOrdersSummary containing buy orders, sell orders, combined orders, total invested currency, and per-item sell quantities.

Signature

await client.itemtrading.get_public_orders_by_owner(country_id: 'str') -> 'PublicOrdersSummary'

Parameters

Name Type Default
country_id str *Required*

.get_top_orders()

Get the best buy/sell orders for a given item.

Signature

await client.itemtrading.get_top_orders(item_code: 'str', *, limit: 'int' = 10) -> 'list[TradingOrder]'

Parameters

Name Type Default
item_code str *Required*
limit int 10

Return Models

TradingOrder

Field Type Required Description
_id string \| null
__v integer \| null
itemCode string \| null
price number \| null
quantity integer \| null
orderType string \| null
country string \| null
countryId string \| null
userId string \| null
createdAt string \| null
expiresAt string \| null
offerAt string \| null
type string \| null
user string \| null

.invalidate_cache()

Clear the SWR cache for all resources.

Signature

await client.itemtrading.invalidate_cache() -> 'None'

Clone this wiki locally