Comment on page
Documentation for the Hyperliquid public API
All example API calls use the Mainnet url (https://api.hyperliquid.xyz), but you can make the same requests against Testnet using the corresponding url (https://api.hyperliquid-testnet.xyz)
The API currently uses some nonstandard notation. Relevant changes will be batched into a breaking v1 API change.
When requests expect an integer for
asset, use the index of the coin found in the
metainfo response. E.g.
BTC = 0on mainnet.
Both Price (px) and Size (sz) have a maximum number of decimals that are accepted.
Prices can have up to 5 significant figures, but no more than 6 decimals places. For example,
1234.5is valid but
1234.56is not (too many significant figures).
0.001234is valid, but
0.0012345is not (more than 6 decimal places).
Sizes are rounded to the
szDecimalsof that asset. For example, if
szDecimals = 3then
1.001is a valid size but
You can find the
szDecimalsfor an asset by making a meta request to the info endpoint
There is a rate limit of 1200 requests per minute per IP address. Use websockets for lowest latency realtime data. See the python SDK for a full-featured example.