Skip to main content
Endpoints for fetching account information, positions, and order history.

GET /account

Get account summary including balances, positions, open orders, and fee tier.
GET /v1/perps/account?dex=hyperliquid&address=0x1234...

Parameters

NameInTypeRequiredDescription
dexquerystringYesDEX identifier
addressquerystringYesUser’s wallet address
x-lifi-api-keyheaderstringYesAPI key
x-lifi-integratorheaderstringNoIntegrator identifier

Response 200

{
  "dex": "hyperliquid",
  "address": "0x1234567890abcdef1234567890abcdef12345678",
  "balances": [
    { "currency": "USDC", "amount": "10000.00" },
    { "currency": "ETH", "amount": "2.5" }
  ],
  "marginUsed": "2500.00",
  "unrealizedPnl": "150.00",
  "feeTier": {
    "maker": "0.0002",
    "taker": "0.0005"
  },
  "positions": [
    {
      "symbol": "BTC",
      "assetId": 0,
      "dex": "hyperliquid",
      "side": "LONG",
      "size": "0.5",
      "entryPrice": "94000.00",
      "markPrice": "95000.50",
      "liquidationPrice": "85000.00",
      "unrealizedPnl": "500.25",
      "leverage": 10,
      "marginUsed": "4700.00",
      "marginMode": "ISOLATED"
    }
  ],
  "openOrders": [
    {
      "id": "12345678",
      "symbol": "ETH",
      "assetId": 1,
      "dex": "hyperliquid",
      "side": "BUY",
      "type": "LIMIT",
      "size": "1.0",
      "price": "3150.00",
      "filledSize": "0",
      "reduceOnly": false,
      "createdAt": "2025-01-15T10:30:00Z"
    }
  ],
  "config": {
    "abstractionStatus": "unifiedAccount",
    "agents": [],
    "builderFeeApproval": {
      "builderAddress": "0x5678901234abcdef5678901234abcdef56789012",
      "maxFeeRate": "0.001",
      "approved": true
    }
  }
}
SDK: getAccount()

GET /history

Get paginated order history. Results are sorted by creation time, newest first.
GET /v1/perps/history?dex=hyperliquid&address=0x1234...&limit=50

Parameters

NameInTypeRequiredDescription
dexquerystringYesDEX identifier
addressquerystringYesUser’s wallet address
startTimequeryintegerNoFilter: orders after this timestamp (ms)
endTimequeryintegerNoFilter: orders before this timestamp (ms)
cursorquerystringNoPagination cursor from previous response
limitqueryintegerNoItems per page (default 50, max 100)
x-lifi-api-keyheaderstringYesAPI key
x-lifi-integratorheaderstringNoIntegrator identifier

Response 200

The filledSize, fee, and realizedPnl fields are optional — they may be absent on cancelled or rejected orders, and realizedPnl is null when the order did not close a position.
{
  "dex": "hyperliquid",
  "items": [
    {
      "id": "12345678",
      "symbol": "BTC",
      "assetId": 0,
      "dex": "hyperliquid",
      "side": "BUY",
      "type": "MARKET",
      "size": "0.5",
      "price": "94000.00",
      "status": "FILLED",
      "filledSize": "0.5",
      "fee": "4.70",
      "realizedPnl": "125.50",
      "createdAt": "2025-01-15T09:00:00Z"
    }
  ],
  "pagination": {
    "limit": 50,
    "hasMore": true,
    "cursor": "abc123",
    "nextUrl": "/v1/perps/history?address=0x1234...&cursor=abc123&limit=50"
  }
}

Pagination

Use the cursor from the response to fetch the next page:
GET /v1/perps/history?dex=hyperliquid&address=0x1234...&cursor=abc123
When hasMore is false, there are no more pages. SDK: getHistory()