Skip to main content
POST
Get user fills
This endpoint provides fill data for Hyperliquid user addresses.
Drop-in ReplacementThis endpoint is a 1-1 replacement for the userFills, userFillsByTime and userTwapSliceFills endpoints in Hyperliquid. The userFillsByTime endpoint does not have any limits on historical data retrieval.

Authorizations

X-API-KEY
string
header
required

Body

application/json
type
enum<string>
required

Type of fills to retrieve. Applies to all request types.

Available options:
userFills,
userFillsByTime,
userTwapSliceFills
user
string
required

User's wallet address (hex string). Applies to all request types.

startTime
integer<int64>

Start time filter (Unix timestamp in milliseconds). Required for userFillsByTime. Only applies to userFillsByTime.

endTime
integer<int64>

End time filter (Unix timestamp in milliseconds). Only applies to userFillsByTime.

aggregateByTime
boolean

When true, aggregates multiple fills from the same order at the same timestamp into a single fill with combined size, weighted average price, and summed fees/PnL. Only applies to userFills and userFillsByTime.

twapMode
enum<string>

Controls TWAP fill filtering: 'none' (default) excludes TWAP fills, 'include' returns both regular and TWAP fills, 'only' returns only TWAP fills. Only applies to userFills and userFillsByTime.

Available options:
none,
include,
only

Response

Fills retrieved successfully

closedPnl
string | null

Realized PnL from closing a position with this fill

coin
string | null

Trading pair symbol (e.g., BTC, ETH)

crossed
boolean | null

Whether the order crossed the spread (i.e., was a taker order)

dir
string | null

Direction description (e.g., Open Long, Close Short, Buy, Sell)

hash
string | null

Transaction hash

oid
integer | null

Order ID

px
string | null

Execution price

side
string | null

Order side: B (buy) or A (sell)

startPosition
string | null

Position size before this fill was executed

sz
string | null

Fill size

time
integer | null

Fill timestamp (Unix timestamp in milliseconds)

fee
string | null

Trading fee amount

feeToken
string | null

Token used for fee payment

tid
integer | null

Unique trade ID

liquidation
object | null

Present only for liquidation fills. Contains liquidation details

builderFee
string | null

Builder fee if order was routed through a builder

builderAddress
string | null

Address of the builder if applicable

twapId
integer | null

TWAP order ID if this fill is part of a TWAP order