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

NameTypeRequiredDescription
accountId (account_id)stringyesTheir account id, from the `trade` roster.
characterId (character_id)stringnoTheir 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.

FieldTypeMeaning
notFoundbooleanOn failure only. The player is not in this channel any more.

Example response

{ "ok": true }

Errors

CodeWhen
action_failedThey are not in this channel, or no character is in the lobby.
plan_limitNot 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.