Disable Streaming#
stream::disableAPI-v2stream::disable#
Using this method, you can disable specific streaming events.
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) |
| streamer_id | string |
✓
| An identifier for the data stream to disable. |
Response Parameters#
| Parameter | Type | Required | Description |
| result | string |
–
| Success message confirming the stream was disabled |
📌 Examples#
{
"userpass": "RPC_UserP@SSW0RD",
"method": "stream::disable",
"mmrpc": "2.0",
"params": {
"client_id": 1,
"streamer_id": "BALANCE:MATIC"
}
}
curl --url "http://127.0.0.1:7783" --data '{
"userpass": "RPC_UserP@SSW0RD",
"method": "stream::disable",
"mmrpc": "2.0",
"params": {
"client_id": 1,
"streamer_id": "BALANCE:MATIC"
}
}'
import requests
import json
url = "http://127.0.0.1:7783"
payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "stream::disable",
"mmrpc": "2.0",
"params": {
"client_id": 1,
"streamer_id": "BALANCE:MATIC"
}
}
response = requests.post(url, json=payload)
print(json.dumps(response.json(), indent=2))
const payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "stream::disable",
"mmrpc": "2.0",
"params": {
"client_id": 1,
"streamer_id": "BALANCE:MATIC"
}
};
const response = await fetch("http://127.0.0.1:7783", {
method: "POST",
body: JSON.stringify(payload),
});
console.log(await response.json());
<?php
$payload = <<<'JSON'
{
"userpass": "RPC_UserP@SSW0RD",
"method": "stream::disable",
"mmrpc": "2.0",
"params": {
"client_id": 1,
"streamer_id": "BALANCE:MATIC"
}
}
JSON;
$ch = curl_init("http://127.0.0.1:7783");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{"userpass":"RPC_UserP@SSW0RD","method":"stream::disable","mmrpc":"2.0","params":{"client_id":1,"streamer_id":"BALANCE:MATIC"}}`)
resp, err := http.Post("http://127.0.0.1:7783", "application/json", bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
require 'net/http'
require 'json'
require 'uri'
uri = URI("http://127.0.0.1:7783")
payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "stream::disable",
"mmrpc": "2.0",
"params": {
"client_id": 1,
"streamer_id": "BALANCE:MATIC"
}
}
response = Net::HTTP.post(uri, payload.to_json, 'Content-Type' => 'application/json')
puts JSON.pretty_generate(JSON.parse(response.body))
Show Response
{
"mmrpc": "2.0",
"result": {
"result": "Success"
},
"id": null
}
Error Types#
| Parameter | Type | Required | Description |
| StreamerNotFound | string |
–
| The specified streamer_id was not found |
| UnknownClient | string |
–
| No client has an open connection using this client_id |
Show Error Responses
Error Response (Streamer Not Found)#
{
"mmrpc": "2.0",
"error": "StreamerNotFound",
"error_path": "disable",
"error_trace": "disable:48]",
"error_type": "DisableError",
"error_data": "StreamerNotFound",
"id": null
}
Error (Unknown Client)#
{
"mmrpc": "2.0",
"error": "UnknownClient",
"error_path": "disable",
"error_trace": "disable:48]",
"error_type": "DisableError",
"error_data": "UnknownClient",
"id": null
}