DASH
POST
GET
Last updated on January 1, 1970
2 min read
Method setban undefined ()
connect with JSON-RPC protocol
setban
Method not allowed
Attempts to add or remove a IP/Subnet from the banned list.
Parameters
IP(/Netmask)
- string
The node to add or remove as a string in the form of IP_address.
The IP address may be a hostname resolvable through DNS, an IPv4 address, an IPv4-as-IPv6 address, or an IPv6 address.
command
- string
What to do with the IP/Subnet address above.
Options are:
- add to add a node to the addnode list
- remove to remove a node from the list. If currently connected, this will disconnect immediately
Bantime
- numeric (int)
Optional.
Time in seconds how long (or until when if absolute is set) the entry is banned. The default is 24h which can also be overwritten by the -bantime startup argument.
Absolute
- bool
Optional.
If set, the bantime must be a absolute timestamp in seconds since epoch (Jan 1 1970 GMT)
Request
curl --location --request POST 'https://dash.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"
}
Start Building with GetBlock RPCs for Free
Previous
{ "overview": "Overview", "guides": "Guides", "get-started": "Get Started", "rpc-service": "Nodes Methods", "getblock-explorer": "Explorer API", "getblock-tracker": "Tracker API", "nodes-endpoints": "Nodes Endpoints" }
Next
{ "overview": "Overview", "guides": "Guides", "get-started": "Get Started", "rpc-service": "Nodes Methods", "getblock-explorer": "Explorer API", "getblock-tracker": "Tracker API", "nodes-endpoints": "Nodes Endpoints" }