Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binance Exchange example, documentation. #5

Closed
rootscript opened this issue Jan 13, 2018 · 2 comments
Closed

Binance Exchange example, documentation. #5

rootscript opened this issue Jan 13, 2018 · 2 comments

Comments

@rootscript
Copy link

@trsathya Hello again. This Cryptex package installs fine using Swift Package Manager 4.

I would like to import Cryptex but would be grateful for an example of how to use the Cryptex package with the Binance exchange.

I'm guessing that I will need to generate an Api Key and Api Secret, but I'm unsure of how to use your module.

@trsathya
Copy link
Owner

trsathya commented Jan 13, 2018

Yes, Will add Usage section in README.md in next release.

In the meanwhile, create a temporary currencyStore like https://gist.github.com/trsathya/1ee672de3933b1b4b56891c3baf4212c.

Thanks, instantiate Binance api client as shown below.

let key = "<Your binance account api key>"
let secret = "<Your binance account api secret>"
let session = URLSession.shared
let userPreference = UserPreference(fiat: .USDT, crypto: .Bitcoin, ignoredFiats: [], currencyStore: CurrencyStore.shared)
let binanceAPIClient = Binance.Service(key:key, secret: secret, session: session, userPreference: userPreference)

@trsathya
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants