Use StreamData (TRADES stream) for real-time trades via gRPC, or userFills / userFillsByTime to query trade history for a specific address. For historical data, SQL Explorer has the hyperliquid_trades table.
Parameters
- typestringREQUIRED
Request type identifier specifying 'recentTrades' as the info endpoint method to retrieve the latest executed trades for a market
- coinstringREQUIRED
Trading pair symbol to retrieve recent market trades for, using standard symbols (e.g., 'BTC', 'ETH', 'SOL') for perpetuals or @index notation for spot markets
Returns
- tradesarray
Array of recent trade objects representing executed trades in the market
- coinstring
Trading pair symbol for this trade, e.g., 'BTC', 'ETH'. Confirms which market this trade executed on.
- sidestring
Taker side of the trade: 'B' for Bid (buy - taker bought, maker sold) or 'A' for Ask (sell - taker sold, maker bought).
- pxstring
Trade execution price at which this transaction occurred. Returned as string for decimal precision.
- szstring
Trade size indicating the quantity exchanged in this transaction. Returned as string to maintain precision.
- timeinteger
Unix timestamp in milliseconds when this trade executed. Use for time-series analysis and real-time trade feeds.
- hashstring
Blockchain transaction hash in hexadecimal format. Can be used for on-chain verification.
- tidinteger
Unique trade identifier for this executed transaction. Useful for correlating trades across feeds.
- usersarray
Array of user addresses (wallets) involved in the trade. Typically contains taker and maker addresses.