Get the long/short account ratio history of coins on Hyperliquid: the number and share of accounts holding long and short positions at each point in time, and the long/short account ratio. Useful for watching how retail sentiment on Hyperliquid changes.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Available on these API plans: Standard Professional Enterprise
Response Data
data is an array sorted by time from earliest to latest; each element is the statistics at one point in time, and time is the time of that interval. The share fields are already percentage values: 58.67 means 58.67%. The example on the right shows the data returned when symbol is omitted (all coins).
200 · application/json · See the response example in the right panel.
| Field | Type | Always Returned | Description |
|---|---|---|---|
code | string | Yes | Business status code; "0" means success |
msg | string | No | Result message; may be omitted on success |
data | array of object | Yes | Series of long/short account statistics; each element is one point in time |
data[].time | integer (int64) | Yes | Time, timestamp in milliseconds (UTC) |
data[].global_account_long_count | integer | Yes | Number of accounts holding long positions |
data[].global_account_short_count | integer | Yes | Number of accounts holding short positions |
data[].global_account_total_count | integer | Yes | Total number of accounts (long + short) |
data[].global_account_long_percent | number | Yes | Share of long accounts, in % |
data[].global_account_short_percent | number | Yes | Share of short accounts, in % |
data[].global_account_long_short_ratio | number | Yes | Long/short account ratio: long accounts ÷ short accounts; above 1 means more accounts are long. Equals global_account_long_percent ÷ global_account_short_percent, and may differ slightly in the last few decimal places from dividing the two account counts directly |
API Plans
Only the API plans marked Yes in the table below can call this endpoint. For the price of each plan, see API Plans.
| API Plan | Access |
|---|---|
| Hobbyist | ❌ No |
| Startup | ❌ No |
| Standard | ✅ Yes |
| Professional | ✅ Yes |
| Enterprise | ✅ Yes |
Use This Endpoint with AI
Pick a task and click Open in ChatGPT or Open in Claude: the AI reads this page first and then gives you the result. You can also click Copy and paste the full prompt into the AI tool you use.
This endpoint provides data through the REST API. Use the prompts above to have AI write the request code. For the tools available through MCP, see CoinGlass MCP.
Use Cases
| Scenario | Description |
|---|---|
| Retail Sentiment Tracking | The long/short account ratio reflects the number of accounts regardless of position size, so it is closer to the overall sentiment of ordinary users. |
| Contrarian Indicator | When the account ratio leans heavily to one side, the market is prone to move the other way; it can serve as a reference for contrarian trading. |
| On-Chain vs. Centralized Exchanges | Compare with Global Long/Short Account Ratio History to see how sentiment differs between Hyperliquid users and users of centralized exchanges. |
| Combine with Whale Data | Combine with Hyperliquid Wallet Position Distribution to tell apart the directions of large traders and retail traders. |
Related Endpoints
| Endpoint | How It Differs |
|---|---|
| Hyperliquid Long/Short Account Ratio (by Tag) | Long and short account counts split by wallet tag |
| Hyperliquid Wallet Position Distribution | Real-time long/short statistics by position size tier |
| Global Long/Short Account Ratio History | Long/short account ratio by trading pair on centralized exchanges |
| Top Trader Long/Short Account Ratio History | Long/short account ratio of top traders on centralized exchanges |
FAQ
What happens if I omit symbol?
The endpoint queries all; it does not return only BTC. It returns a single series that is not split by coin, one data point per point in time, with no coin field. To look at a single coin only, pass symbol explicitly, e.g., BTC.
Does a share of 58.67 mean 58.67%?
Yes. global_account_long_percent and global_account_short_percent are already percentage values; there is no need to multiply them by 100.
What values can interval take?
Options: 5m, 1h, 1d. interval is required: it cannot be omitted and has no default value.
Why do I get more data points than limit when I pass both start and end times?
With interval=1h, limit=2 and a 3-hour window given by start_time and end_time, 3 data points were returned, starting at start_time. When both start and end times are specified, the number of data points returned is determined by the time window and does not necessarily equal limit. If you only want a fixed number of data points, pass only limit.
Learn More: Hyperliquid Long/Short Account Ratio
What Is the Long/Short Account Ratio?
Long/short account ratio = number of accounts holding long positions ÷ number of accounts holding short positions. It only counts heads and ignores position size, so it better reflects the view of most users.
How Is the Long/Short Account Ratio Different from the Long/Short Position Ratio?
The account ratio is calculated from the number of accounts, the position ratio from position value. A few large traders alone can make the position ratio lean heavily to one side, while the account ratio is barely affected.
How Do I See Long and Short Account Counts by Wallet Type?
Use Hyperliquid Long/Short Account Ratio (by Tag) and choose a tag such as Whale or Smart_Money with wallet_tag.
