Versioning and changelog
Versioning
The library's version is its assembly Version / FileVersion (2.2.0 / 2.2.0.0), shown on this site and in the
DLL's file properties. It is versioned independently of the ViiSync server.
Library releases add members, enum values and return codes and remove nothing, and every enum keeps MT5's names and numeric values.
Wire protocol: Current and Supported
The library and the server also share a wire protocol version, checked at login the way an MT5 server checks a terminal's build:
- The server has a Current protocol version (what it speaks) and a list of Supported versions (what it still
accepts). Both are shown on the server's
/versionendpoint (protocolVersion,supportedProtocolVersions) and in its ops status. - The library announces its protocol version in the login. If that version is not in the server's Supported list — or
the library is so old that it announces none — the server refuses the login with
OLD_VERSION and closes the connection.
Connectthrows aConnectExceptionwhoseCodeisOLD_VERSIONand whose message names the version to update to. Auto-reconnect does not retry it: only updating the library fixes it. - The check runs both ways: a server whose protocol this library does not support is refused with
OLD_VERSIONtoo. - A version that is Supported but not Current connects normally and sets UpdateAvailable: a newer library is available.
- Every change to the wire format bumps Current. Every few releases the server drops the oldest entries from Supported; the release notes list the versions dropped. Update the library before its version leaves the list.
This library speaks protocol 2.0: every message is binary (ViiWire), none is JSON. Current servers are
Current = 2.0, Supported = [2.0], so 2.0 is the only version they accept. Protocol 1.x libraries (every library before
2.0.0 — 1.2.0 spoke 1.1, older ones 1.0) are refused with OLD_VERSION; update to 2.0.0. Likewise this library refuses a
1.x server with OLD_VERSION, so update the library and the server together.
The server may still add features within a protocol version; the library adapts to what the server supports:
- Servers that answer trade commands with typed results let trade calls run concurrently and support close-by and
NO_CHANGES. Against an older server the library falls back to its legacy path, where trade calls are serialized; the API behaves the same. SupportsTypedTradeResults tells you which one you are talking to. - ServerVersion is the server's release.
This site documents version 2.2.0.
Changelog
2.2.0 (2026-11-05)
Access servers (Connecting through access servers):
tls://host:portaddresses connect over TCP with TLS, the fastest transport for .NET. The server's certificate is checked against the machine's trusted roots and the host name, which is also sent as SNI, over TLS 1.2 or 1.3.tcp://host:portis plain TCP, for development and internal networks only.- A new constructor takes a list of access points.
AccessPoints and
CurrentAccessPoint show the list and the access point in use. Every
connect and every automatic reconnect measures the TCP connect time of each access point (about 300 ms at most),
connects to the fastest and fails over to the next when a connect fails.
INVALID_ACCOUNT,OLD_VERSIONandTOO_FREQUENT_REQUESTare not retried on another access point. - AccessPointPolicy decides whether the access points the server
advertises are added, in the transport the client was given. The default,
Auto, adds them only when the client connects through access servers (an access-point list or atls://address was given, or the address it connected to is an advertised one), so a client connected straight to the server stays on its own address.AlwaysandNeverdo what they say. UseServerAccessPoints is the same setting as a switch (false=Never,true=Auto). - ConfigureTls customises the TLS options of
tls://connections, such as certificate validation or a client certificate.
Unchanged: the
(host, port)constructor,ws://andwss://URLs, a single address (connected directly, without probing), the wire protocol (2.0) and the rest of the API, including OrderClientSafe.When several access points are configured (more than one address given, or the server advertised more), two connect details change, so that a broken access point costs no time:
- A connection the server closes before answering the login fails that attempt at once with
NO_CONNECTION, and the library moves on to the next access point. With one address the connect still waits for the 10 s login timeout and fails withOPERATION_TIMEOUT. - A connection that drops while a connect is still logging in does not start an automatic reconnect. The
Connectcall reports the failure, or fails over. With one address the automatic reconnect still starts, as in 2.0.
A client with one address behaves exactly as with 2.0.
- A connection the server closes before answering the login fails that attempt at once with
2.0.0 (2026-09-25)
- Wire protocol 2.0: every message between the library and the server is binary (ViiWire, the server's own compact codec) instead of JSON — smaller and faster to encode and decode (a quote is 60 bytes instead of 146). The public API is unchanged: the same types, members, events and return codes — swap the DLL and rebuild.
- Servers speak protocol 2.0 only (Supported = [2.0]): libraries before 2.0.0 are refused with
OLD_VERSION, and this library refuses a protocol 1.x server withOLD_VERSION. Deploy the 2.0.0 DLL together with the server upgrade. - Still one file,
ViiSync.AccountApi.dll, for .NET 8 and .NET 10, with no other dependency (the codec is compiled in).
1.2.0 (2026-09-25)
- Wire protocol 1.1: the library announces its protocol version at login. A server that no longer supports it refuses
the login with the new return code
OLD_VERSION(not retried by auto-reconnect); a supported but older version sets UpdateAvailable. Libraries before 1.2.0 cannot connect to protocol 1.1 servers. - History arrives in the compact binary form only (bars, ticks and deals).
DownloadOrderHistorymakes one request for a typical week and no longer downloads all older history to find where positions closed in the window were opened: the server returns those opening deals with the window. Large windows are paged transparently.
1.1.0 (2026-09-25)
- OrderClientSafe: connection-safe trading.
- ProcessEventTimeoutMs event-handler watchdog and SlowEventHandlers.
- TradeType: the MT5 trade action behind each update, including server actions.
- Order and the InProcess and Price progress stages.
- DealTicket, UpdateTime, BkgndColor.
- New return codes:
NO_CHANGES,OPERATION_CANCELED(a cancelled token sends nothing),TOO_FREQUENT_REQUEST(login locked out by the server's brute-force guard; auto-reconnect keeps retrying). - CalculateEquityHistory converts at the historical rate of each sample.
ConnectProgress.SendAccountPassword.- Investor (read-only) logins, symbol trade modes (long / short / close only), filling-policy checks and market-order
deviation (
REQUOTE). - Swaps charged at the server rollover when the server enables them; MT5 deal types and reasons.
- MT5 coverage: 774 of 894 applicable members fully covered (86.6 %), none missing.
1.0.0
First release.