Skip to content

Resource TransactionResource

CrucifiedPain edited this page Jun 26, 2026 · 10 revisions

TransactionResource (client.transaction)

Endpoints: • transaction.getPaginatedTransactions (cursor-paginated)

.collect_all()

Fetch all transactions back to oldest_date using parallel time-slicing. By forging synthetic cursors for intermediate dates, this method bypasses the sequential dependency of cursor pagination and allows fetching chunks concurrently. Because the chunks are fetched concurrently, the underlying HTTP client will automatically batch them into single POST requests.

Signature

await client.transaction.collect_all(*, oldest_date: 'datetime | str', limit: 'int' = 100, user_id: 'str | None' = None, mu_id: 'str | None' = None, country_id: 'str | None' = None, party_id: 'str | None' = None, item_code: 'str | None' = None, transaction_type: 'TransactionType | str | list[TransactionType | str] | None' = None, time_slice_days: 'float' = 0.2, concurrency: 'int' = 500) -> 'list[Transaction]'

Parameters

Name Type Default
oldest_date `datetime str`
limit int 100
user_id `str None`
mu_id `str None`
country_id `str None`
party_id `str None`
item_code `str None`
transaction_type `TransactionType str
time_slice_days float 0.2
concurrency int 500

Return Models

Equipment

A single equipped item returned by inventory.fetchCurrentEquipment.

The API returns one object keyed by slot (weapon, helmet, ...); the resource flattens it into a list of Equipment with slot set.

Field Type Required Description
_id `string null` No
__v `integer null` No
slot `string null` No
itemId `string null` No
itemCode `string null` No
name `string null` No
rarity `string null` No
stats `object null` No
type `string null` No
code `string null` No
skills `EquipmentSkills null` No
state `number null` No
maxState `number null` No
quantity `integer null` No
lastAcquisitionAt `string null` No

EquipmentSkills

Stat bonuses granted by an equipped item.

Field Type Required Description
_id `string null` No
__v `integer null` No
attack `number null` No
armor `number null` No
criticalChance `number null` No
criticalDamages `number null` No
dodge `number null` No
precision `number null` No

Transaction

Field Type Required Description
_id `string null` No
__v `integer null` No
transactionType `string null` No
money `number null` No
quantity `integer null` No
sellerId `string null` No
buyerId `string null` No
itemCode `string null` No
item `Equipment null` No
offerCreatedAt `string null` No
userId `string null` No
muId `string null` No
countryId `string null` No
partyId `string null` No
createdAt `string null` No
updatedAt `string null` No

.get_paginated()

Get paginated transactions with optional filters.

transaction_type uniquely accepts a single type string OR a list — both are valid per the API schema. When a list is passed it is serialised as-is.

Signature

await client.transaction.get_paginated(*, limit: 'int' = 10, cursor: 'str | None' = None, user_id: 'str | None' = None, mu_id: 'str | None' = None, country_id: 'str | None' = None, party_id: 'str | None' = None, item_code: 'str | None' = None, transaction_type: 'TransactionType | str | list[TransactionType | str] | None' = None, auto_items: 'bool' = False, max_pages: 'int | float' = inf, cursor_end: 'str | None' = None) -> 'CursorPage[Transaction] | AsyncIterator[Transaction]'

Parameters

Name Type Default
limit int 10
cursor `str None`
user_id `str None`
mu_id `str None`
country_id `str None`
party_id `str None`
item_code `str None`
transaction_type `TransactionType str
auto_items bool False
max_pages `int float`
cursor_end `str None`

Return Models

CursorPage[Transaction]

Field Type Required Description
_id `string null` No
__v `integer null` No
items array Yes
nextCursor `string null` No
hasMore boolean No

Equipment

A single equipped item returned by inventory.fetchCurrentEquipment.

The API returns one object keyed by slot (weapon, helmet, ...); the resource flattens it into a list of Equipment with slot set.

Field Type Required Description
_id `string null` No
__v `integer null` No
slot `string null` No
itemId `string null` No
itemCode `string null` No
name `string null` No
rarity `string null` No
stats `object null` No
type `string null` No
code `string null` No
skills `EquipmentSkills null` No
state `number null` No
maxState `number null` No
quantity `integer null` No
lastAcquisitionAt `string null` No

EquipmentSkills

Stat bonuses granted by an equipped item.

Field Type Required Description
_id `string null` No
__v `integer null` No
attack `number null` No
armor `number null` No
criticalChance `number null` No
criticalDamages `number null` No
dodge `number null` No
precision `number null` No

Transaction

Field Type Required Description
_id `string null` No
__v `integer null` No
transactionType `string null` No
money `number null` No
quantity `integer null` No
sellerId `string null` No
buyerId `string null` No
itemCode `string null` No
item `Equipment null` No
offerCreatedAt `string null` No
userId `string null` No
muId `string null` No
countryId `string null` No
partyId `string null` No
createdAt `string null` No
updatedAt `string null` No

.invalidate_cache()

Clear the SWR cache for all resources.

Signature

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

Clone this wiki locally