Info endpoint
The info endpoint is used to fetch information about the exchange and specific users. The different request bodies result in different corresponding response body schemas.
Pagination
Responses that take a time range will only return 500 elements or distinct blocks of data. To query larger ranges, use the last returned timestamp as the next startTime
for pagination.
Perpetuals vs Spot
The endpoints in this section as well as websocket subscriptions work for both Perpetuals and Spot. For perpetuals coin
is the name returned in the meta
response. For Spot, coin should be PURR/USDC
for PURR, and @{index}
e.g. @1
for all other spot tokens where index is the index in the universe
field of the spotMeta
response.
User address
To query the account data associated with a master or sub-account, you must pass in the actual address of that account. A common pitfall is to use an agent wallet's address which leads to an empty result.
Retrieve mids for all coins
POST
https://api.hyperliquid.xyz/info
Note that if the book is empty, the last trade price will be used as a fallback
Headers
Content-Type*
String
"application/json"
Request Body
type*
String
"allMids"
Retrieve a user's open orders
POST
https://api.hyperliquid.xyz/info
See a user's open orders
Headers
Content-Type*
String
"application/json"
Request Body
type*
String
"openOrders"
user*
String
Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.
Retrieve a user's open orders with additional frontend info
POST
https://api.hyperliquid.xyz/info
Headers
Content-Type*
String
"application/json"
Request Body
type*
String
"frontendOpenOrders"
user*
String
Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.
Retrieve a user's fills
POST
https://api.hyperliquid.xyz/info
Returns at most 2000 most recent fills
Headers
Content-Type*
String
"application/json"
Request Body
type*
String
"userFills"
user*
String
Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.
aggregateByTime
bool
When true, partial fills are combined when a crossing order gets filled by multiple different resting orders. Resting orders filled by multiple crossing orders will not be aggregated.
Retrieve a user's fills by time
POST
https://api.hyperliquid.xyz/info
Returns at most 2000 fills per response and only the 10000 most recent fills are available
Headers
Content-Type*
String
"application/json"
Request Body
type*
String
userFillsByTime
user*
String
Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.
startTime*
int
Start time in milliseconds, inclusive
endTime
int
End time in milliseconds, inclusive. Defaults to current time.
aggregateByTime
bool
When true, partial fills are combined when a crossing order gets filled by multiple different resting orders. Resting orders filled by multiple crossing orders will not be aggregated.
Query user rate limits
POST
https://api.hyperliquid.xyz/info
Request Body
user
String
Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000
type
String
userRateLimit
Query order status by oid or cloid
POST
https://api.hyperliquid.xyz/info
Request Body
user*
String
Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.
type*
String
"orderStatus"
oid*
uint64 or string
Either u64 representing the order id or 16-byte hex string representing the client order id
L2 Book snapshot
POST
https://api.hyperliquid.xyz/info
Returns at most 20 levels per side
Headers
Content-Type*
"application/json"
Body
type*
String
"l2Book"
coin*
String
coin
nSigFigs
Number
Optional field to aggregate levels to nSigFigs
significant figures. Valid values are 2, 3, 4, 5, and null
, which means full precision
mantissa
Number
Optional field to aggregate levels. This field is only allowed if nSigFigs is 5. Accepts values of 1, 2 or 5.
Response
Candle snapshot
POST
https://api.hyperliquid.xyz/info
Only the most recent 5000 candles are available
Headers
Content-Type*
"application/json"
Body
type*
String
"candleSnapshot"
req*
Object
{"coin": <coin>, "interval": "15m", "startTime": <epoch millis>, "endTime": <epoch millis>}
Response
Check Builder Fee Approval
POST
https://api.hyperliquid.xyz/info
Headers
Content-Type*
"application/json"
Body
type*
String
"maxBuilderFee"
user*
String
Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.
builder*
String
Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.
Response
Retrieve a user's historical orders
POST
https://api.hyperliquid.xyz/info
Returns at most 2000 most recent historical orders
Headers
Content-Type*
String
"application/json"
Request Body
type*
String
"historicalOrders"
user*
String
Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.
Retrieve a user's TWAP slice fills
POST
https://api.hyperliquid.xyz/info
Returns at most 2000 most recent TWAP slice fills
Headers
Content-Type*
String
"application/json"
Request Body
type*
String
"userTwapSliceFills"
user*
String
Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.
Retrieve a user's subaccounts
POST
https://api.hyperliquid.xyz/info
Headers
Content-Type*
String
"application/json"
Request Body
type*
String
"subAccounts"
user*
String
Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.
Retrieve details for a vault
POST
https://api.hyperliquid.xyz/info
Headers
Content-Type*
String
"application/json"
Request Body
type*
String
"vaultDetails"
vaultAddress*
String
Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.
user
String
Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.
Retrieve a user's vault deposits
POST
https://api.hyperliquid.xyz/info
Headers
Content-Type*
String
"application/json"
Request Body
type*
String
"userVaultEquities"
user*
String
Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.
Last updated