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 Optional
__v integer Optional
itemCode string Optional The item code.
price number Optional The price.
quantity integer Optional The quantity.
sellerId string Optional The seller id.
countryId string Optional The country id.
regionId string Optional The region id.
createdAt string Optional The timestamp when this record was created.
offerAt string Optional The offer at.
type string Optional The type.
user string Optional The user.

.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 Optional
__v integer Optional
itemCode string Optional The item code.
price number Optional The price.
quantity integer Optional The quantity.
countryId string Optional The country id.
updatedAt string Optional The timestamp when this record was last modified.

.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 Optional
__v integer Optional
itemCode string Optional The item code.
price number Optional The price.
quantity integer Optional The quantity.
countryId string Optional The country id.
updatedAt string Optional The timestamp when this record was last modified.

.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 Optional
__v integer Optional
itemCode string Optional The item code.
price number Optional The price.
quantity integer Optional The quantity.
orderType string Optional The order type.
country string Optional The UUID of the country this user holds citizenship in.
countryId string Optional The country id.
userId string Optional The user id.
createdAt string Optional The timestamp when this record was created.
expiresAt string Optional The expires at.
offerAt string Optional The offer at.
type string Optional The type.
user string Optional The user.

.invalidate_cache()

Clear the SWR cache for all resources.

Signature

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

Clone this wiki locally