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
                                   ttl:(int32_t)ttl
                             createdAt:(nonnull NSString *)createdAt
                             expiresAt:(nonnull NSString *)expiresAt
                         debitCurrency:(nonnull NSString *)debitCurrency
                        creditCurrency:(nonnull NSString *)creditCurrency
                                 price:(nonnull NSDecimalNumber *)price
                               feeRate:(nonnull NSDecimalNumber *)feeRate
                           debitAmount:(nonnull NSDecimalNumber *)debitAmount
                             feeAmount:(nonnull NSDecimalNumber *)feeAmount
                          creditAmount:(nonnull NSDecimalNumber *)creditAmount;

    Swift

    init(id: String, ttl: Int32, createdAt: String, expiresAt: String, debitCurrency: String, creditCurrency: String, price: NSDecimalNumber, feeRate: NSDecimalNumber, debitAmount: NSDecimalNumber, feeAmount: NSDecimalNumber, creditAmount: NSDecimalNumber)
  • Declaration

    Objective-C

    + (nonnull instancetype)quoteWithId:(nonnull NSString *)id
                                    ttl:(int32_t)ttl
                              createdAt:(nonnull NSString *)createdAt
                              expiresAt:(nonnull NSString *)expiresAt
                          debitCurrency:(nonnull NSString *)debitCurrency
                         creditCurrency:(nonnull NSString *)creditCurrency
                                  price:(nonnull NSDecimalNumber *)price
                                feeRate:(nonnull NSDecimalNumber *)feeRate
                            debitAmount:(nonnull NSDecimalNumber *)debitAmount
                              feeAmount:(nonnull NSDecimalNumber *)feeAmount
                           creditAmount:(nonnull NSDecimalNumber *)creditAmount;
  • id

    Identifier.

    Declaration

    Objective-C

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

    Swift

    var id: String { get }
  • ttl

    Expiration in seconds at the time of quote creation, e.g. 60.

    Declaration

    Objective-C

    @property (nonatomic, readonly) int32_t ttl;

    Swift

    var ttl: Int32 { get }
  • Timestamp when quote was created, e.g. “2022-10-13T12:39:59.056Z”.

    Declaration

    Objective-C

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

    Swift

    var createdAt: String { get }
  • Timestamp representing expiration time of this quote, e.g. “2022-10-13T12:40:58.871Z”.

    Declaration

    Objective-C

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

    Swift

    var expiresAt: String { get }
  • Debit currency.

    Declaration

    Objective-C

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

    Swift

    var debitCurrency: String { get }
  • Credit currency.

    Declaration

    Objective-C

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

    Swift

    var creditCurrency: String { get }
  • Value of 1 unit of debit currency in credit currency.

    Declaration

    Objective-C

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

    Swift

    var price: NSDecimalNumber { get }
  • Fee rate in points of a percentage, e.g. “0.1” representing 0.1%

    Declaration

    Objective-C

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

    Swift

    var feeRate: NSDecimalNumber { get }
  • Amount to be debited from debit account.

    Declaration

    Objective-C

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

    Swift

    var debitAmount: NSDecimalNumber { get }
  • Amount that will be paid in fees.

    Declaration

    Objective-C

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

    Swift

    var feeAmount: NSDecimalNumber { get }
  • Amount to be credited to credit account.

    Declaration

    Objective-C

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

    Swift

    var creditAmount: NSDecimalNumber { get }