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` No
__v `integer null` No
itemCode `string null` No
price `number null` No
quantity `integer null` No
sellerId `string null` No
countryId `string null` No
regionId `string null` No
createdAt `string null` No
offerAt `string null` No
type `string null` No
user `string null` No

.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` No
__v `integer null` No
itemCode `string null` No
price `number null` No
quantity `integer null` No
countryId `string null` No
updatedAt `string null` No

.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` No
__v `integer null` No
itemCode `string null` No
price `number null` No
quantity `integer null` No
countryId `string null` No
updatedAt `string null` No

.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` No
__v `integer null` No
itemCode `string null` No
price `number null` No
quantity `integer null` No
orderType `string null` No
country `string null` No
countryId `string null` No
userId `string null` No
createdAt `string null` No
expiresAt `string null` No
offerAt `string null` No
type `string null` No
user `string null` No

.invalidate_cache()

Clear the SWR cache for all resources.

Signature

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

Clone this wiki locally