Releases: mgnsm/Millistream.NET
Version 2.4.0
This version wraps the new functionality in version 1.0.29 of the native libdmf library.
- 0f6cf80 Two new read-only properties,
ConnectedHostandConnectedIPAddress, have been added to theMarketDataFeedclass and theIMarketDataFeedinterface - 2569f22 A new overload the
Addmethod that can be used to set the delay of the message directly has been added to theMessageclass and theIMessageinterface - 5b5f45e The getters of the
BindAddress,MessageDigests,Ciphers,MessageDigestandCipherproperties of theMessageclass no longer throws anInvalidOperationExceptionwhen the nativemdf_get_propertyfunction returns 0. Instead they simply returnnull. - 323da3f A new
staticDelayValuesclass that containsbyteconstants for the various supported delay values has been added - e24345f The default value of the
Delayproperty of theMessageclass has been changed toDelayValues.MDF_DLY_BEST - 63ff366 Variadic arguments are now correctly handled and passed to the native library on macOS running on ARM64 architecture. This applies to all getters of the
MarketFeedDataclass exceptDelayandMessageClass.
Version 2.3.0
This version wraps the new functionality in version 1.0.27 of the native libdmf library. The following members have been added to the MarketDataFeed class and the IMarketDataFeed interface:
- 5327a64 An
IntPtr Extract(out ushort mref, out ulong insref, out uint len)method that can be used to extract an unmanaged pointer to the current message from the feed handle - 5b75d1e An
int Inject(IntPtr ptr, uint len)method that injects a previously extracted message - 5b75d1e Another
int Inject(ReadOnlySpan<byte> data)overload to inject the byte data of a previously extracted message into the handle - 14a22c8 A read-only
ReadBufferSizeproperty that gets the number of bytes waiting to be processed in the internal read buffer after a call to theConsumemethod - 94f6522 A read-write
ReadBufferMaxSizeproperty that gets and sets the current size of the internal read buffer
Other changes in this release include this:
-
5ee24f5 The following
ReadOnlySpan<byte>method overloads of theMessageclass have been added to theIMessageinterface:bool AddNumeric(uint tag, ReadOnlySpan<byte> value);bool AddNumeric(Field tag, ReadOnlySpan<byte> value);bool AddString(uint tag, ReadOnlySpan<byte> value);bool AddString(uint tag, ReadOnlySpan<byte> value, int length);bool AddString(Field tag, ReadOnlySpan<byte> value);bool AddString(Field tag, ReadOnlySpan<byte> value, int length);bool AddDate(uint tag, ReadOnlySpan<byte> value);bool AddDate(Field tag, ReadOnlySpan<byte> value);bool AddTime(uint tag, ReadOnlySpan<byte> value);bool AddTime(Field tag, ReadOnlySpan<byte> value);bool AddList(uint tag, ReadOnlySpan<byte> value);bool AddList(Field tag, ReadOnlySpan<byte> value);
-
a959bd2 The following enumerations have been marked with the
[ObsoleteAttribute]and will probably be remove in a future version:CompressionLevelCorporateActionFieldMessageClassesMessageReferenceRequestClassRequestTypeTradeCodes
Fieldhas been replaced by astaticFieldsclass that contains constants for all fields.
SimilarlyMessageReferencehas been replaced by a staticMessageReferencesclass that contains constants for all message references,RequestClasshas been replaced by aRequestClassesclass with constants for all request classes andRequestTypehas been replaced by aRequestTypesclass that contains the constants for all request types. -
b758a9c
MDF_F_EVENTSTATUS,MDF_F_SMA20,MDF_F_SMA50,MDF_F_SMA200,MDF_F_RSI14,
MDF_F_MACD,MDF_F_TRADESTATEACTIONS,MDF_F_SHARECLASShave been added to the deprecatedFieldenumeration and as constants in the newFieldsclass -
ffec795 The finalizer of the
Messageclass no longer throws aNullReferenceExceptionwhen you pass an invalid native library path to the constructor overload that accepts astring
Version 2.2.0
-
3d3a82b2 Methods that previously threw an
ObjectDisposedExceptionnow simply returnfalseif the instance has been disposed. Property getters return the default value and property setters silently fail to set the backing field. -
d7371efc An
InvalidOperationExceptionis no longer thrown when a function is missing from the installed version of the wrapped libmdf library. Methods that previously threw in this case now simply returnfalsewhile property getters return the default value and property setters silently fail (just as with 3d3a82b2). -
56215e44 The
DeserializeandMovemethods of theMessageclass and theConnectandSendmethods of theMarketDataFeedclass no longer throw anArgumentNullException. Instead, these methods returnfalsewhen an invalid (null) argument is supplied. -
f414dfda The
AddInt64andAddUInt64methods of theMessageclass no longer throw anArgumentExceptionwhen thedecimalsparameter is not between0and19. Instead, they bypass the check to the wrapped libmdf implementation and returnfalseif the argument is invalid. -
8bf8a133 The
System.Runtime.InteropServices.NativeLibraryAPI is now internally used to load the wrapped libmdf library on supported (.NET Core 3.0 and later) platforms. This removes the dependency onlibdlon Linux platforms. -
d4ae641b
MDF_F_CLOSEPRICEDATE,MDF_F_PRIIP00001,MDF_F_PRIIP00002,MDF_F_PRIIP00004,MDF_F_PRIIP00005,MDF_F_PRIIP00006,MDF_F_PRIIP00007,MDF_F_PRIIP00008,MDF_F_PRIIP00009,MDF_F_PRIIP00015,MDF_F_PRIIP00016,MDF_F_PRIIP00017,MDF_F_PRIIP00075,MDF_F_PRIIP00110,MDF_F_PRIIP01095,MDF_F_PRIIP01125,MDF_F_PRIIP02032,MDF_F_PRIIP02035,MDF_F_PRIIP02062,MDF_F_PRIIP02065,MDF_F_PRIIP02092,MDF_F_PRIIP02095,MDF_F_PRIIP02122,MDF_F_PRIIP02125,MDF_F_PRIIP02185,MDF_F_PRIIP02190,MDF_F_PRIIP02200,MDF_F_PRIIP02210,MDF_F_PRIIP02220,MDF_F_PRIIP04086,MDF_F_PRIIP04087,MDF_F_PRIIP04088,MDF_F_PRIIP04089,MDF_F_PRIIP04120,MDF_F_PRIIP04130,MDF_F_PRIIP04140,MDF_F_PRIIP04150,MDF_F_PRIIP04160,MDF_F_PRIIP06005,MDF_F_PRIIP07005,MDF_F_CLOSEPRICE4Y,MDF_F_CLOSEPRICE6,MDF_F_CLOSEPRICE7Y,MDF_F_CLOSEPRICE8Y,MDF_F_CLOSEPRICE9Y,MDF_F_CLOSEYIELD4Y,MDF_F_CLOSEYIELD6,MDF_F_CLOSEYIELD7Y,MDF_F_CLOSEYIELD8Y,MDF_F_CLOSEYIELD9Y,MDF_F_SWINGFACTORSUB,MDF_F_CLEARING,MDF_F_LASTMOD,MDF_F_APPLICABLENAV,MDF_F_FUNDCUTOFFTIME,MDF_F_AVGTURNOVER1W,MDF_F_AVGTURNOVER1M,MDF_F_AVGTURNOVER3M,MDF_F_AVGTURNOVER1YandMDF_F_AVGTURNOVERYTDhave been added to theFieldenumeration -
95e9bf56 d1b22553 The default marshalling for strings is now internally used for the overloads of the
AddDate,AddList,AddNumeric,AddTimeandDeserializemethods of theMessageclass that acceptstringarguments, as well as for theConnectmethod of theMarketDataFeedclass -
b873ab4a The internal implementation of the
MarketFeedDataandMessageclasses now use the sharedSystem.Buffers.ArrayPool<T>class instead of stack allocating data to be passed to the wrapped libmdf library -
d50747c0 The
System.MemoryNuGet package dependency has been updated to version 4.5.5
Version 2.1.0
This version wraps all new functionality in version 1.0.26 of the native data feed API (MDF) while still staying backwards compatible with version 1.0.25.
-
3e0be47 A
HandleDelayproperty that lets you enable delay-mode on the connection has been added to the genericMarketDataFeedclass -
0b6de2d A
Delayproperty that returns the intended delay of the current received message if delay-mode is enabled on the connection has been added to the genericMarketDataFeedclass -
3371e67 A
MessageClassproperty that returns the message class of the current received message has been added to the genericMarketDataFeedclass -
0f0f4aa A
Timeoutproperty that returns the number of seconds you have to wait in maximum before having to call theConsumemethod to let it handle internal idle timers has been added to the genericMarketDataFeedclass -
ddd3e67 A
Delayproperty that gets or sets the intended delay of the message has been added to theMessageclass -
6894e25 A
FieldCountproperty that returns the number of added fields to the current message has been added to theMessageclass -
04a2736 A new message type
MDF_M_QUOTEEXhas been added to theMessageReferenceenumeration,
a newMDF_MC_QUOTEEXmessage class has been added to theMessageClassesenumeration and a newMDF_RC_QUOTEEXrequest class has been added to theRequestClassenumeration -
19a0e1e New overloads of the
GetNextMessagemethod without themclassparameter - this one lets you retrieve the message class of the fetched message - have been added to the genericMarketDataFeedclass. With the addition of the newMDF_MC_QUOTEEXmessage class, the value may no longer fit in anintand can instead be fetched using the newMessageClassproperty that returns aulongvalue. The old overloads of theGetNextMessagemethod are still available for backward compatibility reasons. -
9d0569b
MDF_F_COMBOLEGS,MDF_F_SWINGFACTOR,MDF_F_SWINGMETHOD,MDF_F_INCOMEPROPMAN,MDF_F_CLOSEPRICE1DDATEandMDF_F_CLOSEPRICEDATEhave been added to theFieldenumeration -
13fffc3 An
InvalidOperationExceptionis now explicitly thrown from theCompressionLevel,Delay,FieldCountandUtf8Validationproperties of theMessageclass and theDelayandMessageClassproperties of the genericMarketDataFeedclass when a function that is required to retrieve or set a value is missing from the current installed version of the native library.An exception is also thrown from the
AddDate,AddInt64,AddString,AddTime2,AddTime3,AddUInt64,Deserialize,MoveandSerializemethods of theMessageclass if the corresponding native function is missing from the installed version of the native library. -
2c178b2 The generic
IMarketDataFeedinterface has been extended to include all public members of the genericMarketDataFeedclass
Version 2.0.1
- d24978c A fix to avoid trying to load the native library from the default path when a custom path is supplied
- 83fdc34 Added
MDF_F_S12,MDF_F_S13,MDF_F_S14,MDF_F_S15,MDF_F_N6,
MDF_F_N7,MDF_F_N8,MDF_F_N9,MDF_F_N10,MDF_F_I6,MDF_F_I7,
MDF_F_I8,MDF_F_I9,MDF_F_I10,MDF_F_INSREF1,MDF_F_INSREF2,
MDF_F_INSREF3,MDF_F_INSREF4andMDF_F_INSREF5to theFieldenumeration
Version 2.0.0
This version is backwards incompatible (breaking) but adds support for:
- Requesting data by creating and sending messages just like you do using the wrapped libmdf C/C++ API
- Sending data to the system (assuming you have sufficient permissions)
- Creating messages using a new
Messageclass which is a managed implementation of themdf_message_thandle that can contain several messages - Adding any numeric, integer, string, date, time and list fields that are supported by the native API to a message
- Consuming data and fetching messages and fields "manually" on the same thread using a new
MarketDataFeedclass which is a managed implementation of the nativemdf_tAPI handle and a replacement for the removedDataFeedclass - Registering data and status callbacks with strongly-typed custom and settable user data
- Sending of multiple messages
- Resetting and reusing of messages
- Removal of a message from a message handle
- Moving of messages between message handles
- Serialization and deserialization of messages
- Setting the zlib compression level and disabling UTF-8 validation
- Setting the current API error code and the number of sent and received bytes between the client and the server
- Getting the file descriptor used by the connection and the time difference between the client and the server in nanoseconds
- Setting a numerical bind address to which the API will bind before attempting to connect
- Enabling or disabling encryption
- Limiting the supported message digests used to authenticate messages between the server and the client
- Limiting the supported ciphers used to encrypt messages between the server and the client
- Two-factor authentication using an extra credential
- Specifying a custom path to the native dependency
- A bit field (flags)
MessageClassesenumeration (enum) that defines all message classes
The latest connections statuses, fields/tags, message references and request classes in libmdf 1.0.25 have been added to the existing enums. For each method that accepts an enum value, an overload that accepts the underlying value (int or uint) has been added to make the API forward compatible and being able to handle new fields/tags, messages, and request classes without updating.
string constants for all message classes and request types have also been defined to make them easier to use in Message.AddNumeric (which is the managed counterpart of mdf_message_add_numeric), e.g.:
message.AddNumeric(Field.MDF_F_REQUESTTYPE, StringConstants.RequestTypes.MDF_RT_FULL);
- Besides the
DataFeedclass, theRequestMessage,ResponseMessage,SubscribeMessage,UnsubscribeMessage,ConnnectionStatusChangedEventHandlerandConnectionStatusChangedEventArgstypes have also been removed (breaking)
DataTypes Version 1.1.0
Numbernow implementsIFormattableand supports the common standard numeric format strings- Leading and trailing zeros have been removed from the output of a parsed
Number - Improved
ReadOnlySpan<byte>parsing performance for most types
Version 1.1.2
- Changed the type of the
InstrumentReferenceproperty of theResponseMessageclass fromUInt32(uint) toUInt64(ulong) - Added support for issuing a single request for all request classes, aka "wildcard" requests
- Added new fields
- Upgraded to the latest stable versions of the
System.BuffersandSystem.Memorydependencies - Installed the
System.Collections.Immutablepackage to be able to use theImmutableHashSet<T>type internally - Decreased the soft limit of instrument references to the correct value of 1,000,000.
DataTypes Version 1.0
v1.0.0-datatypes Added implementations of the Millistream data types.
Version 1.1.1
Added macOS support and some new fields and message references.