CoinMarket

public struct CoinMarket : Equatable, CodableModel

Exchange Market

  • Exchange id, eg. binance

    Declaration

    Swift

    public let exchangeId: String
  • Exchange name, eg. Binance

    Declaration

    Swift

    public let exchangeName: String
  • 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 Exchange website

    Declaration

    Swift

    public let marketUrl: URL?
  • Market category, eg. Spot

    Declaration

    Swift

    public let category: Market.Category
  • Market fee type, eg. Percentage

    Declaration

    Swift

    public let feeType: Market.FeeType
  • Outliner

    Declaration

    Swift

    public let outlier: Bool
  • Percent of volume

    Declaration

    Swift

    public let adjustedVolume24hShare: 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].price

    • For accessing coin volume24h in BTC use market[.btc].volume24h

    • This method returns implicitly unwrapped optional Quote! - be sure to download Market(s) with requested QuoteCurrency before use

    Declaration

    Swift

    public subscript(currency: QuoteCurrency) -> Market.Quote! { get }

    Parameters

    currency

    QuoteCurrency, eg. .usd or .btc