Skip to main content

Protocol

Changelly API uses JSON-RPC 2.0 protocol.

Request body

NameTypeRequiredDescription
jsonrpcstringtrueJSON-RPC version.
idstringtrueClient's custom ID.
methodstringtrueAPI method name.
paramsobject / array of objectstrueRequest parameters.

The content and the type of the params parameter depend on the method.

Sample request body
{
"jsonrpc": "2.0",
"id": "test",
"method": "getStatus",
"params": {
"id": "pgj********2minj"
}
}

Response body

NameTypeDescription
jsonrpcstringJSON-RPC version.
idstringClient's custom ID.
resultstring / array of strings
object / array of objects
API response.

id used is a custom ID generated at the client side to distinguish responses. You may use any value you want.

The content and the type of the params parameter depend on the method.

Sample response body
{
"jsonrpc": "2.0",
"id": "test",
"result": "waiting"
}