ZKQuote

Objective-C

@interface ZKQuote : NSObject

Swift

class ZKQuote : NSObject

Record containing Zumo exchange rate quote used in making exchanges.

  • Declaration

    Objective-C

    - (nonnull instancetype)initWithId:(nonnull NSString *)id
                            expireTime:(int32_t)expireTime
                             expiresIn:(nullable NSNumber *)expiresIn
                          fromCurrency:(nonnull NSString *)fromCurrency
                            toCurrency:(nonnull NSString *)toCurrency
                         depositAmount:(nonnull NSDecimalNumber *)depositAmount
                                 value:(nonnull NSDecimalNumber *)value;

    Swift

    init(id: String, expireTime: Int32, expiresIn: NSNumber?, fromCurrency: String, toCurrency: String, depositAmount: NSDecimalNumber, value: NSDecimalNumber)
  • Declaration

    Objective-C

    + (nonnull instancetype)quoteWithId:(nonnull NSString *)id
                             expireTime:(int32_t)expireTime
                              expiresIn:(nullable NSNumber *)expiresIn
                           fromCurrency:(nonnull NSString *)fromCurrency
                             toCurrency:(nonnull NSString *)toCurrency
                          depositAmount:(nonnull NSDecimalNumber *)depositAmount
                                  value:(nonnull NSDecimalNumber *)value;
  • id

    Identifier.

    Declaration

    Objective-C

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

    Swift

    var id: String { get }
  • Epoch timestamp representing expiration time of this quote.

    Declaration

    Objective-C

    @property (nonatomic, readonly) int32_t expireTime;

    Swift

    var expireTime: Int32 { get }
  • Seconds until expiration time for active quotes, null for historical quotes.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *expiresIn;

    Swift

    var expiresIn: NSNumber? { get }
  • Deposit currency.

    Declaration

    Objective-C

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

    Swift

    var fromCurrency: String { get }
  • Target currency.

    Declaration

    Objective-C

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

    Swift

    var toCurrency: String { get }
  • Deposit amount to be exchanged to target currency.

    Declaration

    Objective-C

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

    Swift

    var depositAmount: NSDecimalNumber { get }
  • Value of 1 unit of deposit currency in target currency.

    Declaration

    Objective-C

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

    Swift

    var value: NSDecimalNumber { get }