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

# platform.getValidatorsAt

> Get the validators and their weights of a Subnet or the Primary Network at a given P-Chain height.

### Parameters

<ParamField query="chainId" type="string" default="43114" required>
  Unique identifier for a blockchain network.
</ParamField>

<ParamField body="id" type="number" default={1} required>
  Request identifier used to match responses.
</ParamField>

<ParamField body="jsonrpc" type="string" default="2.0" required>
  JSON-RPC version.
</ParamField>

<ParamField body="method" type="string" default="platform.getValidatorsAt" required>
  JSON-RPC method name.
</ParamField>

<ParamField body="params" type="object" default={{}} required>
  Parameters for <code>platform.getValidatorsAt</code>:

  <ul>
    <li><code>params.height</code>: The P-Chain block height to query validator set for.</li>
    <li><code>params.subnetID</code>: Subnet ID to query validator set for. If omitted, queries the Primary Network.</li>
  </ul>
</ParamField>

### Returns

<ResponseField name="result" type="object">
  The JSON-RPC result.

  <Expandable title="properties">
    <ResponseField name="validators" type="object">
      A mapping from validator NodeID to their stake weight.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash Curl theme={null}
  curl --request POST \
    --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=43114 \
    --header 'content-type: application/json' \
    --data '{
      "id": 1,
      "jsonrpc": "2.0",
      "method": "platform.getValidatorsAt",
      "params": {}
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {}
  }
  ```
</ResponseExample>
