tradeRequest
Ask a player to open a trade window.
The reply only says the request was sent — their answer arrives later on the `trade` snapshot as `outgoing.state`. The target must be in your current channel; a request to someone who has left is refused with `notFound`.
In Trading.
Request
POST /api/v1/sessions/{accountKey}/actions/tradeRequest
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
accountId (account_id) | string | yes | Their account id, from the `trade` roster. |
characterId (character_id) | string | no | Their character id, when known. Looked up from the roster otherwise. |
Example request
{ "accountId": "acc-5", "characterId": "char-5" }
Response
`{ ok: true }`; watch `trade.outgoing` for the answer.
| Field | Type | Meaning |
|---|---|---|
notFound | boolean | On failure only. The player is not in this channel any more. |
Example response
{ "ok": true }
Errors
| Code | When |
|---|---|
action_failed | They are not in this channel, or no character is in the lobby. |
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.