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

# Get Stake Count

> Number of stake records (active and inactive) for a customer

<span style={{display:"none"}}>For the complete documentation index, see [llms.txt](/llms.txt).</span>

Returns the total number of stake records for this customer, including unstaked positions that haven't been pruned. Valid `stake_index` values for [`/stake-info`](/api-reference/tokens/staking/stake-info) and related endpoints range from `0` to `stake_count - 1`.

### Query Parameters

<ParamField query="customer_ref" type="string" required>
  Your unique identifier for this customer
</ParamField>

### Response

<ResponseField name="stake_count" type="integer">
  Total stakes ever created for this customer
</ResponseField>

```javascript theme={null}
const res = await fetch(
  "https://tokens.shakesco.com/stake-count?customer_ref=customer-123",
  { headers: { Authorization: `Bearer ${API_KEY}` } }
);
const { stake_count } = await res.json();
```

<ResponseExample>
  ```json 200 OK theme={null}
  { "stake_count": 2 }
  ```
</ResponseExample>
