Market
public struct Market : Equatable, CodableModel
Exchange Market
-
Exchange pair, eg. ETH/BTC
Declaration
Swift
public let pair: String -
Base currency ID, eg. eth-ethereum
Declaration
Swift
public let baseCurrencyId: String -
Base currency name, eg. Ethereum
Declaration
Swift
public let baseCurrencyName: String -
Quote currency ID, eg. btc-bitcoin
Declaration
Swift
public let quoteCurrencyId: String -
Quote currency name, eg. Bitcoin
Declaration
Swift
public let quoteCurrencyName: String -
Market URL on
ExchangewebsiteDeclaration
Swift
public let marketUrl: URL? -
Market category, eg. Spot
Declaration
Swift
public let category: Category -
Market fee type, eg. Percentage
Declaration
Swift
public let feeType: FeeType -
Outliner
Declaration
Swift
public let outlier: Bool -
Percent of volume
Declaration
Swift
public let reportedVolume24hShare: Decimal -
Last update time
Declaration
Swift
public let lastUpdated: Date -
Use this method to access market data in provided quote currency
For accessing coin price in USD use
market[.usd].priceFor accessing coin volume24h in BTC use
market[.btc].volume24hThis method returns implicitly unwrapped optional
Quote!- be sure to download Market(s) with requestedQuoteCurrencybefore use
Declaration
Swift
public subscript(currency: QuoteCurrency) -> Quote! { get }Parameters
currencyQuoteCurrency, eg. .usd or .btc
-
Market.Quote
See moreDeclaration
Swift
public struct Quote : Codable, Equatable -
Market category
See moreDeclaration
Swift
public enum Category : String, Codable -
Market fees type
See moreDeclaration
Swift
public enum FeeType : String, Codable
Market Structure Reference