info
endpoint with type: "userFillsByTime"
retrieves a user’s trading fills (executed orders) within a specific time range on the Hyperliquid exchange. This endpoint provides time-filtered access to detailed trade execution data, making it ideal for historical analysis and reporting.
Parameters
Request body
type
(string, required) — The request type. Must be"userFillsByTime"
to retrieve user fills by time range.user
(string, required) — Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.startTime
(integer, required) — Start time in milliseconds, inclusive.endTime
(integer, optional) — End time in milliseconds, inclusive. Defaults to current time.aggregateByTime
(boolean, optional) — When true, partial fills are combined when a crossing order gets filled by multiple different resting orders. Resting orders filled by multiple crossing orders will not be aggregated.
Response
The response is an array of fill objects within the specified time range, with each fill containing detailed trade information:Fill data structure
Each fill object contains the following fields: Core trade data:coin
— Asset identifier (simple names like “BTC”, “ETH” for perpetuals; spot format like “@107” for spot trades)px
— Fill price as a string for precisionsz
— Fill size (quantity traded)side
— Trade side: “A” for Ask/Sell, “B” for Bid/Buytime
— Fill timestamp in millisecondsoid
— Order ID that generated this filltid
— Unique trade ID
startPosition
— Position size before this filldir
— Trade direction (e.g., “Open Long”, “Close Short”, “Buy”, “Sell”)closedPnl
— Realized profit/loss from this fillcrossed
— Boolean indicating if this was a crossing order
fee
— Trading fee paid for this fillfeeToken
— Token used to pay the fee (typically “USDC”)builderFee
— Builder fee (optional, only present if non-zero)hash
— Transaction hash for blockchain verification
Time range filtering
Time parameters:startTime
— Inclusive start timestamp in millisecondsendTime
— Inclusive end timestamp (optional, defaults to current time)- Time range can span any period within the available data window
- Only the 10,000 most recent fills are available
- Older fills beyond this limit are not accessible
- Maximum 2000 fills returned per response
Pagination and limits
Response limits:- Maximum 2000 fills per response
- Results are ordered by time (most recent first)
- For larger time ranges, multiple requests may be needed
- Use the
time
field of the last returned fill as the newendTime
- Subtract 1 millisecond to avoid duplicate results
- Continue until no more fills are returned
Asset identification
Perpetual contracts:- Use simple asset names: “BTC”, “ETH”, “AVAX”, “SOL”
- Represent standard perpetual futures contracts
- Use indexed format: “@107”, “@1”, etc.
- Index corresponds to the spot pair position in the universe
- Some assets may have remapped names in user interfaces
Example request
Example response
Use cases
Theinfo
endpoint with type: "userFillsByTime"
is essential for applications that need to:
- Historical analysis: Analyze trading patterns and performance over specific time periods
- Reporting and analytics: Generate time-based trading reports and performance metrics
- Tax compliance: Extract trading data for specific tax periods and jurisdictions
- Audit trails: Maintain detailed records of trading activity within defined timeframes
- Performance attribution: Analyze trading performance by specific time periods or market conditions
- Risk analysis: Study trading behavior during specific market events or volatility periods
- Strategy backtesting: Use historical fill data to validate trading strategies over time
- Compliance reporting: Generate regulatory reports for specific reporting periods
- Portfolio reconciliation: Match fills against expected executions within time windows
- Fee analysis: Calculate trading costs and analyze fee patterns over time
- Market impact studies: Analyze execution quality during specific market conditions
- Trading pattern analysis: Identify trends and patterns in trading behavior over time
- Data synchronization: Keep external systems synchronized with trading activity
- Custom dashboards: Build time-filtered views of trading activity and performance
- Automated reporting: Generate scheduled reports for specific time periods
Body
The request type. Must be "userFillsByTime" to retrieve user fills by time range.
userFillsByTime
Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.
Start time in milliseconds, inclusive
End time in milliseconds, inclusive. Defaults to current time.
When true, partial fills are combined when a crossing order gets filled by multiple different resting orders. Resting orders filled by multiple crossing orders will not be aggregated.
Response
Successful response with user fills data within the specified time range
Closed profit and loss for the fill
Asset symbol (e.g., 'BTC', 'ETH') for perpetuals or spot format (e.g., '@107') for spot trades
Whether this was a crossing order
Direction of the trade (e.g., 'Open Long', 'Close Short', 'Buy', 'Sell')
Transaction hash
Order ID
Fill price
Side of the trade: 'A' for Ask/Sell, 'B' for Bid/Buy
A
, B
Position size before this fill
Fill size
Fill timestamp in milliseconds
Trading fee paid
Token used to pay the fee (typically 'USDC')
Builder fee (optional, only present if non-zero)
Trade ID