BittrexKit icon indicating copy to clipboard operation
BittrexKit copied to clipboard

Bittrex API client written in Swift

BittrexKit

BittrexKit is a Swift API client for Bittrex. See more details here. It supports all the APIs provided 🎉

// You need to provide apiKey and apiSecret right now even to call public APIs.
let bittrex = Bittrex(apiKey: "API_KEY", apiSecret: "API_SECRET")

bittrex.getBalances() { result in
  switch result {
    case .success(let response):
      // do something with my balances
    case .failure(let error):
      // handle any error
  }
}

bittrex.getTicker(market: "BTC-LTC") { result in
  switch result {
    case .success(let response):
      // do something with ticker
    case .failure(let error):
      // handle any error
  }
}

Supported API

Public APIs

public func getMarkets()
public func getCurrencires()
public func getTicker(market: String)
public func getMarketSummaries()
public func getMarketSummary(market: String)
public func getOrderBook(market: String)
public func getSellOrders(market: String)
public func getBuyOrders(market: String)
public func getMarketHistory(market: String)

Account APIs

public func getBalances()
public func getBalance(currency: String)
public func getDepositAddress(currency: String)
public func withdraw(currency: String, quantity: Double, address: String)

Market APIs

public func buyLimit(market: String, quantity: Double, rate: Double)
public func sellLimit(market: String, quantity: Double, rate: Double)
public func cancel(uuid: String)
public func getOpenOrders(market: String)

Requirements

  • Swift 4.0 or later
  • iOS 10.0 or later

Installation

Carthage

  • Insert github "yuzushioh/BittrexKit" to your Cartfile.
  • Run carthage update --platform ios.

Contribution

Any pull requests are very welcome!