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

# userRole | Hyperliquid Info API

> Hyperliquid userRole: fetch a user's account role.

> [card] Credit Cost
>
> 1 per call

> [card] Processing
>
> Realtime

The Hyperliquid info endpoint with `type: "userRole"` is used to fetch a user's account role.

> [!TIP]
>
> Estimate your monthly cost for this API using the [Pricing Calculator](https://goldrush.dev/docs/pricing-calculator.md?endpoint=%2Fapi-reference%2Fhyperliquid-info%2Fuser-role).

> [!NOTE]
>
> * Wire-equal to `POST api.hyperliquid.xyz/info` with `{"type": "userRole", "user": "..."}`.
> * The `role` value is one of `missing`, `user`, `agent`, `vault`, or `subAccount`.
> * The `subAccount` and `agent` roles additionally carry a `data` object identifying the controlling master account.

Returns the role a wallet plays on HyperCore. Most trading wallets are plain user accounts; this type also distinguishes API agent wallets, vault addresses, and subAccounts. For a subAccount (and for an agent), a nested data object carries the master account address that controls the wallet.

## Endpoint

```
POST https://hypercore.goldrushdata.com/info
Authorization: Bearer <GOLDRUSH_API_KEY>
Content-Type: application/json
```

## Request

**type** `string` *required*

Always `"userRole"`.

**user** `string` *required*

The wallet address (lowercase 0x-prefixed hex).

### Example

```bash cURL theme={null}
curl -X POST https://hypercore.goldrushdata.com/info \
  -H "Authorization: Bearer $GOLDRUSH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "userRole",
    "user": "0x2b804617c6f63c040377e95bb276811747006f4b"
  }'
```

```typescript TypeScript theme={null}
const response = await fetch("https://hypercore.goldrushdata.com/info", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GOLDRUSH_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    type: "userRole",
    user: "0x2b804617c6f63c040377e95bb276811747006f4b",
  }),
});

const role = await response.json();
```

```python Python theme={null}
import os, requests

response = requests.post(
    "https://hypercore.goldrushdata.com/info",
    headers={"Authorization": f"Bearer {os.environ['GOLDRUSH_API_KEY']}"},
    json={
        "type": "userRole",
        "user": "0x2b804617c6f63c040377e95bb276811747006f4b",
    },
)

role = response.json()
```

## Response

A single object with a `role` discriminator. A plain trading wallet returns `{"role": "user"}`; a sub-account additionally returns its controlling master under `data`.

```json theme={null}
{
  "role": "subAccount",
  "data": {
    "master": "0x399965e15d4e61ec3529cc98b7f7ebb93b733336"
  }
}
```

### Field descriptions

**role** `string`

Account role. One of:

* `missing` - the address has never interacted with HyperCore.
* `user` - an ordinary trading account.
* `agent` - an API agent (API wallet) that signs on behalf of a master.
* `vault` - a vault address.
* `subAccount` - a sub-account owned by a master account.

**data** `object`

Present only for the `subAccount` and `agent` roles.

**properties**

**master** `string`

Address of the master account that controls this sub-account / agent.

## Related endpoints

> [card] [userAbstraction](https://goldrush.dev/docs/api-reference/hyperliquid-info/user-abstraction.md)
>
> fetch a user's account-abstraction mode.

> [card] [userFees](https://goldrush.dev/docs/api-reference/hyperliquid-info/user-fees.md)
>
> fetch a user's fee schedule and recent daily volume.

> [card] [userRateLimit](https://goldrush.dev/docs/api-reference/hyperliquid-info/user-rate-limit.md)
>
> fetch a user's API rate-limit usage and cap.

> [card] [userToMultiSigSigners](https://goldrush.dev/docs/api-reference/hyperliquid-info/user-to-multi-sig-signers.md)
>
> fetch the authorized signers for a multi-sig user.

> [card] [extraAgents](https://goldrush.dev/docs/api-reference/hyperliquid-info/extra-agents.md)
>
> list a user's approved API-agent wallets.

> [card] [subAccounts](https://goldrush.dev/docs/api-reference/hyperliquid-info/sub-accounts.md)
>
> fetch a master wallet's sub-accounts along with their full perp and spot state in a single call.

See all Hyperliquid endpoints: [Overview hub](https://goldrush.dev/docs/goldrush-hyperliquid/overview.md) · [Info API reference](https://goldrush.dev/docs/goldrush-hyperliquid/info-api/overview.md)

*Last reviewed: 2026-08-17*


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