TradableEventsDelegate
@objc public protocol TradableEventsDelegate: class
A delegate protocol for events such as receiving account metrics, candles or errors. Provides a variety of hooks.
-
A delegate hook for account metrics updates.
Declaration
Swift
@objc optional func tradableAccountMetricsUpdated(accountMetrics: TradableAccountMetrics)
Parameters
accountMetrics
A TradableAccountMetrics object that contains information about current account metrics.
-
A delegate hook for orders updates.
Declaration
Swift
@objc optional func tradableOrdersUpdated(orders: TradableOrders)
Parameters
orders
A TradableOrders object that contains a list of orders.
-
A delegate hook for positions updates.
Declaration
Swift
@objc optional func tradablePositionsUpdated(positions: TradablePositions)
Parameters
positions
A TradablePositions object that contains a list of positions.
-
A delegate hook for prices updates.
Declaration
Swift
@objc optional func tradablePricesUpdated(prices: TradablePrices)
Parameters
prices
A TradablePrices object containing a dictionary of instrument IDs to TradablePrice objects.
-
A delegate hook for candles updates.
Declaration
Swift
@objc optional func tradableCandlesUpdated(candles: TradableCandleResponse)
Parameters
candles
A TradableCandleResponse object that contains a list of candles.
-
A delegate hook for events error handling.
Declaration
Swift
@objc optional func tradableEventsError(error: TradableError)
Parameters
error
A TradableError object that contains detailed information about the error.