Swift SDK

1 post / 0 new
Swift SDK

Over the past few months, I have been developing a Swift wrapper over IG's API, the Lightstreamer protocol, and a SQLite database so I can use it on my own trading. I am now at a point that I am not totally embarrassed about it, so check it out if you are interested. Github: https://github.com/dehesa/IG

The frameworks' main advantages are:

  • Support for all public IG's API endpoints.
  • Support for all Lightstreamer events and integration with Combine.
  • Optional available cache with SQLite database.
  • All types have been converted to Swift and Foundation types (i.e. dates/times are not strings but Date types, enums for enumeration strings, number values are not Doubles/Strings but Decimal types, etc.).
  • No 3rd party dependencies (more than the Lighstreamer framework which comes embedded in the framework).
  • Support for iOS and macOS.
  • Compile-time check for most operations.
  • Extensive documentation.
  • OAuth and Certificate token support (with refreshes).

There are many more interesting details there, but for me the most useful is to have a compiled language telling me when I am making mistakes and forcing me to input the right type instead of relying on JSON strings or my memory.

Since the very beginning I decided to develop it Open Source so maybe it is also useful for other people and even better, maybe someone will like to contribute.