Releases: dehesa/finance-ig
Deals & Lighstreamer fixes
- The
API.Activity
andStreamer.Deal.Update
payloads have been modified to be similar toAPI.Position
,API.WorkingOrder
, andAPI.Confirmation
. - Bundeling Lighstreamer binaries in an
.xcframework
produced some incompatibilities on the underlying ObjC calls. Those have now been fixed and allStreamer
subscriptions should work now. - Deal limits and stops now have better behavior.
iOS & tvOS support
The Lighstreamer.xcframework
has been updated to the 2.1.3 version (which fixed a bug that could stall the connection). Additionally the xcframework now bundles macOS, iOS, and tvOS.
It is worth noticing that macs with ARM64 architectures are not yet supported.
SPM support
- The framework can now be added through SPM.
- The Lighstreamer binaries are packaged in
.xcframework
(required by SPM).
Better Lighstreamer support
The major improvement in this release is the Streamer
instance, which has been rewritten for better performance and more functionality.
- The
Streamer
internal (i.e.Streamer.Channel
andStreamer.Subscription
) has been rewritten for leaner Combine pipelines and better error handling. Streamer
now support subscriptions to multiple items if the items are from the same category type.Streamer
andDatabase
tests have been expanded.Database
now exposes functionality to compress and optimize the underlying SQLite database.- The
Database.Location
case.inMemory
has been renamed to.memory
. - The database internals now can stop a long-read/write operation if the Combine pipeline is cancelled.
Enhancements and breaking changes
This release brings a lot of improvements and API changes. The breaking changes are targeted to harmonize the library usage, so similar functionality between the API, Lightstreamer, and Database is called in the same way.
- There is now a single error type (
IG.Error
) instead of a different error type for each subservice. The error type adopts SE-112 protocols andCustomDebugStringConvertible
. API
andStreamer
coalesce the functionality for positions, working orders, and confirmations under thedeal
subcategory.Streamer
now supportCONFIRM
andOPU
subscriptions.- The plural
prices
is used consistently everywhere. - The database have now extra functionality counting data points.
- Performance have been improved by reducing the amount of heap pointers within structures (making pure stack structures).
- Better support for non-forex markets.
- The tests have been expanded to better support positions and working orders.
Decimal optimizations
From the very beginning this framework used Foundation's Decimal
type for any floating-point number handling. There are two major downsides: it is an ObjC class and it is 160-bits wide.
When performing long floating-point computing, the Decimal
type accounts for more than half of the processing time (both on allocating/deallocating and the actual processing).
A new decimal number type of 64-bit width has been introduced and replace all floating-point computations.
Core functionality
The framework has been thinned and any extra fluff has been extracted. The functionality to connect to the API and Lightstreamer protocol and the price database are kept as the core of the framework.
Full API & Streamer support
This release contains:
- Full IG API support.
- Support for all Lightstreamer subscriptions.
- Combine publishers to store price data points in the SQLite database.
- Optional small Command-Line utility to keep running in the background to store the price data points of some targeted forex markets.
First public release
First public release for the Swift+IG interface. There is support for:
- API endpoints.
- Lightstreamer "real-time" events.
- SQLite data cache.
- Tests and convenience/optional wrappers.
There is sadly no SPM support yet since it is not possible to include pre-built binaries.