The framework BinanceAPI is written in Swift as a client of Binance API service to monitor the market status or even trade the cryptocurrencies with that.
To run the example project:
- Clone the repo.
- Run
pod install
from the Example directory first. - Following the How to Create API tutorial to create the API and Secret keys
- Put the keys as parameters of the service (e.g.
BinanceSavingService
) contructors.
let service = BinanceSavingService(
apiKey: "Replace it with your API Key",
secretKey: "Replace it with your Secret Key"
)
service.getProductList { result in
switch result {
case let .success(products):
print(products)
case let .failure(error):
print(error)
}
}
BinanceAPI is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'BinanceAPI'
Cheng Lung Lin, marslin@gmail.com
BinanceAPI is available under the MIT license. See the LICENSE file for more info.