Farmer RPC
This document provides a comprehensive reference to Chia's Farmer RPC API.
Note about Windows command escaping
This document will use Linux/MacOS RPC syntax. When running rpc commands on Windows, you'll need to escape all quotes with backslashes.
For example, here is a typical RPC command on Linux and MacOS:
chia rpc farmer get_reward_targets '{"search_for_private_key": false}'
To run the same command on Windows, you need to escape the quotes with backslashes. In other words, add a \ before each double quote, such that:
"search_for_private_key"
becomes \"search_for_private_key\"
etc
get_harvesters
Functionality: List all harvesters in your network, including all plots on each individual harvester
Usage: chia rpc farmer [OPTIONS] get_harvesters [REQUEST]
Options:
Short Command | Long Command | Type | Required | Description |
---|---|---|---|---|
-j | --json-file | FILENAME | False | Optionally instead of REQUEST you can provide a json file containing the request data |
-h | --help | None | False | Show a help message and exit |
Request Parameters: None
Example
chia rpc farmer get_harvesters
Response:
{
"harvesters": [
{
"connection": {
"host": "127.0.0.1",
"node_id": "0xbefeeb05fa599f07c5be2b94b2d872b2516f03101ed49cc53312f086de197913",
"port": 61934
},
"duplicates": [],
"failed_to_open_filenames": [],
"last_sync_time": 1677653735.9421551,
"no_key_filenames": [],
"plots": [
{
"file_size": 674281385,
"filename": "/plots/plot-k25-2023-03-01-14-52-160798793b22b998133bbf5b2021ed70d24feb0e20d040668c685df2c7caf76a.plot",
"plot_id": "0x160798793b22b998133bbf5b2021ed70d24feb0e20d040668c685df2c7caf76a",
"plot_public_key": "0xa82069430a7ef8a6491f8b3a5ec64553a33b86e0a713ad03106879231ae77161a0b860df659dbfbb1cc07b6343e95d62",
"pool_contract_puzzle_hash": "0xf5daa5a0d83c6a628782a386aa1f94ff041e29c4da4b9b97f91f4d46563d8e9b",
"pool_public_key": null,
"size": 25,
"time_modified": 1677653720
}
],
"syncing": null,
"total_plot_size": 674281385
}
],
"success": true
}