Skip to main content
Endpoints for fetching account information, positions, orders, fills, and activity.

GET /account

Get account summary including balances, margin, and fee tier.
GET /v1/perps/account?provider=hyperliquid&address=0x1234...

Parameters

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

Response 200

{
  "provider": "hyperliquid",
  "address": "0x1234567890abcdef1234567890abcdef12345678",
  "balances": {
    "perps": [
      { "currency": "USDC", "amount": "10000.00" }
    ],
    "spot": [
      { "currency": "USDC", "amount": "2500.00" },
      { "currency": "ETH", "amount": "2.5" }
    ]
  },
  "marginUsed": "2500.00",
  "unrealizedPnl": "150.00",
  "feeTier": {
    "maker": "0.0002",
    "taker": "0.0005"
  },
  "config": {
    "abstractionStatus": "unifiedAccount",
    "agents": [],
    "builderFeeApproval": {
      "builderAddress": "0x5678901234abcdef5678901234abcdef56789012",
      "maxFeeRate": "0.001",
      "approved": true
    }
  }
}
Positions and orders are fetched via separate endpoints: GET /positions and GET /orders.
SDK: getAccount()

GET /positions

Get the user’s open positions. Results are paginated.
GET /v1/perps/positions?provider=hyperliquid&address=0x1234...

Parameters

NameInTypeRequiredDescription
providerquerystringYesProvider identifier
addressquerystringYesUser’s wallet address
symbolquerystringNoFilter by asset identifier
limitqueryintegerNoItems per page (default 50, max 100)
cursorquerystringNoPagination cursor from previous response
x-lifi-api-keyheaderstringYesAPI key
x-lifi-integratorheaderstringNoIntegrator identifier

Response 200

{
  "provider": "hyperliquid",
  "positions": [
    {
      "asset": {
        "assetId": "BTC",
        "market": "hyperliquid",
        "displaySymbol": "BTC",
        "displayQuote": "USDC"
      },
      "side": "LONG",
      "size": "0.5",
      "entryPrice": "94000.00",
      "markPrice": "95000.50",
      "liquidationPrice": "85000.00",
      "unrealizedPnl": "500.25",
      "leverage": 10,
      "marginUsed": "4700.00",
      "marginMode": "ISOLATED"
    }
  ],
  "pagination": {
    "limit": 50,
    "hasMore": false
  }
}

Position fields

FieldTypeDescription
assetAssetDisplayAsset identity (see below)
side'LONG' | 'SHORT'Position direction
sizestringPosition size
entryPricestringAverage entry price
markPricestringCurrent mark price
liquidationPricestringEstimated liquidation price
unrealizedPnlstringUnrealized profit/loss
leveragenumberCurrent leverage
marginUsedstringMargin allocated
marginMode'ISOLATED' | 'CROSS'Margin mode

AssetDisplay

The AssetDisplay object is used across positions, orders, fills, and activity to identify assets:
FieldTypeDescription
assetIdstringProvider’s canonical identity (e.g., "BTC", "xyz:PURR", "@142")
marketstringMarket category (e.g., "hyperliquid", "xyz", "spot")
displaySymbolstringUI-friendly symbol (e.g., "BTC", "PURR")
displayQuotestring | nullQuote asset (e.g., "USDC")
SDK: getPositions()

GET /orders

Get the user’s open orders and trigger orders. Results are paginated.
GET /v1/perps/orders?provider=hyperliquid&address=0x1234...

Parameters

NameInTypeRequiredDescription
providerquerystringYesProvider identifier
addressquerystringYesUser’s wallet address
symbolquerystringNoFilter by asset identifier
limitqueryintegerNoItems per page (default 50, max 100)
cursorquerystringNoPagination cursor from previous response
x-lifi-api-keyheaderstringYesAPI key
x-lifi-integratorheaderstringNoIntegrator identifier

Response 200

{
  "provider": "hyperliquid",
  "openOrders": [
    {
      "id": "12345678",
      "asset": {
        "assetId": "ETH",
        "market": "hyperliquid",
        "displaySymbol": "ETH",
        "displayQuote": "USDC"
      },
      "side": "BUY",
      "type": "LIMIT",
      "size": "1.0",
      "price": "3150.00",
      "filledSize": "0",
      "reduceOnly": false,
      "createdAt": "2025-01-15T10:30:00Z"
    }
  ],
  "triggerOrders": [
    {
      "id": "87654321",
      "asset": {
        "assetId": "BTC",
        "market": "hyperliquid",
        "displaySymbol": "BTC",
        "displayQuote": "USDC"
      },
      "type": "TAKE_PROFIT_MARKET",
      "size": "0.1",
      "triggerPrice": "100000.00",
      "createdAt": "2025-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "limit": 50,
    "hasMore": false
  }
}

OpenOrder fields

FieldTypeDescription
idstringOrder ID
assetAssetDisplayAsset identity
side'BUY' | 'SELL'Order direction
typeOrderTypeOrder type: MARKET, LIMIT, STOP_MARKET, STOP_LIMIT, TAKE_PROFIT_MARKET, TAKE_PROFIT_LIMIT, TRIGGER_ONLY
sizestringOrder size
pricestringLimit price
filledSizestringAmount filled
reduceOnlybooleanWhether reduce-only
labelstring?Optional order label
createdAtstringISO 8601 timestamp

TriggerOrder fields

FieldTypeDescription
idstringOrder ID
assetAssetDisplayAsset identity
typeOrderTypeTrigger order type (e.g., TAKE_PROFIT_MARKET, STOP_LIMIT)
sizestringOrder size
triggerPricestringPrice at which the order activates
limitPricestring?Execution limit price (market order if omitted)
labelstring?Optional order label
createdAtstringISO 8601 timestamp
SDK: getOrders()

GET /fills

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

Parameters

NameInTypeRequiredDescription
providerquerystringYesProvider 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.
{
  "provider": "hyperliquid",
  "items": [
    {
      "id": "12345678",
      "asset": {
        "assetId": "BTC",
        "market": "hyperliquid",
        "displaySymbol": "BTC",
        "displayQuote": "USDC"
      },
      "side": "BUY",
      "type": "MARKET",
      "size": "0.5",
      "price": "94000.00",
      "status": "FILLED",
      "filledSize": "0.5",
      "fee": "4.70",
      "realizedPnl": "125.50",
      "startPosition": "0",
      "classification": "OPENED_LONG",
      "createdAt": "2025-01-15T09:00:00Z"
    }
  ],
  "pagination": {
    "limit": 50,
    "hasMore": true,
    "cursor": "abc123",
    "nextUrl": "/v1/perps/fills?address=0x1234...&cursor=abc123&limit=50"
  }
}

Fill fields

FieldTypeDescription
idstringFill ID
assetAssetDisplayAsset identity
side'BUY' | 'SELL'Order direction
typeOrderTypeOrder type
sizestringOriginal order size
pricestringFill price
statusFillStatusFILLED, PARTIALLY_FILLED, CANCELLED, REJECTED
filledSizestring?Amount filled (absent if no fills yet)
feestring?Total fees paid (absent if no fills yet)
realizedPnlstring | null?Realized PnL (present only when closing a position, null otherwise)
startPositionstring?Position size before this fill
classificationFillClassificationHow this fill affected the position (see below)
createdAtstringISO 8601 timestamp

FillClassification

Describes how the fill affected the user’s position:
ValueDescription
OPENED_LONGOpened a new long position from zero
OPENED_SHORTOpened a new short position from zero
INCREASED_LONGAdded to an existing long position
INCREASED_SHORTAdded to an existing short position
REDUCED_LONGPartially closed a long position
REDUCED_SHORTPartially closed a short position
CLOSED_LONGFully closed a long position
CLOSED_SHORTFully closed a short position
SWITCHED_LONGClosed a short and opened a long (crossed zero)
SWITCHED_SHORTClosed a long and opened a short (crossed zero)
SPOT_BUYSpot market buy
SPOT_SELLSpot market sell

Pagination

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

GET /activity

Get paginated account activity: deposits, withdrawals, liquidations, and funding payments.
GET /v1/perps/activity?provider=hyperliquid&address=0x1234...

Parameters

NameInTypeRequiredDescription
providerquerystringYesProvider identifier
addressquerystringYesUser’s wallet address
startTimequeryintegerNoFilter: activity after this timestamp (ms)
endTimequeryintegerNoFilter: activity before this timestamp (ms)
cursorquerystringNoPagination cursor from previous response
limitqueryintegerNoItems per page (default 50, max 200)
typequerystring[]NoFilter by activity type(s): DEPOSIT, WITHDRAWAL, FUNDING, LIQUIDATION
x-lifi-api-keyheaderstringYesAPI key
x-lifi-integratorheaderstringNoIntegrator identifier

Response 200

The response contains a discriminated union of activity items — the type field determines which fields are present.
{
  "provider": "hyperliquid",
  "items": [
    {
      "id": "dep-001",
      "provider": "hyperliquid",
      "type": "DEPOSIT",
      "timestamp": "2025-01-15T10:00:00Z",
      "amount": "5000.00"
    },
    {
      "id": "wd-002",
      "provider": "hyperliquid",
      "type": "WITHDRAWAL",
      "timestamp": "2025-01-14T09:00:00Z",
      "amount": "1000.00",
      "fee": "1.00"
    },
    {
      "id": "fund-003",
      "provider": "hyperliquid",
      "type": "FUNDING",
      "timestamp": "2025-01-14T08:00:00Z",
      "asset": {
        "assetId": "BTC",
        "market": "hyperliquid",
        "displaySymbol": "BTC",
        "displayQuote": "USDC"
      },
      "amount": "-2.50",
      "positionSize": "0.5",
      "fundingRate": "0.0001"
    },
    {
      "id": "liq-004",
      "provider": "hyperliquid",
      "type": "LIQUIDATION",
      "timestamp": "2025-01-13T12:00:00Z",
      "liquidatedNotionalPosition": "50000.00",
      "accountValue": "100.00",
      "leverageType": "Cross",
      "liquidatedPositions": [
        {
          "asset": {
            "assetId": "ETH",
            "market": "hyperliquid",
            "displaySymbol": "ETH",
            "displayQuote": "USDC"
          },
          "size": "10.0"
        }
      ]
    }
  ],
  "pagination": {
    "limit": 50,
    "hasMore": true,
    "cursor": "abc123"
  }
}

Activity Types

All activity items share these base fields:
FieldTypeDescription
idstringActivity ID
providerstringProvider identifier
typestringActivity type (discriminator)
timestampstringISO 8601 timestamp
DEPOSIT — Funds deposited into the DEX account:
FieldTypeDescription
amountstringDeposit amount
WITHDRAWAL — Funds withdrawn from the DEX account:
FieldTypeDescription
amountstringWithdrawal amount
feestringWithdrawal fee
FUNDING — Funding payment received or paid on an open position:
FieldTypeDescription
assetAssetDisplayAsset identity
amountstringFunding amount (negative = paid)
positionSizestringPosition size at time of funding
fundingRatestringFunding rate applied
LIQUIDATION — Position(s) liquidated:
FieldTypeDescription
liquidatedNotionalPositionstringTotal notional value liquidated
accountValuestringAccount value at time of liquidation
leverageTypestringLeverage type (e.g., "Cross")
liquidatedPositionsLiquidatedPosition[]Positions that were liquidated
Each LiquidatedPosition:
FieldTypeDescription
assetAssetDisplayAsset identity
sizestringPosition size liquidated

Pagination

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