Unified order data.
Represents the full state of an exchange order including fills, fees, and advanced order parameters.
Fields
id- Exchange order IDclient_order_id- Client-assigned order IDsymbol- Unified symbol (e.g., "BTC/USDT")timestamp- Order creation time in millisecondsdatetime- ISO 8601 datetime stringstatus- "open", "closed", or "canceled"type- "limit", "market", etc.side- "buy" or "sell"price- Order price (limit orders)amount- Requested quantity; options use base-currency exposurefilled- Quantity filled so far; options use base-currency exposureremaining- Quantity remaining; options use base-currency exposurecost- Total filled costaverage- Average fill pricefee- Cumulative feefees- Per-fill fee breakdowntrades- Individual fill executionstime_in_force- "GTC", "IOC", "FOK", "PO"stop_price,trigger_price- Stop/trigger pricestake_profit_price,stop_loss_price- TP/SL pricesreduce_only- Derivatives: reduce position onlypost_only- Maker-only orderlast_trade_timestamp,last_update_timestamp- Last activity timesinfo- 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
@type t() :: %Bourse.Order{ amount: number() | nil, average: number() | nil, client_order_id: String.t() | nil, cost: number() | nil, datetime: String.t() | nil, fee: Bourse.Fee.t() | nil, fees: [Bourse.Fee.t()], 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: [Bourse.Trade.t()], trigger_price: number() | nil, type: String.t() | nil }
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".
@spec schema() :: map()
JSON Schema for the Order unified type.