pub struct TradeMatch {
pub type_field: String,
pub trade_id: i64,
pub sequence: i64,
pub maker_order_id: String,
pub taker_order_id: String,
pub time: String,
pub product_id: String,
pub size: String,
pub price: String,
pub side: String,
}Expand description
Trade match event from Coinbase Advanced Trading API.
This structure represents a completed trade (match) between two orders on the exchange. It contains comprehensive information about the trade including the maker/taker orders, execution price, size, and timing.
§WebSocket Channel
This data is received via the matches channel subscription.
§Trade Direction
The side field indicates the taker’s side:
- “buy”: Taker bought (aggressive buy, price moved up)
- “sell”: Taker sold (aggressive sell, price moved down)
Fields§
§type_field: StringMessage type identifier, typically “match”
trade_id: i64Unique identifier for this trade
sequence: i64Sequence number for ordering events
maker_order_id: StringOrder ID of the maker (passive order already in the book)
taker_order_id: StringOrder ID of the taker (aggressive order that caused the match)
time: StringISO 8601 timestamp when the trade occurred
product_id: StringThe trading pair identifier (e.g., “BTC-USD”, “ETH-USD”)
size: StringThe quantity of the asset traded (as decimal string)
price: StringThe price at which the trade executed (as decimal string)
side: StringThe taker’s side: “buy” (aggressive buy) or “sell” (aggressive sell)