On this page

latest contributor to this doc

Last Edit:

@komodoplatform

ban_pubkey

ban_pubkey pubkey reason

The ban_pubkey method bans the selected pubkey ignoring its order matching messages and preventing its orders from displaying in the orderbook.

Use the secp256k1 pubkey without prefix for this method input. E.g. if pubkey is 022cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420 you should submit 2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420.

Parameter* = requiredTypeDescription
pubkey*
string
The secp256k1 pubkey (without prefix) to ban
duration_min
integer (minutes)
Optional. Duration of the ban in minutes. If omitted, ban persists until the node restarts
reason
string
Optional. Human-readable reason for banning

Parameter* = requiredTypeDescription
result*
string
Indicates whether the ban was successful

POST
ban_pubkey
{
  "duration_min": 15,
  "method": "ban_pubkey",
  "pubkey": "2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420",
  "reason": "Being a naughty boy",
  "userpass": "RPC_UserP@SSW0RD"
}

Response (Success)

SUCCESS
{
  "result": "success"
}

Response (Error (already banned))

ERROR
{
  "error": "rpc:208] dispatcher_legacy:160] pubkey_banning:58] Pubkey is banned already"
}

Response (Error (invalid pubkey))

ERROR
{
  "error": "rpc:184] dispatcher_legacy:140] pubkey_banning:63] invalid value: string \\\"2102f7597468703c1c5c8465dd6d43acaae697df9df30bed21494d193412a1ea193eac\\\", expected a hash string"
}