client.trades() when you want execution-level records only. Trade events represent executed transactions only. They are normalized so you can compare fills across venues without translating symbol formats or side conventions.
Method signature
Parameters
Return value
A single-pass iterator of normalized trade event dictionaries by default. Withoutput="batches", returns flat PyArrow record batches; with
output="dataframe", returns an eager Pandas DataFrame. Python columnar output
always includes nullable maker and taker string columns, even when the
source rows omit those identifiers.
Example response
Fields
Trade events use the standard event envelope withtype: "trade" and the following trade-specific fields under data:
data.price: matched execution pricedata.quantity: executed size in base unitsdata.order_id: v2 venue order or execution ID, as a string ornulldata.side: aggressor side; v2 usesbuy,sell, ornulldata.maker: optional venue-published account or address for the passive participantdata.taker: optional venue-published account or address for the aggressing participant
maker or taker continue to decode normally. Treat the
values as opaque venue identifiers; their format and casing depend on the
source.
Legacy iterator rows use timestamp; v2 rows use collector_timestamp for SDK
timing and retain nullable exchange_timestamp as venue provenance. Columnar
trade output uses the SDK timestamp as timestamp[ms, tz=UTC]; query boundary
integers remain epoch milliseconds. See the
event envelope for matching examples.
SDK types
Python exportsLegacyTradeData, TradeDataV2, LegacyTradeEvent,
TradeEventV2, and the TradeEvent union. TypeScript exposes optional maker
and taker fields on both legacy and v2 trade data interfaces. Rust exposes
typed optional fields on both event versions plus TradeEvent::maker() and
TradeEvent::taker() accessors.
Example
How it works
client.trades() filters trade rows from the standardized stream using
snapshot-first replay. See Snapshots
for the full flow.
Related documentation
- Events if you need more than just executions
- OHLCV if you want interval-based aggregations derived from trade flow
- Snapshots for venue-native raw snapshot files
- Quickstart