tradingItem
Add or remove an item from the open trade window.
Changing what is on offer clears both sides' ready state, which is the game's own rule — nobody can slip an item out after the other side has confirmed. The window's new contents arrive on the `trade` snapshot.
In Trading.
Request
POST /api/v1/sessions/{accountKey}/actions/tradingItem
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
uniqueId (unique_id) | string | yes | The item, from `tradables`. |
updateFlag (update_flag) | integer | yes | 1 to add, 2 to remove. |
slotId | integer | no | Where to place it in the window; assigned for you when omitted. |
Example request
{ "uniqueId": "630211546215118851", "updateFlag": 1, "slotId": 0 }
Response
`{ ok: true }`; read the window back from `trade.trading`.
Example response
{ "ok": true }
Errors
| Code | When |
|---|---|
action_failed | No trade window is open, or the item is not tradable. |
plan_limit | Not on the free plan. |
See also
DarkerAPI is an independent project. It is not affiliated with, endorsed by or associated with IRONMACE Co., Ltd. or Valve Corporation. “Dark and Darker” and related marks belong to their respective owners.