Perpetuals
The section documents the info endpoints that are specific to perpetuals. See Rate limits section for rate limiting logic and weights.
Retrieve perpetuals metadata
POST
https://api.hyperliquid.xyz/info
Headers
Name | Type | Description |
---|---|---|
Content-Type* | String | "application/json" |
Request Body
Name | Type | Description |
---|---|---|
type* | String | "meta" |
Retrieve perpetuals asset contexts (includes mark price, current funding, open interest, etc)
POST
https://api.hyperliquid.xyz/info
Headers
Name | Type | Description |
---|---|---|
Content-Type* | String | "application/json" |
Request Body
Name | Type | Description |
---|---|---|
type* | String | "metaAndAssetCtxs" |
Retrieve user's perpetuals account summary
POST
https://api.hyperliquid.xyz/info
See a user's open positions and margin summary for perpetuals trading
Headers
Name | Type | Description |
---|---|---|
Content-Type* | "application/json" |
Request Body
Name | Type | Description |
---|---|---|
type* | String | "clearinghouseState" |
user* | String | Onchain address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000. |
Retrieve a user's funding history or non-funding ledger updates
POST
https://api.hyperliquid.xyz/info
Note: Non-funding ledger updates include deposits, transfers, and withdrawals.
Headers
Name | Type | Description |
---|---|---|
Content-Type* | String | "application/json" |
Request Body
Name | Type | Description |
---|---|---|
type* | String | "userFunding" or "userNonFundingLedgerUpdates" |
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. |
Retrieve historical funding rates
POST
https://api.hyperliquid.xyz/info
Headers
Name | Type | Description |
---|---|---|
Content-Type* | String | "application/json" |
Request Body
Name | Type | Description |
---|---|---|
type* | String | "fundingHistory" |
coin* | String | Coin, e.g. "ETH" |
startTime* | int | Start time in milliseconds, inclusive |
endTime | int | End time in milliseconds, inclusive. Defaults to current time. |
Last updated