ZKExchangeRate

Objective-C

@interface ZKExchangeRate : NSObject

Swift

class ZKExchangeRate : NSObject

Record containing Zumo exchange rates used in making exchanges. Can also be used to display amounts in local currency to the user.

  • Declaration

    Objective-C

    - (nonnull instancetype)initWithId:(nonnull NSString *)id
                       depositCurrency:(nonnull NSString *)depositCurrency
                      withdrawCurrency:(nonnull NSString *)withdrawCurrency
                                 value:(nonnull NSDecimalNumber *)value
                               validTo:(int64_t)validTo
                             timestamp:(int64_t)timestamp;

    Swift

    init(id: String, depositCurrency: String, withdrawCurrency: String, value: NSDecimalNumber, validTo: Int64, timestamp: Int64)
  • Declaration

    Objective-C

    + (nonnull instancetype)exchangeRateWithId:(nonnull NSString *)id
                               depositCurrency:(nonnull NSString *)depositCurrency
                              withdrawCurrency:(nonnull NSString *)withdrawCurrency
                                         value:(nonnull NSDecimalNumber *)value
                                       validTo:(int64_t)validTo
                                     timestamp:(int64_t)timestamp;
  • id

    Identifier.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nonnull) NSString *id;

    Swift

    var id: String { get }
  • Currency from which exchange is being made.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nonnull) NSString *depositCurrency;

    Swift

    var depositCurrency: String { get }
  • Currency from which exchange is being made.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nonnull) NSString *withdrawCurrency;

    Swift

    var withdrawCurrency: String { get }
  • Value of 1 unit of deposit currency in withdraw currency.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nonnull) NSDecimalNumber *value;

    Swift

    var value: NSDecimalNumber { get }
  • Epoch timestamp representing expiration time of this exchange rate.

    Declaration

    Objective-C

    @property (nonatomic, readonly) int64_t validTo;

    Swift

    var validTo: Int64 { get }
  • Epoch timestamp when the exchange rate was issued.

    Declaration

    Objective-C

    @property (nonatomic, readonly) int64_t timestamp;

    Swift

    var timestamp: Int64 { get }