CCXT.Trade (ccxt_client v0.6.1)

Copy Markdown View Source

Unified trade execution data.

Represents a single fill/execution on an exchange.

Fields

  • id - Exchange trade ID
  • order_id - Associated order ID
  • symbol - Unified symbol (e.g., "BTC/USDT")
  • timestamp - Execution time in milliseconds
  • datetime - ISO 8601 datetime string
  • side - "buy" or "sell"
  • type - Order type that produced this trade (e.g., "limit", "market")
  • price - Execution price
  • amount - Quantity executed
  • cost - Total cost (price * amount)
  • taker_or_maker - "taker" or "maker"
  • fee - Fee charged for this trade
  • info - Raw exchange response

Summary

Functions

JSON Schema for the Trade unified type.

Types

t()

@type t() :: %CCXT.Trade{
  amount: number() | nil,
  cost: number() | nil,
  datetime: String.t() | nil,
  fee: CCXT.Fee.t() | 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

schema()

@spec schema() :: map()

JSON Schema for the Trade unified type.