CCXT.Order (ccxt_client v0.6.1)

Copy Markdown View Source

Unified order data.

Represents the full state of an exchange order including fills, fees, and advanced order parameters.

Fields

  • id - Exchange order ID
  • client_order_id - Client-assigned order ID
  • symbol - Unified symbol (e.g., "BTC/USDT")
  • timestamp - Order creation time in milliseconds
  • datetime - ISO 8601 datetime string
  • status - "open", "closed", or "canceled"
  • type - "limit", "market", etc.
  • side - "buy" or "sell"
  • price - Order price (limit orders)
  • amount - Requested quantity
  • filled - Quantity filled so far
  • remaining - Quantity remaining
  • cost - Total filled cost
  • average - Average fill price
  • fee - Cumulative fee
  • trades - Individual fill executions
  • time_in_force - "GTC", "IOC", "FOK", "PO"
  • stop_price, trigger_price - Stop/trigger prices
  • take_profit_price, stop_loss_price - TP/SL prices
  • reduce_only - Derivatives: reduce position only
  • post_only - Maker-only order
  • last_trade_timestamp, last_update_timestamp - Last activity times
  • info - Raw exchange response

Summary

Functions

Returns true if the order status is "canceled".

Returns true if the order status is "closed".

Returns true if filled equals amount (fully filled).

Returns true if the order status is "open".

JSON Schema for the Order unified type.

Types

t()

@type t() :: %CCXT.Order{
  amount: number() | nil,
  average: number() | nil,
  client_order_id: String.t() | nil,
  cost: number() | nil,
  datetime: String.t() | nil,
  fee: CCXT.Fee.t() | nil,
  filled: number() | nil,
  id: String.t() | nil,
  info: map() | nil,
  last_trade_timestamp: integer() | nil,
  last_update_timestamp: integer() | nil,
  post_only: boolean() | nil,
  price: number() | nil,
  reduce_only: boolean() | nil,
  remaining: number() | nil,
  side: String.t() | nil,
  status: String.t() | nil,
  stop_loss_price: number() | nil,
  stop_price: number() | nil,
  symbol: String.t() | nil,
  take_profit_price: number() | nil,
  time_in_force: String.t() | nil,
  timestamp: integer() | nil,
  trades: [CCXT.Trade.t()],
  trigger_price: number() | nil,
  type: String.t() | nil
}

Functions

canceled?(order)

@spec canceled?(t()) :: boolean()

Returns true if the order status is "canceled".

closed?(order)

@spec closed?(t()) :: boolean()

Returns true if the order status is "closed".

filled?(order)

@spec filled?(t()) :: boolean()

Returns true if filled equals amount (fully filled).

open?(order)

@spec open?(t()) :: boolean()

Returns true if the order status is "open".

schema()

@spec schema() :: map()

JSON Schema for the Order unified type.