Enable Swap Status Streaming

stream::swap_status::enableAPI-v2stream::swap_status::enable

Using this method, you can enable the swap status stream.

Request Parameters

Parameter Type Required Description
client_id integer This ID can be used to access data (e.g. via http://localhost:7783/event-stream?id=1)

Response Parameters

Parameter Type Required Description
streamer_id string An identifier for the data stream. This can be used later to disable streaming for the event with stream::disable.

📌 Examples

POST swap_status_enable
{
  "userpass": "RPC_UserP@SSW0RD",
  "method": "stream::swap_status::enable",
  "mmrpc": "2.0",
  "params": {
    "client_id": 1
  }
}
Show Response
{
  "mmrpc": "2.0",
  "result": {
      "streamer_id": "SWAP_STATUS"
  },
  "id": null
}

Here is an example of the stream data you should be able to see in http://localhost:7783/event-stream?id=1 for each swap status updated event:

data: {"_type":"SWAP_STATUS","message":{"swap_type":"TakerV1","swap_data":{"uuid":"4bfe3af7-dd62-4dbe-9c16-68697c4aa24d","event":{"timestamp":1746432461259,"event":{"type":"TakerPaymentInstructionsReceived","data":null}}}}}

Error Types

Parameter Type Required Description
UnknownClient string No client has an open connection using this client_id
ClientAlreadyListening string The requested events are already being sent to the client_id
Show Error Responses
Error Response (Unknown Client)
{
    "mmrpc": "2.0",
    "error": "UnknownClient",
    "error_path": "swaps",
    "error_trace": "swaps:32]",
    "error_type": "EnableError",
    "error_data": "UnknownClient",
    "id": null
}
Error (Client Already Listening)
{
    "mmrpc": "2.0",
    "error": "ClientAlreadyListening",
    "error_path": "swaps",
    "error_trace": "swaps:32]",
    "error_type": "EnableError",
    "error_data": "ClientAlreadyListening",
    "id": null
}