# Hyperliquid — Query a user's role

Get Hyperliquid User Role data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Hyperliquid, pass parameters such as type, user, and retrieve structured data including reported account role label for account identification, and integration diagnostics, ready for production pipelines and AI agent automation using a single OpenAny API key.

Documentation: https://openany.si/hyperliquid/hyperliquid-query-a-user-s-role/2e188848-b83c-4fc5-8b4a-b0f86df8e4b3/
API ID: 2e188848-b83c-4fc5-8b4a-b0f86df8e4b3
Provider: hyperliquid
Contract revision: 4
Method: POST
Endpoint: https://api.openany.si/v1/agent-apis/hyperliquid/info/user-role
Page update time: 2026-12-03T02:49:34.379Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: application/json
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0 / call
The published contract currently has no usage charge. Authentication and service limits still apply.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:49:33.695Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## Hyperliquid User Role API

Send type="userRole" and user. The response contains a role label associated with that address. Keep the label intact and use explicit account-address input; role lookup is separate from authentication and transaction authorization.

## What You Can Build

- **Account identification**: Show a role label with the queried address.
- **Integration diagnostics**: Keep role lookup separate from credential handling.

## Documented Response Fields

| Field | Meaning |
| --- | --- |
| `role` | Reported account role label |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Hyperliquid — Query a user's role request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {}
    },
    "headers": {
      "type": "object",
      "properties": {}
    },
    "body": {
      "additionalProperties": false,
      "examples": [
        {
          "type": "userRole",
          "user": "0x677d831aef5328190852e24f13c46cac05f984e7"
        }
      ],
      "properties": {
        "type": {
          "const": "userRole",
          "description": "Fixed native Info query discriminator.",
          "enum": [
            "userRole"
          ],
          "example": "userRole",
          "type": "string"
        },
        "user": {
          "description": "Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.",
          "example": "0x677d831aef5328190852e24f13c46cac05f984e7",
          "pattern": "^0x[0-9a-fA-F]{40}$",
          "type": "string"
        }
      },
      "required": [
        "type",
        "user"
      ],
      "type": "object",
      "description": "Query a user's role Documentation prepared only; runtime not verified."
    }
  },
  "required": [
    "path",
    "query",
    "headers",
    "body"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "role": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Documentation example
```bash
curl \
  'https://api.openany.si/v1/agent-apis/hyperliquid/info/user-role' \
  -X POST \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "type": "userRole",
  "user": "0x677d831aef5328190852e24f13c46cac05f984e7"
}'
```

## Response example
Published documentation example. Verify the actual response after an approved call.
Sample response · Documented HTTP 200
```json
{
  "role": "user"
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Which address format is accepted?
user must be a 42-character hexadecimal address beginning with 0x. Query the actual account whose role you need.

### Is role returned as a boolean?
No. Read the role field as a label and preserve the returned value.

### Does a role label authorize trading?
No. A reported role is account information; signing and transaction permissions are separate.

### Can I query several addresses at once?
This implementation accepts one user address. It does not expose an address array or batch input.

### Which API key should I use?
Use your OpenAny API key as Bearer authentication on the documented OpenAny route.

### Where can I check the current request price?
Check the pricing area for the selected implementation. Follow its billing unit and any request-dependent rules before sending the request.

## Available implementations
- hyperliquid: https://openany.si/hyperliquid/hyperliquid-query-a-user-s-role/2e188848-b83c-4fc5-8b4a-b0f86df8e4b3/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
