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.
Retrieve mids for all actively traded coins
POST
https://api.hyperliquid.xyz/info
Request weight: 2
Headers
Name | Type | Description |
---|---|---|
Content-Type* | String | "application/json" |
Request Body
Name | Type | Description |
---|---|---|
type* | String | "allMids" |
Retrieve a user's open orders
POST
https://api.hyperliquid.xyz/info
See a user's open orders
Request weight: 2
Headers
Name | Type | Description |
---|---|---|
Content-Type* | String | "application/json" |
Request Body
Name | Type | Description |
---|---|---|
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
Request weight: 20
Headers
Name | Type | Description |
---|---|---|
Content-Type* | String | "application/json" |
Request Body
Name | Type | Description |
---|---|---|
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
Request weight: 20
Returns at most 2000 most recent fills
Headers
Name | Type | Description |
---|---|---|
Content-Type* | String | "application/json" |
Request Body
Name | Type | Description |
---|---|---|
type* | String | "userFills" |
user* | String | Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000. |
Retrieve a user's fills by time
POST
https://api.hyperliquid.xyz/info
Request weight: 20
Returns at most 2000 fills per response and only the 10000 most recent fills are available
Headers
Name | Type | Description |
---|---|---|
Content-Type* | String | "application/json" |
Request Body
Name | Type | Description |
---|---|---|
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. |
Query user rate limits
POST
https://api.hyperliquid.xyz/info
Request weight: 20
Request Body
Name | Type | Description |
---|---|---|
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 weight: 2
Request Body
Name | Type | Description |
---|---|---|
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
Request weight: 2
Headers
Name | Value |
---|---|
Content-Type* | "application/json" |
Body
Name | Type | Description |
---|---|---|
type* | String | "l2Book" |
coin* | String | coin |
Response
Candle snapshot
POST
https://api.hyperliquid.xyz/info
Request weight: 2
Only the most recent 5000 candles are available
Headers
Name | Value |
---|---|
Content-Type* | "application/json" |
Body
Name | Type | Description |
---|---|---|
type* | String | "candleSnapshot" |
req* | Object | {"coin": <coin>, "interval": "15m", "startTime": <epoch millis>, "endTime": <epoch millis>} |
Response
Last updated