# Forging Operations

## Start / Stop / Get Forging

Start or stop forging with an account, or check to see if an account is forging. POST only.

**Request:**

* requestType is either startForging, stopForging or getForging
* secretPhrase is the secret passphrase of the account (optional for stopForging and getForging if password protected like the [Debug Operations](/pzm/prizm-api/debug-operations.md))

**Response:**

* deadline (N) is the estimated time (in seconds since the last block) until the account will forge a block (startForging and getForging only)
* hitTime (N) is the estimated time (in seconds since the genesis block) when the account will forge a block (startForging and getForging only)
* remaining (N) is the deadline less the elapsed time since the last block (getForging only)
* foundAndStopped (B) is true if forging was stopped, false if forging was already stopped (stopForging only)
* account (S) is the account number (getForging only)
* accountRS (S) is the Reed-Solomon address of the account (getForging only)
* requestProcessingTime (N) is the API request processing time (in millisec)

**Note:** A getForging request returns errorCode 5 if the account is not forging. If the account has a zero effectiveBalance, forging can be started but deadline, remainingTime and hitTime will be set to zero.

**Example:** Refer to [Start / Stop / Get Forging](/pzm/prizm-api/prizm-api-examples.md#start-stop-get-forging) example.

## **Get Forging**

Refer to [Start / Stop / Get Forging](/pzm/prizm-api/prizm-api-examples.md#start-stop-get-forging).

## **Start Forging**

Refer to [Start / Stop / Get Forging](/pzm/prizm-api/prizm-api-examples.md#start-stop-get-forging).

## **Stop Forging**

Refer to [Start / Stop / Get Forging](/pzm/prizm-api/prizm-api-examples.md#start-stop-get-forging).

## Get Next Block Generators

Returns the next block generators ordered by hit time. The list of currently active forgers is first initialized using the block generators with at least 2 blocks generated within the previous 10,000 blocks, excluding accounts without a public key. The list is updated as new blocks are processed. The results are not 100% correct since previously active generators may no longer be running and new generators won't be known until they generate a block.

**Request:**

* requestType is getNextBlockGenerators
* limit (N) is the number of next block generators to display.

**Response:**

* activeCount (N) is the number of active forging accounts
* lastBlock (S) is the last block ID on the blockchain
* generators (A) is an array containing the number of next block generators requested
  * effectiveBalancePrizm (N) is the balance (in PRIZM) of the account available for forging: the unleased guaranteedBalance of this account plus the leased guaranteedBalance of all lessors to this account
  * accountRS (S) is the Reed-Solomon address of the account
  * deadline (N) is the estimated time (in seconds since the last block) until the account will forge a block
  * account (S) is the account number
  * hitTime (N) is the estimated time (in seconds since the genesis block) when the account will forge a block
* requestProcessingTime (N) is the API request processing time (in millisec)
* timestamp (N) is the timestamp (in seconds since the genesis block) when the request was executed
* height (N) is the height of the blockchain

**Example:** Refer to [Get Next Block Generators](/pzm/prizm-api/prizm-api-examples.md#get-next-block-generators) example.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://prizm.gitbook.io/pzm/prizm-api/forging-operations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
