📝 Share Your Feedback on Twitter and Claim 1M Free GetBlock Requests

bsv
Bitcoin-SV (BSV)

Method: POST setban

dropdown

方法 RPC setban 例如 Bitcoin-SV (BSV)

POST setban

方法不允许

尝试从禁止列表中添加或删除 IP/子网。

Parameters

subnet - 字符串,必填

带有可选网络掩码的 IP/子网(请参阅节点 IP 的 getpeerinfo)(默认为 /32 = 单个 IP)

command - 字符串,必填

‘add’将IP/子网添加到列表中,‘remove’从列表中删除IP/子网

bantime - 数字,可选,默认=0

时间以秒为单位多长时间(或直到设置 [absolute] 时)IP 被禁止(0 或空表示使用默认时间 24 小时,也可以被 -bantime 启动参数覆盖)

absolute - 布尔值,可选,默认=false

如果设置,bantime 必须是一个以 UNIX 纪元时间表示的绝对时间戳)

Request

curl --location --request POST 'https://bsv.getblock.io/mainnet/' 
--header 'x-api-key: YOUR-API-KEY' 
--header 'Content-Type: application/json' 
--data-raw '{"jsonrpc": "2.0",
"method": "setban",
"params": [null, null, null, null],
"id": "getblock.io"}'


Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}