> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Minerstat API reference

> API reference for the Minerstat plugin in Corsair: every `minerstat.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Algorithms

### get

`algorithms.get`

Get one algorithm with its coins and benchmarked hardware

**Risk:** `read`

```ts theme={null}
await corsair.minerstat.api.algorithms.get({ slug: 'sha-256' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `slug` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `algorithm` | `object` | Yes | — |

> [accordion] algorithm full type
>
> ```ts theme={null}
> {
>   slug: string,
>   name: string,
>   unit: string,
>   coins: {
>     slug: string,
>     symbol: string,
>     name?: string,
>     algorithm?: string,
>     networkHashrate?: number | null,
>     difficulty?: number | null,
>     blockReward?: number | null,
>     blockTimeSeconds?: number | null,
>     priceUsd?: number | null,
>     marketCapUsd?: number | null,
>     volume24hUsd?: number | null,
>     confidence?: number | null,
>     dataUpdatedAt?: string | null
>   }[],
>   hardware: {
>     slug: string,
>     name: string,
>     type: ASIC | GPU | CPU | FPGA | string,
>     hashrateHs: number,
>     powerWatts: number | null
>   }[]
> }
> ```

***

### list

`algorithms.list`

List mining algorithms with coin counts

**Risk:** `read`

```ts theme={null}
await corsair.minerstat.api.algorithms.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `generatedAt` | `string` | No | — |
| `offset` | `number` | No | — |
| `limit` | `number` | No | — |
| `count` | `number` | Yes | — |
| `results` | `object[]` | Yes | — |
| `notice` | `string` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   slug: string,
>   name: string,
>   unit: string,
>   coins: number
> }[]
> ```

***

## Coins

### get

`coins.get`

Get one coin by slug, with identity and supply fields

**Risk:** `read`

```ts theme={null}
await corsair.minerstat.api.coins.get({ slug: 'btc' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `slug` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `generatedAt` | `string` | Yes | — |
| `dataUpdatedAt` | `string \| null` | Yes | — |
| `confidence` | `number` | Yes | — |
| `coin` | `object` | Yes | — |

> [accordion] coin full type
>
> ```ts theme={null}
> {
>   slug: string,
>   symbol: string,
>   name?: string,
>   algorithm?: string,
>   networkHashrate?: number | null,
>   difficulty?: number | null,
>   blockReward?: number | null,
>   blockTimeSeconds?: number | null,
>   priceUsd?: number | null,
>   marketCapUsd?: number | null,
>   volume24hUsd?: number | null,
>   confidence?: number | null,
>   dataUpdatedAt?: string | null,
>   website: string | null,
>   explorerUrl: string | null,
>   consensusType: string | null,
>   coinType: coin | pool | string,
>   circulatingSupply: number | null,
>   maxSupply: number | null
> }
> ```

***

### history

`coins.history`

List network snapshots for one coin, newest first

**Risk:** `read`

```ts theme={null}
await corsair.minerstat.api.coins.history({ slug: 'btc' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `slug` | `string` | Yes | — |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `coin` | `string` | Yes | — |
| `symbol` | `string` | Yes | — |
| `offset` | `number` | Yes | — |
| `limit` | `number` | Yes | — |
| `count` | `number` | Yes | — |
| `results` | `object[]` | Yes | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   t: string,
>   difficulty: number | null,
>   networkHashrate: number | null
> }[]
> ```

***

### list

`coins.list`

List mineable coins with network, price and confidence data

**Risk:** `read`

```ts theme={null}
await corsair.minerstat.api.coins.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `algorithm` | `string` | No | — |
| `verified` | `boolean` | No | — |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `generatedAt` | `string` | No | — |
| `offset` | `number` | Yes | — |
| `limit` | `number` | Yes | — |
| `count` | `number` | Yes | — |
| `results` | `object[]` | Yes | — |
| `notice` | `string` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   slug: string,
>   symbol: string,
>   name?: string,
>   algorithm?: string,
>   networkHashrate?: number | null,
>   difficulty?: number | null,
>   blockReward?: number | null,
>   blockTimeSeconds?: number | null,
>   priceUsd?: number | null,
>   marketCapUsd?: number | null,
>   volume24hUsd?: number | null,
>   confidence?: number | null,
>   dataUpdatedAt?: string | null
> }[]
> ```

***

## Hardware

### get

`hardware.get`

Get one hardware device by slug, with its spec sheet

**Risk:** `read`

```ts theme={null}
await corsair.minerstat.api.hardware.get({ slug: 'nvidia-geforce-rtx-4090' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `slug` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `hardware` | `object` | Yes | — |

> [accordion] hardware full type
>
> ```ts theme={null}
> {
>   slug: string,
>   name: string,
>   manufacturer: string,
>   type: ASIC | GPU | CPU | FPGA | string,
>   defaultPowerWatts: number | null,
>   releaseDate: string | null,
>   specs: string[]
> }
> ```

***

### list

`hardware.list`

List mining hardware (ASIC, GPU, CPU, FPGA)

**Risk:** `read`

```ts theme={null}
await corsair.minerstat.api.hardware.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `ASIC \| GPU \| CPU \| FPGA` | No | — |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `generatedAt` | `string` | No | — |
| `offset` | `number` | Yes | — |
| `limit` | `number` | Yes | — |
| `count` | `number` | Yes | — |
| `results` | `object[]` | Yes | — |
| `notice` | `string` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   slug: string,
>   manufacturer: string,
>   model: string,
>   type: ASIC | GPU | CPU | FPGA | string,
>   powerWatts: number | null,
>   releaseDate: string | null
> }[]
> ```

***

## Pools

### get

`pools.get`

Get one pool with per-coin fees and payout schemes

**Risk:** `read`

```ts theme={null}
await corsair.minerstat.api.pools.get({ slug: 'f2pool' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `slug` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pool` | `object` | Yes | — |

> [accordion] pool full type
>
> ```ts theme={null}
> {
>   slug: string,
>   name: string,
>   website: string | null,
>   type?: string,
>   founded: string | null,
>   coins: {
>     coin: string,
>     symbol: string,
>     algorithm: string,
>     fee: number | null,
>     payoutScheme: string | null,
>     minPayout: number | null
>   }[]
> }
> ```

***

### list

`pools.list`

List mining pools with fees and liveness

**Risk:** `read`

```ts theme={null}
await corsair.minerstat.api.pools.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `generatedAt` | `string` | No | — |
| `offset` | `number` | Yes | — |
| `limit` | `number` | Yes | — |
| `count` | `number` | Yes | — |
| `results` | `object[]` | Yes | — |
| `notice` | `string` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   slug: string,
>   name: string,
>   website: string | null,
>   type?: string,
>   defaultFee: number | null,
>   coins: number,
>   lastOkAt: string | null
> }[]
> ```

***

## Profitability

### rank

`profitability.rank`

Rank coins by mining profit for hardware or a hashrate (Enterprise plan)

**Risk:** `read`

```ts theme={null}
await corsair.minerstat.api.profitability.rank({ hardware: 'nvidia-geforce-rtx-4090', electricity: 0.1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `hardware` | `string` | No | — |
| `hashrate` | `number` | No | — |
| `algorithm` | `string` | No | — |
| `power` | `number` | No | — |
| `quantity` | `number` | No | — |
| `electricity` | `number` | No | — |
| `poolFee` | `number` | No | — |
| `verifiedOnly` | `boolean` | No | — |
| `limit` | `number` | No | — |
| `window` | `current \| 6h \| 24h \| 3d` | No | — |

Requires the Enterprise plan. Use hardware for preset mode, or hashrate and algorithm for manual mode.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `hardware` | `object \| null` | Yes | — |
| `electricityPrice` | `number` | Yes | — |
| `currency` | `string` | Yes | — |
| `results` | `object[]` | Yes | — |

> [accordion] hardware full type
>
> ```ts theme={null}
> {
>   slug: string,
>   name: string
> } | null
> ```

> [accordion] results full type
>
> ```ts theme={null}
> {
>   coin: {
>     slug: string,
>     symbol: string,
>     name?: string,
>     algorithm: string
>   },
>   coinsPerDay: number,
>   revenuePerDay: number,
>   electricityPerDay: number,
>   profitPerDay: number,
>   profitMargin: number | null,
>   breakEvenElectricityPrice: number | null,
>   confidenceScore: number
> }[]
> ```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.