info (legalCheck)
curl --request POST \
--url https://api.hyperliquid.xyz/info \
--header 'Content-Type: application/json' \
--data '
{
"type": "legalCheck",
"user": "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568"
}
'import requests
url = "https://api.hyperliquid.xyz/info"
payload = {
"type": "legalCheck",
"user": "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({type: 'legalCheck', user: '0x1442ad477ded1b0028b57621aa7b6f7eadb8f568'})
};
fetch('https://api.hyperliquid.xyz/info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperliquid.xyz/info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'legalCheck',
'user' => '0x1442ad477ded1b0028b57621aa7b6f7eadb8f568'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperliquid.xyz/info"
payload := strings.NewReader("{\n \"type\": \"legalCheck\",\n \"user\": \"0x1442ad477ded1b0028b57621aa7b6f7eadb8f568\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyperliquid.xyz/info")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"legalCheck\",\n \"user\": \"0x1442ad477ded1b0028b57621aa7b6f7eadb8f568\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperliquid.xyz/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"legalCheck\",\n \"user\": \"0x1442ad477ded1b0028b57621aa7b6f7eadb8f568\"\n}"
response = http.request(request)
puts response.read_body{
"acceptedTerms": true,
"userAllowed": true,
"restrictions": "<string>"
}Hyperliquid node API
legalCheck | Hyperliquid info
The info endpoint with type: “legalCheck” returns a user’s legal/compliance status — accepted terms, trading permission, and restrictions.
POST
/
info
info (legalCheck)
curl --request POST \
--url https://api.hyperliquid.xyz/info \
--header 'Content-Type: application/json' \
--data '
{
"type": "legalCheck",
"user": "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568"
}
'import requests
url = "https://api.hyperliquid.xyz/info"
payload = {
"type": "legalCheck",
"user": "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({type: 'legalCheck', user: '0x1442ad477ded1b0028b57621aa7b6f7eadb8f568'})
};
fetch('https://api.hyperliquid.xyz/info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperliquid.xyz/info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'legalCheck',
'user' => '0x1442ad477ded1b0028b57621aa7b6f7eadb8f568'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperliquid.xyz/info"
payload := strings.NewReader("{\n \"type\": \"legalCheck\",\n \"user\": \"0x1442ad477ded1b0028b57621aa7b6f7eadb8f568\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyperliquid.xyz/info")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"legalCheck\",\n \"user\": \"0x1442ad477ded1b0028b57621aa7b6f7eadb8f568\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperliquid.xyz/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"legalCheck\",\n \"user\": \"0x1442ad477ded1b0028b57621aa7b6f7eadb8f568\"\n}"
response = http.request(request)
puts response.read_body{
"acceptedTerms": true,
"userAllowed": true,
"restrictions": "<string>"
}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 for the full availability breakdown.
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.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
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
curl -X POST \
-H "Content-Type: application/json" \
-d '{"type": "legalCheck", "user": "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568"}' \
https://api.hyperliquid.xyz/info
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)
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
{
"acceptedTerms": false,
"userAllowed": true,
"restrictions": "o"
}
Use cases
Theinfo 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
Body
application/json
Last modified on June 24, 2026
Was this page helpful?