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.

Retrieve all mids for all actively traded coins

POST https://api.hyperliquid.xyz/info

Request weight: 2

Headers

NameTypeDescription

Content-Type*

String

"application/json"

Request Body

NameTypeDescription

type*

String

"allMids"

{
    "APE": "4.33245",
    "ARB": "1.21695"
}

Retrieve a user's open orders

POST https://api.hyperliquid.xyz/info

See a user's open orders

Request weight: 2

Headers

NameTypeDescription

Content-Type*

String

"application/json"

Request Body

NameTypeDescription

type*

String

"openOrders"

user*

String

Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.

[
    {
        "coin": "BTC",
        "limitPx": "29792.0",
        "oid": 91490942,
        "side": "A",
        "sz": "0.0",
        "timestamp": 1681247412573
    }
]

Retrieve a user's open orders with additional frontend info

POST https://api.hyperliquid.xyz/info

Request weight: 20

Headers

NameTypeDescription

Content-Type*

String

"application/json"

Request Body

NameTypeDescription

type*

String

"frontendOpenOrders"

user*

String

Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.

[
    {
        "coin": "BTC",
        "isPositionTpsl": false,
        "isTrigger": false,
        "limitPx": "29792.0",
        "oid": 91490942,
        "orderType": "Limit",
        "origSz": "5.0",
        "reduceOnly": false,
        "side": "A",
        "sz": "5.0",
        "timestamp": 1681247412573,
        "triggerCondition": "N/A",
        "triggerPx": "0.0",
    }
]

Retrieve a user's fills

POST https://api.hyperliquid.xyz/info

Request weight: 20

Returns at most 2000 most recent fills

Headers

NameTypeDescription

Content-Type*

String

"application/json"

Request Body

NameTypeDescription

type*

String

"userFills"

user*

String

Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.

[
    {
        "closedPnl": "0.0",
        "coin": "AVAX",
        "crossed": false,
        "dir": "Open Long",
        "hash": "0xa166e3fa63c25663024b03f2e0da011a00307e4017465df020210d3d432e7cb8",
        "oid": 90542681,
        "px": "18.435",
        "side": "B",
        "startPosition": "26.86",
        "sz": "93.53",
        "time": 1681222254710
    }
]

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

NameTypeDescription

Content-Type*

String

"application/json"

Request Body

NameTypeDescription

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 order status by oid or cloid

POST https://api.hyperliquid.xyz/info

Request weight: 2

Request Body

NameTypeDescription

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

NameValue

Content-Type*

"application/json"

Body

NameTypeDescription

type*

String

"l2Book"

coin*

String

coin

Response

[
  [
    {
      "px": "19900",
      "sz": "1",
      "n": 1
    },
    {
      "px": "19800",
      "sz": "2",
      "n": 2
    },
    {
      "px": "19700",
      "sz": "3",
      "n": 3
    }
  ],
  [
    {
      "px": "20100",
      "sz": "1",
      "n": 1
    },
    {
      "px": "20200",
      "sz": "2",
      "n": 2
    },
    {
      "px": "20300",
      "sz": "3",
      "n": 3
    }
  ]
]

Candle snapshot

POST https://api.hyperliquid.xyz/info

Request weight: 2

Only the most recent 5000 candles are available

Headers

NameValue

Content-Type*

"application/json"

Body

NameTypeDescription

type*

String

"candleSnapshot"

req*

Object

{"coin": <coin>, "interval": "15m", "startTime": <epoch millis>, "endTime": <epoch millis>}

Response

[
  [
    {
      "T": 1681924499999,
      "c": "29258.0",
      "h": "29309.0",
      "i": "15m",
      "l": "29250.0",
      "n": 189,
      "o": "29295.0",
      "s": "BTC",
      "t": 1681923600000,
      "v": "0.98639"
    }
  ]
]

Last updated