trade
The current channel's roster, chat and any open trade window.
A cached snapshot with a `rev` that increases on every change, so a poller can tell a new state from a repeat. Over the WebSocket the same snapshot arrives unasked on the `trade` channel — polling this is the REST equivalent.
In Trading.
Request
POST /api/v1/sessions/{accountKey}/actions/trade
Takes no arguments.
Response
The whole trading-post snapshot: channel, roster, chat, pending requests and the trade window.
| Field | Type | Meaning |
|---|---|---|
rev | integer | Increases on every change. Unchanged means nothing happened. |
now | integer | The server's clock, so `seenAt` durations can be rendered without local skew. |
traders[].isNew | boolean | Joined in the last few moments — worth badging. |
chats[].pieces | array | A message is a list of pieces: text, and linked items with their stats. |
incoming | object|null | A trade request someone sent you, for `tradeAnswer`. |
trading | object|null | The open trade window: both sides' items and ready state. |
Example response
{
"rev": 214,
"now": 1755734412,
"joined": true,
"channelIndex": 1,
"channelName": "Trade 1",
"isTrader": true,
"channels": [ { "index": 1, "channelName": "Trade 1", "memberCount": 42 } ],
"traders": [
{ "accountId": "acc-5", "characterId": "char-5", "characterClass": "Wizard",
"level": 20, "name": "Eve", "fame": 3, "karma": 0, "isNew": true, "seenAt": 1755734402 }
],
"chats": [
{ "index": 7, "time": "12:00", "accountId": "acc-6", "name": "Frank",
"pieces": [
{ "kind": "text", "text": "WTS" },
{ "kind": "item", "label": "Adventurer Boots", "rarity": "Legendary",
"props": ["PhysWpnDmg+60", "MoveSpeed-50"] },
{ "kind": "text", "text": "cheap" }
] }
],
"incoming": null,
"outgoing": null,
"trading": null,
"notice": null
}
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.