For the complete documentation index, see llms.txt. This page is also available as Markdown.

userLeverageUpdatesByTime

Paginate a user's leverage change history by time, oldest-first.

Returns leverage updates (updateLeverage actions) for a user with timestartTime (or after a cursor), ordered oldest-first by time then tx_index.

For pagination: pass startTime for the first page, then on each subsequent page pass the cursor "{time}_{tx_index}" built from the last record of the previous response. When cursor is supplied, startTime is ignored and the boundary record is excluded from the next page (no duplicates).

New endpoint - this endpoint is not a part of original Hyperliquid API and is added by us for builder convenience.

This endpoint returns leverage changes only. The userLeverageUpdates WebSocket channel additionally interleaves isolated-margin records for backward compatibility — for that history, use userIsolatedMarginUpdatesByTime. Record shapes match the WS channel's, so REST history and the live stream can be merged and deduplicated on (time, tx_index).

POST Request

Field
Type
Description

type

string

Must be "userLeverageUpdatesByTime"

user

string

Ethereum address (0x-prefixed, 42 characters)

startTime

integer

Earliest time to include (Unix ms, inclusive). Skipped when cursor is used. Either startTime or cursor must be supplied

endTime

integer

Latest time to include (Unix ms, inclusive). Default: now (optional)

cursor

string

Composite of time and tx_index with "_" separator (e.g. "1734571490123_12"). Take from the last record of the previous response (optional)

limit

integer

Max results to return. Default 100, max 500 (optional)

# First page
curl -X POST https://api.hydromancer.xyz/info \
  -H "Authorization: Bearer $HYDROMANCER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "userLeverageUpdatesByTime",
    "user": "0x0000000000000000000000000000000000000000",
    "startTime": 0,
    "limit": 100
  }'

# Next page — cursor built from the last record of the previous response
curl -X POST https://api.hydromancer.xyz/info \
  -H "Authorization: Bearer $HYDROMANCER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "userLeverageUpdatesByTime",
    "user": "0x0000000000000000000000000000000000000000",
    "cursor": "1734571490123_12",
    "limit": 100
  }'

Response Fields

JSON array of leverage update records, ordered oldest-first by time then tx_index.

Field
Type
Description

update_type

string

Always "leverage"

time

int

Block time when the update was made (Unix ms) — first half of the next-page cursor

user

string

Ethereum address

coin

string

Asset symbol

is_cross

boolean

true for cross margin, false for isolated margin

leverage

int

New leverage value

tx_index

int

Transaction index within the block — second half of the next-page cursor

Last updated