angelocarbone / pyiqoapi

pyiqoapi is a python wrapper for IQOption's API.
6 stars 9 forks source link

Question - not an issue. #2

Open everSin opened 7 years ago

everSin commented 7 years ago

Hi there, my question is a little bit offtopic and I'm not sure which direction to go. My goal is to translate your API into Swift, to use with in macOS / Linux based Software with a Swift code base.

Can you tell me how you went about, building this API from scratch? (sorry for writing via issues, didn't find any other means of contacting you)

cheers, S.

angelocarbone commented 6 years ago

Hi @everSin and sorry for the late in response. Yep is it possible to translate the code in Swift but I recall you that there are many pattern to integrate python code in Swift, a simple google search will help you. Otherwise, if you are not satisfied, you can rewrite the code in Swift opening socket/http request using https/wss string contained in pyiqoapi.py:

self.https_url = "https://{host}/api".format(host=self._hostname)
self.wss_url = "wss://{host}/echo/websocket".format(host=self._hostname)

I hope this help you.

If you have other questions or are not satisfied to response, please don't esitate to contact me.