latest contributor to this doc

Last Edit: @smk762 ,

Komodo DeFi SDK RPC Protocol v2.0

Starting with version beta-2.1.3434, the Komodo DeFi SDK supports the standardized protocol format called mmrpc 2.0.

It includes a uniform request, successful and error response formats. At the moment, only a few RPC methods support the mmrpc 2.0 protocol.

StructureTypeDescription
mmrpcstringthe string specifying the version of the Komodo DeFi SDK RPC protocol. Must be exactly "2.0"
userpassstring (optional)your password for protected RPC methods. Skip this field if the specified method is public
methodstringthe name of the method to be invoked
paramsobject (optional)a structured value that holds the parameter values to be used during the invocation of the method. This field may be omitted if the method doesn't take arguments
idnumber (optional)the identifier is established by the client. Komodo DeFi SDK will reply with the same value in the Response object if the id field is included and not NULL

StructureTypeDescription
mmrpcstringthe string specifying the version of the Komodo DeFi SDK RPC protocol
resultobjectthe value of this field is determined by the method invoked on Komodo DeFi SDK
idnumber (optional)the identifier established by the client. The same value as in the Request if it was passed

StructureTypeDescription
mmrpcstringthe string specifying the version of the AtomicDEX API RPC protocol
errorstringthe common error description
error_pathstringthe error path consisting of file names separated by a dot similar to JSON path notation
error_tracestringthe error path consisting of file and line number pairs separated by ']'
error_typestringthe string error identifier used to determine the cause of the error
error_dataobjectan object containing the error data of the corresponding error_type
idnumber (optional)the identifier established by the client. The same value as in the Request if it was passed

POST
withdraw
{
  "mmrpc": "2.0",
  "userpass": "testpsw",
  "method": "withdraw",
  "params": {
    "coin": "KMD",
    "to": "RJTYiYeJ8eVvJ53n2YbrVmxWNNMVZjDGLh",
    "amount": "10"
  },
  "id": 0
}