# Get bidders

Get a paginated list of bidders

```
GET /bidders
```

## Query params

| Query param  | Description                                                                                                                                         |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `era_id`     | Active auction era identifier. Data for older eras aren't persistent for long, and will eventually become unavailable. This is a required parameter |
| `is_active`  | Bidder active filter param                                                                                                                          |
| `public_key` | Comma-separated list of public key                                                                                                                  |

## Sorting

| Property            | Description                       |
| ------------------- | --------------------------------- |
| `rank`              | Sort bidders by rank              |
| `fee`               | Sort bidders by fee               |
| `delegators_number` | Sort bidders by delegators number |
| `total_stake`       | Sort bidders by total stake       |
| `self_stake`        | Sort bidders by self stake        |
| `network_share`     | Sort bidders by network share     |

Default sorting is `total_stake DESC`

## Optional properties

| Property                   | Type                                                                                  | Description                                                                                                            |
| -------------------------- | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `account_info`             | [`AccountInfo`](https://docs.cspr.cloud/rest-api/account-info)                        | [Account info](https://github.com/make-software/casper-account-info-contract) provided by the bidder                   |
| `average_performance`      | [`ValidatorPerformance`](https://docs.cspr.cloud/rest-api/validator-performance)      | Moving average of validator performance based on the received rewards over the past 360 eras (approximately one month) |
| `centralized_account_info` | [`CentralizedAccountInfo`](https://docs.cspr.cloud/rest-api/centralized-account-info) | Account information available for known accounts provided by CSPR.cloud team                                           |
| `cspr_name`                | `string`                                                                              | Primary CSPR.name of the account                                                                                       |

## Response

[`PaginatedResponse`](https://docs.cspr.cloud/documentation/overview/pagination)[`<Bidder>`](https://docs.cspr.cloud/rest-api/bidder)

## Example

{% hint style="info" %}
Since this API works only with recent eras, you'll need to replace the era ID with the latest one, which you can fetch using the [Get auction metrics API](https://docs.cspr.cloud/rest-api/auction-metrics/get-auction-metrics).
{% endhint %}

```bash
curl -X 'GET' \
  'https://api.testnet.cspr.cloud/bidders?era_id=18011' \
  -H 'accept: application/json' \
  -H 'authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
```

```json
{
  "item_count": 18535,
  "page_count": 1854,
  "data": [
    {
      "bid_amount": "6899807212331106",
      "delegators_number": 128,
      "delegators_stake": "99739883251183826",
      "era_id": 18011,
      "fee": 10,
      "is_active": true,
      "maximum_delegation_amount": "1000000000000000000",
      "minimum_delegation_amount": "500000000000",
      "network_share": "9.72010436555974",
      "public_key": "0106ca7c39cd272dbf21a86eeb3b36b7c26e2e9b94af64292419f7862936bca2ca",
      "rank": 1,
      "reserved_slots": 0,
      "self_share": "6.47020558887665",
      "self_stake": "6899807212331106",
      "total_stake": "106639690463514932"
    },
    {
      "bid_amount": "6415352079691783",
      "delegators_number": 135,
      "delegators_stake": "99951428143765168",
      "era_id": 18011,
      "fee": 5,
      "is_active": true,
      "maximum_delegation_amount": "1000000000000000000",
      "minimum_delegation_amount": "500000000000",
      "network_share": "9.69522886184941",
      "public_key": "017d96b9a63abcb61c870a4f55187a0a7ac24096bdb5fc585c12a686a4d892009e",
      "rank": 2,
      "reserved_slots": 0,
      "self_share": "6.03134932374028",
      "self_stake": "6415352079691783",
      "total_stake": "106366780223456951"
    },
    ...
    {
      "bid_amount": "15140291996766",
      "delegators_number": 19,
      "delegators_stake": "19888517346318",
      "era_id": 18011,
      "fee": 4,
      "is_active": true,
      "maximum_delegation_amount": "1000000000000000000",
      "minimum_delegation_amount": "500000000000",
      "network_share": "0.00319284200035",
      "public_key": "01075ec8809c691a1d1b0250ba9ea75da5460e3df43c3172771c6975c989457159",
      "rank": 92,
      "reserved_slots": 0,
      "self_share": "43.22239973524895",
      "self_stake": "15140291996766",
      "total_stake": "35028809343084"
    }
  ]
}
```
