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.
Structure | Type | Description |
---|---|---|
mmrpc | string | the string specifying the version of the Komodo DeFi SDK RPC protocol. Must be exactly "2.0" |
userpass | string (optional) | your password for protected RPC methods. Skip this field if the specified method is public |
method | string | the name of the method to be invoked |
params | object (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 |
id | number (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 |
Structure | Type | Description |
---|---|---|
mmrpc | string | the string specifying the version of the Komodo DeFi SDK RPC protocol |
result | object | the value of this field is determined by the method invoked on Komodo DeFi SDK |
id | number (optional) | the identifier established by the client. The same value as in the Request if it was passed |
Structure | Type | Description |
---|---|---|
mmrpc | string | the string specifying the version of the AtomicDEX API RPC protocol |
error | string | the common error description |
error_path | string | the error path consisting of file names separated by a dot similar to JSON path notation |
error_trace | string | the error path consisting of file and line number pairs separated by ']' |
error_type | string | the string error identifier used to determine the cause of the error |
error_data | object | an object containing the error data of the corresponding error_type |
id | number (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
}