TradableOrder
@objc public class TradableOrder: NSObjectContains the order data, such as unique ID, instrument ID, amount, type, price, status and more.
- 
                  
                  Amount of the order. DeclarationSwift @objc public let amount: Double
- 
                  
                  Unix timestamp in milliseconds of the order creation. DeclarationSwift @objc public let creationDate: UInt64
- 
                  
                  Unique identifier of the order. DeclarationSwift @objc public let id: String
- 
                  
                  The unique identifier for the order’s instrument. DeclarationSwift @objc public let instrumentId: String
- 
                  
                  Order side. DeclarationSwift @objc public let side: TradableOrderSide
- 
                  
                  Order type. DeclarationSwift @objc public let type: TradableOrderType
- 
                  
                  Order status. DeclarationSwift @objc public let status: TradableOrderStatus
- 
                  
                  The price the limit or stop order will trigger at. For market orders it will be 0. DeclarationSwift @objc public let price: Double
- 
                  
                  Identifiers of the affected positions. Might not be available. DeclarationSwift @objc public let affectedPositionsIds: [String]?
- 
                  
                  The last tick price for the order’s symbol. Might not be available. DeclarationSwift public let lastPrice: Double?
- 
                  
                  The average execution price. Only available after the order is executed. DeclarationSwift public let executionPrice: Double?
- 
                  
                  The take profit attached to the order. Will be nil if no take profit is attached to the order. DeclarationSwift @objc public let takeProfit: TradableOrderProtection?
- 
                  
                  The stop loss attached to the order. Will be nil if no stop loss is attached to the order. DeclarationSwift @objc public let stopLoss: TradableOrderProtection?
- 
                  
                  Simple description of this object. DeclarationSwift public override var description: String
- 
                  
                  Modifies the order. DeclarationSwift @objc public func modify(with orderModification: TradableOrderModification, completionHandler: ((_ error: TradableError?) -> Void)!)ParametersorderModificationAn order modification object containing details about modifications to be done to this order. completionHandlerA closure to be called when the response comes back, with an optional TradableError object. 
- 
                  
                  Cancels the order. DeclarationSwift @objc public func cancel(_ completionHandler: ((_ error: TradableError?) -> Void)!)ParameterscompletionHandlerA closure to be called when the response comes back, with an optional TradableError object. 
- 
                  
                  Fetches the positions that have been affected by this order. DeclarationSwift @objc public func getAffectedPositions(_ completionHandler: ((_ affectedPositions: [TradablePosition]?) -> Void)!)ParameterscompletionHandlerA closure containing an optional list of affected positions. 
- 
                  
                  Gets the instrument for this order. DeclarationSwift @objc public func getInstrument(_ completionHandler: ((_ instrument: TradableInstrument?, _ error: TradableError?) -> Void)!)ParameterscompletionHandlerA closure to be called when the response comes back, with an optional TradableInstrument object and an optional TradableError object. 
- 
                  
                  Sets a TradableOrderStatusDelegate for this order. The delegate will be notified about order status change. Starts full updates if no orders or full updates are running, or orders updates if no updates are running at all. The delegate will not be called if full/orders updates are not running! Throws TradableArgumentError.incorrectOrderStatus if the order status is incorrect (not .pending). DeclarationSwift @objc public func setStatusChangeDelegate(_ delegate: TradableOrderStatusDelegate?) throwsParametersdelegateThe delegate to be set. If nil, the delegate previously assigned will be removed. 
 View on GitHub
View on GitHub TradableOrder Class Reference
        TradableOrder Class Reference