Chia RPC (2.3.0)

Download OpenAPI specification:Download

The Chia node and services come with a JSON RPC API server that allows you to access information and control the services. These are accessible via HTTPS, WebSockets, or via client SDKs. The ports can be configured in ~/.chia/mainnet/config/config.yaml. The RPC ports should not be exposed to the internet. TLS certificates are used to secure the communication using mutualTLS. The farmer uses port 8559 by default.

Shared

Methods shared by all services.

Stop the node.

Stop the node.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Empty request body

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true,
  • "error": "string"
}

Add a connection to another node.

Add a connection to another node.

Authorizations:
bearerAuth
Request Body schema: application/json
required

the address of the connection

ip
required
string <ipaddress>
port
required
integer

Responses

Request samples

Content type
application/json
{
  • "ip": "string",
  • "port": 0
}

Response samples

Content type
application/json
{
  • "success": true,
  • "error": "string"
}

Removes a connection.

Removes a connection.

Authorizations:
bearerAuth
Request Body schema: application/json
required

the node id of the connection

node_id
required
string

Responses

Request samples

Content type
application/json
{
  • "node_id": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "error": "string"
}

Retrieve the list of connections.

Retrieve the list of connections.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Empty request body

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "connections": [
    ],
  • "success": true,
  • "error": "string"
}

Heartbeat.

Heartbeat.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Empty request body

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true,
  • "error": "string"
}

Retrieve the list of routes exposed by the service.

Retrieve the list of routes/endpoints exposed by the service.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Empty request body

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "routes": [
    ],
  • "success": true,
  • "error": "string"
}

Retrieves some information about the current network.

Retrieves some information about the current network.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Empty request body

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "network_name": "mainnet",
  • "network_prefix": "xch",
  • "success": true,
  • "error": "string"
}

Farmer

The farmer RPC API is exposed, by default, on port 8559 and contains methods for managing the farmer.

Set the farm and pool reward targets.

Set the farm and pool reward targets.

Authorizations:
bearerAuth
Request Body schema: application/json
required

The updated targets

farmer_target
string
pool_target
string

Responses

Request samples

Content type
application/json
{
  • "farmer_target": "string",
  • "pool_target": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "error": "string"
}

Get the farm and pool reward targets.

Get the farm and pool reward targets.

Authorizations:
bearerAuth
Request Body schema: application/json
required

indicator of whether to include private keys in the search

search_for_private_key
required
boolean
max_ph_to_search
integer <int32>
Default: 500

Responses

Request samples

Content type
application/json
{
  • "search_for_private_key": true,
  • "max_ph_to_search": 500
}

Response samples

Content type
application/json
{
  • "farmer_target": "string",
  • "pool_target": "string",
  • "have_farmer_sk": true,
  • "have_pool_sk": true,
  • "success": true,
  • "error": "string"
}

Get the list of harvesters.

Get the list of harvesters.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Empty request body

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "harvesters": [
    ],
  • "success": true,
  • "error": "string"
}

Get a summary of harvesters.

Get a summary of harvesters, similar to get_harvests but with plot counts only.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Empty request body

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "harvesters": [
    ],
  • "success": true,
  • "error": "string"
}

Get a paginated list of valid plots.

Get a paginated list of valid plots.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Search filter parameters

node_id
string <hex>
page
integer <int32>
page_size
integer <int32>
Array of objects (filter_item)
sort_key
string
Default: "filename"
reverse
boolean

Responses

Request samples

Content type
application/json
{
  • "node_id": "string",
  • "page": 0,
  • "page_size": 0,
  • "filter": [
    ],
  • "sort_key": "filename",
  • "reverse": true
}

Response samples

Content type
application/json
{
  • "node_id": "string",
  • "page": 0,
  • "page_count": 0,
  • "total_count": 0,
  • "plots": [
    ],
  • "success": true,
  • "error": "string"
}

Get a paginated list of invalid plots.

Get a paginated list of invalid plots.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Search filter parameters

node_id
string <hex>
page
integer <int32>
page_size
integer <int32>
filter
Array of strings
reverse
boolean

Responses

Request samples

Content type
application/json
{
  • "node_id": "string",
  • "page": 0,
  • "page_size": 0,
  • "filter": [
    ],
  • "reverse": true
}

Response samples

Content type
application/json
{
  • "node_id": "string",
  • "page": 0,
  • "page_count": 0,
  • "total_count": 0,
  • "plots": [
    ],
  • "success": true,
  • "error": "string"
}

Get a paginated list of plots with missing keys.

Get a paginated list of invalid plots with missing keys.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Search filter parameters

node_id
string <hex>
page
integer <int32>
page_size
integer <int32>
filter
Array of strings
reverse
boolean

Responses

Request samples

Content type
application/json
{
  • "node_id": "string",
  • "page": 0,
  • "page_size": 0,
  • "filter": [
    ],
  • "reverse": true
}

Response samples

Content type
application/json
{
  • "node_id": "string",
  • "page": 0,
  • "page_count": 0,
  • "total_count": 0,
  • "plots": [
    ],
  • "success": true,
  • "error": "string"
}

Get a paginated list of duplicate plots.

Get a paginated list of duplicate plots.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Search filter parameters

node_id
string <hex>
page
integer <int32>
page_size
integer <int32>
filter
Array of strings
reverse
boolean

Responses

Request samples

Content type
application/json
{
  • "node_id": "string",
  • "page": 0,
  • "page_size": 0,
  • "filter": [
    ],
  • "reverse": true
}

Response samples

Content type
application/json
{
  • "node_id": "string",
  • "page": 0,
  • "page_count": 0,
  • "total_count": 0,
  • "plots": [
    ],
  • "success": true,
  • "error": "string"
}

Get's the state of the pool.

Get's the state of the pool.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Empty request body

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "pool_state": {
    },
  • "success": true,
  • "error": "string"
}

Set's a pool's payout instructions.

Set's a pool's payout instructions.

Authorizations:
bearerAuth
Request Body schema: application/json
required

The id of the pool launcher and payout instructions

launcher_id
required
string
payout_instructions
required
string

Responses

Request samples

Content type
application/json
{
  • "launcher_id": "string",
  • "payout_instructions": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "error": "string"
}

Get's a signage point by hash.

Get's a signage point by hash.

Authorizations:
bearerAuth
Request Body schema: application/json
required

The signage point hash

sp_hash
required
string

Responses

Request samples

Content type
application/json
{
  • "sp_hash": "string"
}

Response samples

Content type
application/json
{
  • "signage_point": {
    },
  • "proofs": [
    ],
  • "success": true,
  • "error": "string"
}

Get signage points.

Get signage points.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Empty request body

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "signage_points": [
    ],
  • "success": true,
  • "error": "string"
}