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 daemon uses port 55400 by default.

Daemon

The daemon interface is exposed on port 55400 by default and uses WebSockets only. It can be used to interact with other service endpoints.

Registers this daemon to receive messages.

Registers this daemon to receive messages. This is needed to receive responses from services other than the daemon.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Request body with the name of a service

service
required
string

Responses

Request samples

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

Response samples

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

Starts the named service.

Starts the named service.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Request body with the name of a service

service
required
string

Responses

Request samples

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

Response samples

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

Stops the named service.

Stops the named service.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Request body with the name of a service

service
required
string

Responses

Request samples

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

Response samples

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

Ping the daemon.

Ping the daemon.

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"
}

Tells the daemon at the RPC endpoint to exit.

Tells the daemon at the RPC endpoint to exit. There isn't a way to start the daemon remotely via RPC, so take care that you have access to the RPC host if needed.

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"
}

Determines if the named service is running.

Determines if the named service is running.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Request body with the name of a service

service
required
string

Responses

Request samples

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

Response samples

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

Get the installed version of chia at the endpoint.

Get the installed version of chia at the endpoint.

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
{
  • "version": "string",
  • "success": true,
  • "error": "string"
}

Indicator if the genesis block is initialized.

Indicator if the genesis block is initialized.

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
{
  • "genesis_initialized": true,
  • "success": true,
  • "error": "string"
}

Returns the list of running services.

Returns the list of running services.

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
{
  • "running_services": [
    ],
  • "success": true,
  • "error": "string"
}

Returns the list of addresses.

Returns the list of addresses.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Input parameters

fingerprints
Array of integers <uint32> [ items <uint32 > ]
index
integer <uint32>
count
integer <uint32>
non_observer_derivation
boolean
Default: false

Responses

Request samples

Content type
application/json
{
  • "fingerprints": [
    ],
  • "index": 0,
  • "count": 0,
  • "non_observer_derivation": false
}

Response samples

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

Key Ring

Methods for managing keys and the keyring.

Returns whether the keyring is in a locked state.

Returns whether the keyring is in a locked state. If the keyring doesn't have a master passphrase set, or if a master passphrase is set and the cached passphrase is valid, the keyring is "unlocked".

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
{
  • "is_keyring_locked": true,
  • "success": true,
  • "error": "string"
}

Get detailed status of the key ring.

Get detailed status of the key ring.

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
{
  • "is_keyring_locked": true,
  • "passphrase_support_enabled": true,
  • "can_save_passphrase": true,
  • "user_passphrase_is_set": true,
  • "needs_migration": true,
  • "can_remove_legacy_keys": true,
  • "can_set_passphrase_hint": true,
  • "passphrase_hint": "string",
  • "passphrase_requirements": {
    },
  • "success": true,
  • "error": "string"
}

Unlock the keyring.

Unlock the keyring.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Key ring key

key
string

Responses

Request samples

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

Response samples

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

Test the validity of a passphrase.

Test the validity of a passphrase.

Authorizations:
bearerAuth
Request Body schema: application/json
required

The passphrase

key
string

Responses

Request samples

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

Response samples

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

Update the key ring passphrase.

Update the key ring passphrase.

Authorizations:
bearerAuth
Request Body schema: application/json
required

The passphrase options

current_passphrase
string
new_passphrase
required
string
passphrase_hint
string
save_passphrase
boolean
Default: false

Responses

Request samples

Content type
application/json
{
  • "current_passphrase": "string",
  • "new_passphrase": "string",
  • "passphrase_hint": "string",
  • "save_passphrase": false
}

Response samples

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

Remove the key ring passphrase.

Remove the key ring passphrase.

Authorizations:
bearerAuth
Request Body schema: application/json
required

The passphrase

current_passphrase
required
string

Responses

Request samples

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

Response samples

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

Adds a private key to the keychain.

Adds a private key to the keychain, with the given entropy and passphrase. The keychain itself will store the public key, and the entropy bytes, but not the passphrase.

Authorizations:
bearerAuth
Request Body schema: application/json
required

The private key

mnemonic
required
string
passphrase
required
string

Responses

Request samples

Content type
application/json
{
  • "mnemonic": "string",
  • "passphrase": "string"
}

Response samples

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

Check the keys.

Check the keys.

Authorizations:
bearerAuth
Request Body schema: application/json
required

The config root path

root_path
required
string

Responses

Request samples

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

Response samples

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

Deletes all keys from the keychain.

Deletes all keys from the keychain.

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"
}

Deletes all keys which have the given public key fingerprint.

Deletes all keys which have the given public key fingerprint.

Authorizations:
bearerAuth
Request Body schema: application/json
required

The fingerprint

fingerprint
required
integer <uint32>

Responses

Request samples

Content type
application/json
{
  • "fingerprint": 0
}

Response samples

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

Returns all private keys which can be retrieved, with the given passphrases.

Returns all private keys which can be retrieved, with the given passphrases. A tuple of key, and entropy bytes (i.e. mnemonic) is returned for each key.

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
{
  • "private_keys": [
    ],
  • "success": true,
  • "error": "string"
}

Returns the first key in the keychain.

Returns the first key in the keychain.

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
{
  • "pk": "string",
  • "entropy": "string",
  • "success": true,
  • "error": "string"
}

Locates and returns a private key matching the provided fingerprint.

Locates and returns a private key matching the provided fingerprint.

Authorizations:
bearerAuth
Request Body schema: application/json
required

The fingerprint

fingerprint
required
integer <uint32>

Responses

Request samples

Content type
application/json
{
  • "fingerprint": 0
}

Response samples

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

Locates and returns KeyData matching the provided fingerprint.

Locates and returns KeyData matching the provided fingerprint.

Authorizations:
bearerAuth
Request Body schema: application/json
required

The fingerprint

fingerprint
required
integer <uint32>
include_secrets
boolean
Default: false

Responses

Request samples

Content type
application/json
{
  • "fingerprint": 0,
  • "include_secrets": false
}

Response samples

Content type
application/json
{
  • "fingerprint": 2473794447,
  • "public_key": "0665913196501420c0fe2de6b5ce7b25f749d52dcbf997b069bb2ea8438c6c3c",
  • "label": "string",
  • "secrets": {
    },
  • "success": true,
  • "error": "string"
}

Returns the KeyData of all keys which can be retrieved.

Returns the KeyData of all keys which can be retrieved.

Authorizations:
bearerAuth
Request Body schema: application/json
required

The fingerprint

fingerprint
required
integer <uint32>
include_secrets
boolean
Default: false

Responses

Request samples

Content type
application/json
{
  • "fingerprint": 0,
  • "include_secrets": false
}

Response samples

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

Assigns the given label to the first key with the given fingerprint.

Assigns the given label to the first key with the given fingerprint.

Authorizations:
bearerAuth
Request Body schema: application/json
required

The fingerprint

fingerprint
required
integer <uint32>
label
required
string

Responses

Request samples

Content type
application/json
{
  • "fingerprint": 0,
  • "label": "string"
}

Response samples

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

Removes the label assigned to the key with the given fingerprint.

Removes the label assigned to the key with the given fingerprint.

Authorizations:
bearerAuth
Request Body schema: application/json
required

The fingerprint

fingerprint
required
integer <uint32>

Responses

Request samples

Content type
application/json
{
  • "fingerprint": 0
}

Response samples

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

Plotter

Methods for creating plots and managing plotters.

Get info about installed and installable plotters.

Get info about installed and installable plotters.

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
{
  • "plotters": {
    },
  • "success": true,
  • "error": "string"
}

Starts plotting.

Starts plotting. Returns after request is added to the plotting queue. Does not wait for plotting to finish.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Options for creating the plots

delay
integer <int32>

The number of seconds to delay before beginning the plotting.

parallel
boolean
Default: false
n
integer <int32>
Default: 1

The number of plots that will be made, in sequence.

k
integer (k_size)
Default: 32
Enum: 25 32 33 34 35

Defines the size of a plot. 25 is used for testing only. https://github.com/Chia-Network/chia-blockchain/wiki/k-sizes

queue
string
Default: "default"
t
string

Define the temporary directory for plot creation. This is where Plotting Phase 1 (Forward Propagation) and Phase 2 (Backpropagation) both occur. The -t dir requires the largest working space: normally about 2.5 times the size of the final plot.

t2
string

Define a secondary temporary directory for plot creation. This is where Plotting Phase 3 (Compression) and Phase 4 (Checkpoints) occur.

d
string

Define the final location for plot(s). Of course, -d should have enough free space as the final size of the plot. This directory is automatically added to your ~/.chia/VERSION/config/config.yaml file.

b
integer <int32>
Default: 4608

Define memory/RAM usage. Default is 4608 (4.6 GiB). More RAM will marginally increase speed of plot creation. Please bear in mind that this is what is allocated to the plotting algorithm alone. Code, container, libraries etc. will require additional RAM from your system.

u
integer <int32>
Default: 128

More buckets require less RAM but more random seeks to disk. With spinning disks you want less buckets and with NVMe more buckets. There is no significant benefit from using smaller buckets - just use 128

a
integer or null <uint32>

This is the key Fingerprint used to select both the Farmer and Pool Public Keys to use. Utilize this when you want to select one key out of several in your keychain.

c
string

The pool contract address.

p
string

This is your "Pool Public Key". Utilise this when you want to create plots on other machines for which you do not want to give full chia account access.

f
string

This is your "Farmer Public Key". Utilise this when you want to create plots on other machines for which you do not want to give full chia account access

memo
string
e
boolean
Default: false

Setting to true will disable the bitfield plotting algorithm, and revert back to the older b17 plotting style. After 1.0.4 it's better to use bitfield for most cases

r
integer <int32>
Default: 2

The number of threads to devote to each plot.

x
boolean
Default: false

Skips adding [final dir] to harvester for farming.

overrideK
boolean or null
Default: false

Only needed when k is set to 25

w
boolean or null
Default: false

BladeBit Only - warm start

m
boolean or null
Default: false

BladeBit Only - disable NUMA

K
boolean or null
Default: false

MadMax Only - note upper case - Thread multiplier for phase 2

G
boolean or null
Default: false

MadMax Only - note upper case - Alternate tmpdir/tmp2dir

Responses

Request samples

Content type
application/json
{
  • "delay": 0,
  • "parallel": false,
  • "n": 1,
  • "k": 25,
  • "queue": "default",
  • "t": "string",
  • "t2": "string",
  • "d": "string",
  • "b": 4608,
  • "u": 128,
  • "a": 0,
  • "c": "string",
  • "p": "string",
  • "f": "string",
  • "memo": "string",
  • "e": false,
  • "r": 2,
  • "x": false,
  • "overrideK": false,
  • "w": false,
  • "m": false,
  • "K": false,
  • "G": false
}

Response samples

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

Stops the plot with the given id.

Stops the plot with the given id.

Authorizations:
bearerAuth
Request Body schema: application/json
required

The id of the plot to stop

id
required
string

Responses

Request samples

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

Response samples

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

Returns a list of keys.

Returns the list of keys used for plotting.

Authorizations:
bearerAuth
Request Body schema: application/json
required

Input parameters

fingerprints
Array of integers <uint32> [ items <uint32 > ]

Responses

Request samples

Content type
application/json
{
  • "fingerprints": [
    ]
}

Response samples

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

Shared

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"
}