list_banned_pubkeys
list_banned_pubkeys
The list_banned_pubkeys method returns a list of public keys of nodes that are banned from interacting with the node executing the method.
Banned nodes cannot complete orders and order matching requests with the node executing the method.
Arguments
| Structure | Type | Description |
|---|---|---|
| (none) |
Response
| Structure | Type | Description |
|---|---|---|
| result | map of objects (key - pubkey in hexadecimal representation) | the list of pubkeys banned by current node |
| result.*.type | string | the type of the ban; possible values: Manual or FailedSwap |
| result.*.caused_by_swap | string (optional) | the uuid of the swap that triggered the ban; present only for the FailedSwap type |
| result.*.caused_by_event | object (optional) | the swap event that triggered the ban; present only for the FailedSwap type |
| result.*.reason | string (optional) | the reason for the Manual ban |
📌 Examples
Command
POST list_banned_pubkeys
{
"userpass": "RPC_UserP@SSW0RD",
"method": "list_banned_pubkeys"
} curl --url "http://127.0.0.1:7783" --data '{
"userpass": "RPC_UserP@SSW0RD",
"method": "list_banned_pubkeys"
}' import requests
import json
url = "http://127.0.0.1:7783"
payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "list_banned_pubkeys"
}
response = requests.post(url, json=payload)
print(json.dumps(response.json(), indent=2)) const payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "list_banned_pubkeys"
};
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": "list_banned_pubkeys"
}
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":"list_banned_pubkeys"}`)
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": "list_banned_pubkeys"
}
response = Net::HTTP.post(uri, payload.to_json, 'Content-Type' => 'application/json')
puts JSON.pretty_generate(JSON.parse(response.body)) Show Response
Response
{
"result": {
"15d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732": {
"type": "FailedSwap",
"caused_by_event": {
"event": {
"data": {
"error": "taker_swap:547] \"taker_swap:543] timeout (180.0 > 180.0)\""
},
"type": "NegotiateFailed"
},
"type": "Taker"
},
"caused_by_swap": "e8400870-e85a-42af-bb4f-9658ac86ffdf"
},
"15d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044730": {
"type": "Manual",
"reason": "Being Australian"
}
}
}