# Get candidate settings

`GET /mining/candidate` · Lithos client API · Mining

Source: https://lithosprotocol.org/docs/api/get-candidate-settings

The `stratum.candidate` settings that decide what this client's blocks carry besides the genesis transaction, which collateral box funds them, and when a served job is replaced mid-block. Values are the ones the client started with.

## Responses

### 200: The candidate settings in force

`CandidateSettings`

- `blockTransactions` (boolean, required): Whether this client's blocks carry transactions besides the genesis transaction. When false, no source is asked.
- `sources` (CandidateSourceSettings[], required): Every transaction source, in the order candidates ask them.
  - `name` (string, required, one of rollups, emissions, rent, forwards, sigmafi, lithosdex, ergodex, arb)
  - `enabled` (boolean, required): The source's own `enabled` setting.
  - `active` (boolean, required): Whether candidates ask this source for transactions: `blockTransactions` is on, the source is enabled with `maxTxs` above 0 and, for `forwards`, `sigmafi`, `lithosdex`, `ergodex` and `arb`, the matching `batching` block is enabled.
  - `maxTxs` (integer, required): Transactions this source may place in one block, carried ancestors included.
  - `maxBytes` (integer · int64, required): Serialized bytes this source may claim.
  - `maxCost` (integer · int64, required): Validation cost this source may claim.
- `blockShare` (number · double, required): Fraction of the node's block size and cost limits the whole package may claim.
- `waitForBlockPackage` (boolean, required): Whether the first job for a height waits, up to `genesisWaitMs`, for the sources before it is sent.
- `genesisWaitMs` (integer, required): Milliseconds to wait for the genesis transaction before a solo job is sent instead.
- `blockTxTimeout` (integer, required): Milliseconds the sources have to build their transactions.
- `mempoolRefreshMs` (integer, required): Milliseconds between mid-block package rebuilds. 0 turns them off.
- `cacheRefreshMs` (integer, required): Milliseconds between re-sending the served package to the Ergo node, so the node keeps the job miners are on. Between 20000 and 55000.
- `minCandidateChangeRevenue` (integer · int64, required): nanoERG a rebuilt package must add over the served one before the job changes mid-block.
- `refreshForProtocolTxs` (boolean, required): Whether a rebuilt package that adds rollup or emission transactions also changes the job mid-block.
- `minNewProtocolTxs` (integer, required): Rollup or emission transactions the rebuilt package must add before `refreshForProtocolTxs` changes the job.
- `collateralStrategy` (string, required, one of highestFee, random): How the collateral box is picked. `highestFee` takes the highest priority fee, compared in 0.001 ERG steps and drawn at random within a step, until a box reaches `clearanceAge`; `random` draws from every usable box.
- `clearanceAge` (integer, required): With `highestFee`, blocks a collateral box may stay live before the oldest is taken regardless of fee. Ignored by `random`.
- `pinnedInputs` (integer, required): Wallet boxes set aside to fund transactions that need a wallet input inside this client's own block.
- `defaultClearanceAge` (integer, required): The shipped `clearanceAge`, which most clients run.
- `maxClearanceAge` (integer, required): The largest `clearanceAge` any client accepts. A collateral box this old is drawn first by every client using `highestFee`.

### default: Error

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

## Example request

```bash
curl -X GET "http://localhost:9000/mining/candidate"
```

## Example response

```json
{
  "blockTransactions": true,
  "sources": [
    {
      "name": "rollups",
      "enabled": true,
      "active": true,
      "maxTxs": 0,
      "maxBytes": 0,
      "maxCost": 0
    }
  ],
  "blockShare": 0,
  "waitForBlockPackage": true,
  "genesisWaitMs": 0,
  "blockTxTimeout": 0,
  "mempoolRefreshMs": 0,
  "cacheRefreshMs": 0,
  "minCandidateChangeRevenue": 0,
  "refreshForProtocolTxs": true,
  "minNewProtocolTxs": 0,
  "collateralStrategy": "highestFee",
  "clearanceAge": 0,
  "pinnedInputs": 0,
  "defaultClearanceAge": 7200,
  "maxClearanceAge": 14400
}
```
