userRole | Hyperliquid Info API
Info API
userRole | Hyperliquid Info API
Hyperliquid userRole: fetch a user’s account role.
POST
userRole | Hyperliquid Info API
Credit Cost
1 per call
Processing
Realtime
type: "userRole" is used to fetch a user’s account role.
- Wire-equal to
POST api.hyperliquid.xyz/infowith{"type": "userRole", "user": "..."}. - The
rolevalue is one ofmissing,user,agent,vault, orsubAccount. - The
subAccountandagentroles additionally carry adataobject identifying the controlling master account.
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.
User-keyed.
Endpoint
Request
string
required
Always
"userRole".string
required
The wallet address (lowercase 0x-prefixed hex).
Example
Response
A single object with arole discriminator. A plain trading wallet returns {"role": "user"}; a sub-account additionally returns its controlling master under data.
Field descriptions
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.
object
Present only for the
subAccount and agent roles.