pub struct Order {Show 29 fields
pub account_id: String,
pub order_id: String,
pub exchange_order_id: Option<String>,
pub parent_order_id: Option<String>,
pub status: OrderStatus,
pub status_message: Option<String>,
pub status_message_raw: Option<String>,
pub order_timestamp: DateTime<Utc>,
pub exchange_timestamp: Option<DateTime<Utc>>,
pub exchange_update_timestamp: Option<DateTime<Utc>>,
pub trading_symbol: String,
pub exchange: Exchange,
pub instrument_token: u32,
pub order_type: OrderType,
pub transaction_type: TransactionType,
pub validity: Validity,
pub product: Product,
pub quantity: u32,
pub disclosed_quantity: u32,
pub price: f64,
pub trigger_price: f64,
pub average_price: f64,
pub filled_quantity: u32,
pub pending_quantity: u32,
pub cancelled_quantity: u32,
pub market_protection: f64,
pub meta: Option<OrderMeta>,
pub tag: Option<String>,
pub guid: String,
}
Expand description
Order data structure as returned by KiteConnect API
Fields§
§account_id: String
Account ID
order_id: String
Order ID assigned by the system
exchange_order_id: Option<String>
Exchange order ID
parent_order_id: Option<String>
Parent order ID for bracket/cover orders
status: OrderStatus
Order status
status_message: Option<String>
Status message from exchange
status_message_raw: Option<String>
Status message from OMS
order_timestamp: DateTime<Utc>
Order timestamp
exchange_timestamp: Option<DateTime<Utc>>
Exchange timestamp
exchange_update_timestamp: Option<DateTime<Utc>>
Exchange update timestamp
trading_symbol: String
Trading symbol
exchange: Exchange
Exchange
instrument_token: u32
Instrument token
order_type: OrderType
Order type
transaction_type: TransactionType
Transaction type (BUY/SELL)
validity: Validity
Validity
product: Product
Product type
quantity: u32
Quantity
disclosed_quantity: u32
Disclosed quantity
price: f64
Price
trigger_price: f64
Trigger price for SL orders
average_price: f64
Average price at which the order was executed
filled_quantity: u32
Filled quantity
pending_quantity: u32
Pending quantity
cancelled_quantity: u32
Cancelled quantity
market_protection: f64
Market protection percentage
meta: Option<OrderMeta>
Meta information
tag: Option<String>
Tag for the order
guid: String
GUID for idempotency
Implementations§
Source§impl Order
impl Order
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if order is completed
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Check if order is cancelled
Sourcepub fn is_rejected(&self) -> bool
pub fn is_rejected(&self) -> bool
Check if order is rejected
Sourcepub fn remaining_quantity(&self) -> u32
pub fn remaining_quantity(&self) -> u32
Get remaining quantity
Sourcepub fn is_partially_filled(&self) -> bool
pub fn is_partially_filled(&self) -> bool
Check if order is partially filled
Sourcepub fn fill_percentage(&self) -> f64
pub fn fill_percentage(&self) -> f64
Get fill percentage