/BittrexTracker

SWIFT Bittrex API wrapper

Primary LanguageSwiftMIT LicenseMIT

Build Status GitHub release GitHub release

BittrexTracker

A framework acting as a SWIFT wrapper around the Bittrex Exchange APIs allowing the retrieval of public, market and account data.

Contents

Development Version

  • 1.4.3

Supported API

Bittrex Public APIs:

  • getMarkets
  • getCurrencies
  • getTicker
  • getMarketSummaries
  • getMarketSummary
  • getOrderBook
  • getMarketHistory

Bittrex Market APIs:

  • buyLimit
  • sellLimit
  • cancel
  • getOpenOrders

Bittrex Account APIs:

  • getBalances
  • getBalance
  • getDepositAddress
  • withdraw
  • getOrder
  • getOrderHistories
  • getOrderHistory
  • getWithdrawalHistories
  • getWithdrawalHistory
  • getDepositHistories
  • getDepositHistory

Requirements

  • iOS 10.0+
  • Xcode 10.0+
  • Swift 4.0+

Installation

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate BittrexTracker into your Xcode project using Carthage, specify it in your Cartfile:

github "matthewdovey/BittrexTracker"

Run carthage update to build the framework and drag the built BittrexTracker.framework into your Xcode project.

Built With

Usage

Import the framework into the class you wish to use it in:

#import BittrexTracker

Call the desired API on the created manager object and access the data or error encapsulated in the result:

let bittrexManager = BittrexManager()

bittrexManager.getCurrencies { result in
  switch result {
  case .success(let data):
    print(data)
  case .failure(let error):
    print(error)
  }
}

bittrexManager.getMarkets { result in
  switch result {
  case .success(let data):
    print(data)
  case .failure(let error):
    print(error)
  }
}

Contributing

Feel free to contribute with pull requests and to create issues / feature requests following the contributing file

Versioning

This version will be increased by 0.1.0 per release and 0.0.1 per pull request that goes into the project.

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details