Skip to main content

Aggregated Trades

API Description

Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.

HTTP Request

GET /bapi/defi/v1/public/alpha-trade/agg-trades

Full URL Example

https://www.binance.com/bapi/defi/v1/public/alpha-trade/agg-trades?symbol=ALPHA_118USDC

Parameters

NameTypeMandatoryDescription
symbolSTRINGYESe.g., "ALPHA_118USDC" – use token ID from Token List
fromIdLONGNOstarting trade ID to fetch from
startTimeLONGNOstart timestamp (milliseconds)
endTimeLONGNOend timestamp (milliseconds)
limitINTNOnumber of results to return (default 500, max 1000)

Response Structure

Array of objects, each representing an aggregated trade:

  • a: Integer (aggregate trade ID)
  • p: String (price)
  • q: String (quantity)
  • f: Integer (first trade ID)
  • l: Integer (last trade ID)
  • T: Integer (timestamp)
  • m: Boolean (true if buyer is market maker) ← deprecated field, can ignore

Response Example

{
"code": "000000",
"message": "",
"messageDetail": "",
"data": [
{
"a": 58470,
"p": "1.00",
"q": "1.00",
"f": 58470,
"l": 58665,
"T": 1752568680000,
"m": true
}
]
}