How to learn harvestingStatus using the API

In wallets for the status of delegated harvesting (started / not started) there is a separate indication. In Nanowallet this is the item “Harvesting status” (Active / Inactive), in NCC the first button changes its name to “Stop delegated harvesting” if the delegated harvesting is started.

On request
http://<ip of any node>:7890/account/status?address=<the address of the account>
you can see remoteStatus - the activation status of the delegated harvesting - is it activated or not.

But how to learn with the help of API whether the delegated harvesting is started or not started? I did not find such a command in the API
https://bob.nem.ninja/docs/
Thx.

1 Like

I think you have to check using the specific node you’re using to harvest to be able to check whether harvesting is currently active or not (other nodes will not be able to tell you). So if you put your delegated address into that API call with the specific node, you’d see if it’s ‘unlocked’ or not.

1 Like

Thx. It works :slight_smile:

1 Like

The http://NIS:7890/account/status gives the status of delegate harvesting active/inactive. When I stop delegate harvesting, it is still active, just stopped. Using Api, how to I get the info if an active harvesting is started or stopped?

It is
http://<ip_of_THE_node>:7890/account/status?address=<DELEGATED_harvesting_account_address>

Here:
<ip_of_THE_node> - this is ip of the node on which delegated harvesting was started
<DELEGATED_harvesting_account_address> - this is the address of delegated harvesting account

The answer will be:
status "UNLOCKED" remoteStatus "REMOTE" - delegated harvesting is started,
status "LOCKED" remoteStatus "REMOTE" - delegated harvesting is stopped.

1 Like

I have stopped harvesting but it is still showing active. It is my own supernode and I have the delegate private key in the config file. Is this why I manually stopped harvesting but it is still returning as active?

http://185.122.57.148:7890/account/status?address=NAFDZBOFPCDYWRSJLRMPUYXUU4CIQ4IPLJBBRN4K

Initial data:

  1. account
    NAFDZBOFPCDYWRSJLRMPUYXUU4CIQ4IPLJBBRN4K
    has a delegated harvesting account
    NCVSKN7VWSAY3K6SG4C2VQIM2Y3I4X6CQNHBRTAE
  2. NIS (and start / stop delegated harvesting) is running on the node
    185.122.57.148

I make a request
http://185.122.57.148:7890/account/status?address=NCVSKN7VWSAY3K6SG4C2VQIM2Y3I4X6CQNHBRTAE
And I see that the delegated harvesting is stopped (LOCKED)

I make a request
http://185.122.57.148:7890/account/status?address=NAFDZBOFPCDYWRSJLRMPUYXUU4CIQ4IPLJBBRN4K
And I see that the delegated harvesting is activated (ACTIVE)

It is necessary to separate the concepts of activated / deactivated and started / stopped. First, activation of the delegated harvesting takes place, and then you can start / stop any number of times, until the deactivation of the delegated harvesting is done.

So everything’s fine. Now the activation will remain all the time until it is deactivated. Start / stop can be done any number of times.

There is a detailed description of harvesting and concepts, though in russian

1 Like

ah…thank you. Working now