Latest 0.0.2
Homepage https://github.com/stevewight/CryptoCompKit
License MIT
Platforms ios 11.0
Authors

Unofficial client library for accessing CryptoCompare.com’s market data

Getting Started

The Docs

Take a look at their API docs for an overview and more information on the publicly available currency data.

Note: CryptoCompKit currently makes a limited subset of api endpoints available. More to be added.

Usage

All market end points are accesed through the CryptoCompKit class:

let cryptoCompKit = CryptoCompKit()

Once you have a CryptoCompKit() object instance, you can call an end point:

List of Coins

cryptoCompKit.coinList { list, result in
  switch result {
  case .success(_):
    updateUI(coins:list.coins)
  case let .failure(error):
    handle(error:error)
  }
}

List of Prices

let from = ["BTC","ETH","LTC"]
let to = ["USD"]
cryptoCompKit.priceList(fSyms:from, tSyms:to) { list, result in
    switch result {
    case .success(_):
        updateUI(prices:list.prices)
    case .failure(_):
        handle(error:error)
    }
}

List of Historical Minutes (Candles)

cryptoCompKit.histoMinutes(fSym:"USD", tSym:"BTC") { list, result in
    switch result {
    case .success(_):
        updateUI(minutes:list.histos)
    case .failure(_):
        handle(error:error)
    }
}

Installation

The easiest way to use CryptoCompKit is with CocoaPods

Installation with CocoaPods

To integrate CryptoCompKit into your Xcode project using CocoaPods, specify it in your Podfile:

platform :ios, '11.0'

target 'TargetName' do
  pod 'CryptoCompKit'
end

Then, run the following command:

$ pod install

Pre-Release Version

This is a pre-release version of CryptoCompKit and although it is stable and should be working in all the above cases, things will be added, changed and potentially break.

License

CryptoCompKit is released under the MIT license

Latest podspec

{
    "name": "CryptoCompKit",
    "version": "0.0.2",
    "summary": "Client library for cryptocompare.com's API",
    "homepage": "https://github.com/stevewight/CryptoCompKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Steve Wight": "[email protected]"
    },
    "platforms": {
        "ios": "11.0"
    },
    "source": {
        "git": "https://github.com/stevewight/CryptoCompKit.git",
        "tag": "0.0.2"
    },
    "source_files": "CryptoCompKit/**/*.{h,m,swift}",
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "4"
    }
}

Pin It on Pinterest

Share This