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

# legalCheck | Hyperliquid info

> The info endpoint with type: "legalCheck" returns a user's legal/compliance status — accepted terms, trading permission, and restrictions.

> [!NOTE]
>
> You can only use this endpoint on the official Hyperliquid public API. It is not available through Chainstack, as the open-source node implementation does not support it yet. See [Hyperliquid methods](https://docs.chainstack.com/docs/hyperliquid-methods.md) for the full availability breakdown.

The `info` endpoint with `type: "legalCheck"` returns a user's legal and compliance status — whether they have accepted the terms, whether they are allowed to trade, and any restrictions that apply.

## Parameters

### Request body

* `type` (string, required) — The request type. Must be `"legalCheck"`.
* `user` (string, required) — Address in 42-character hexadecimal format.

## Response

Returns a legal-status object:

* `acceptedTerms` (boolean) — Whether the user has accepted the terms.
* `userAllowed` (boolean) — Whether the user is allowed to trade.
* `restrictions` (string) — A restriction code applied to the user, if any.

## Example request

```shell Shell theme={"system"}
curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"type": "legalCheck", "user": "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568"}' \
  https://api.hyperliquid.xyz/info
```

```python Python (hyperliquid-python-sdk) theme={"system"}
from hyperliquid.info import Info
from hyperliquid.utils import constants

info = Info(constants.MAINNET_API_URL, skip_ws=True)

# The SDK has no dedicated legalCheck helper, so post the request directly.
legal = info.post("/info", {
    "type": "legalCheck",
    "user": "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568",
})
print(legal)
```

```typescript TypeScript (@nktkas/hyperliquid) theme={"system"}
import { HttpTransport, InfoClient } from "@nktkas/hyperliquid";

const transport = new HttpTransport();
const info = new InfoClient({ transport });

const legal = await info.legalCheck({
  user: "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568",
});
console.log(legal);
```

## Example response

```json theme={"system"}
{
  "acceptedTerms": false,
  "userAllowed": true,
  "restrictions": "o"
}
```

## Use cases

The `info` endpoint with `type: "legalCheck"` is useful for:

* Compliance gating before allowing trading actions
* Surfacing onboarding steps (for example, accepting terms)
* Displaying any restrictions that apply to a user


## OpenAPI

````yaml openapi/hyperliquid_node_api/hypercore_info/info_legal_check.json post /info
openapi: 3.0.0
info:
  title: Hyperliquid Node API
  version: 1.0.0
  description: This is an API for interacting with Chainstack Hyperliquid node.
servers:
  - url: https://api.hyperliquid.xyz
security: []
paths:
  /info:
    post:
      tags:
        - hyperliquid operations
      summary: info (legalCheck)
      operationId: infoLegalCheck
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: Request type
                  default: legalCheck
                  enum:
                    - legalCheck
                user:
                  type: string
                  description: User address in 42-character hexadecimal format.
                  default: '0x1442ad477ded1b0028b57621aa7b6f7eadb8f568'
              required:
                - type
                - user
      responses:
        '200':
          description: Legal/compliance status for the user.
          content:
            application/json:
              schema:
                type: object
                properties:
                  acceptedTerms:
                    type: boolean
                    description: Whether the user has accepted the terms.
                  userAllowed:
                    type: boolean
                    description: Whether the user is allowed to trade.
                  restrictions:
                    type: string
                    description: Restriction code applied to the user, if any.

````