Unified trade execution data.
Represents a single fill/execution on an exchange.
Fields
id- Exchange trade IDorder_id- Associated order IDclient_order_id- Client-assigned order ID echoed on the fill, when the venue returns onesymbol- Unified symbol (e.g., "BTC/USDT")timestamp- Execution time in millisecondsdatetime- ISO 8601 datetime stringside- "buy" or "sell"type- Order type that produced this trade (e.g., "limit", "market")price- Execution priceamount- Quantity executedcost- Total cost (price * amount)taker_or_maker- "taker" or "maker"fee- Fee charged for this tradeinfo- Raw exchange response
Summary
Types
@type t() :: %Bourse.Trade{ amount: number() | nil, client_order_id: String.t() | nil, cost: number() | nil, datetime: String.t() | nil, fee: Bourse.Fee.t() | map() | nil, fees: [map()] | nil, id: String.t() | nil, info: map() | nil, order_id: String.t() | nil, price: number() | nil, side: String.t() | nil, symbol: String.t() | nil, taker_or_maker: String.t() | nil, timestamp: integer() | nil, type: String.t() | nil }
Functions
@spec schema() :: map()
JSON Schema for the Trade unified type.