Skip to main content
POST
/
api
/
v1
/
developer
/
trading
/
hyperliquid
/
info
/
fills
Get user fills
curl --request POST \
  --url https://api.allium.so/api/v1/developer/trading/hyperliquid/info/fills \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "type": "userFills",
  "user": "0x1234567890abcdef1234567890abcdef12345678",
  "startTime": 1640995200000,
  "endTime": 1641081600000,
  "aggregateByTime": false
}
'
[
  {
    "closedPnl": "<string>",
    "coin": "<string>",
    "crossed": true,
    "dir": "<string>",
    "hash": "<string>",
    "oid": 123,
    "px": "<string>",
    "side": "<string>",
    "startPosition": "<string>",
    "sz": "<string>",
    "time": 123,
    "fee": "<string>",
    "feeToken": "<string>",
    "tid": 123,
    "liquidation": {
      "liquidatedUser": "<string>",
      "markPx": "<string>",
      "method": "<string>"
    },
    "builderFee": "<string>",
    "builderAddress": "<string>",
    "twapId": 123
  }
]
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

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

endTime
integer

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

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