CryptocurrencyQuote
protocol CryptocurrencyQuote
This is a protocol that encapsulates the data that will be returned when we get back from GQL query
CheckoutSession.cryptocurrencyQuotes
. It is a quote of the live value of a given crypto
funding instrument, valid for 30 seconds. Values returned are based on the amount of crypto the user
has for that holding, and the amount that the user is using in the purchase.
-
The price of the cryptocurrency per coin in the fiat currency
Declaration
Swift
var assetPrice: UnitAmount { get }
-
The id of the quote
Declaration
Swift
var id: String { get }
-
The quantity of coins/crypto needed to purchase item given the cryptocurrency. e.g. if this value is “0.01” and
symbol
is “BTC”, then the value represented is 0.01 BTCDeclaration
Swift
var quantity: String { get }
-
The symbol of the cryptocurrency (e.g. “BTC”)
Declaration
Swift
var symbol: String { get }
-
The total amount in the fiat currency that is being compared to the cryptocurrency
Declaration
Swift
var totalAmount: UnitAmount { get }