Namespace ViiSync.AccountApi
Classes
- AccountRec
Account record (MT5
AccountRec).
- BalancePoint
A balance-history sample (MT5
BalancePoint).
- Bar
An OHLC bar (MT5
Bar). ViiSync stores M1 bars; other timeframes are aggregated client-side exactly as the MT5 terminal aggregates them.
- BookBar
One market-depth level (MT5
BookBar).
- Comission
One commission tier (MT5
Comission). ViiSync charges a flat per-lot commission on every deal.
- ComissionInfo
A symbol's commission definition (MT5
ComissionInfo).
- ConnectEventArgs
Connection progress payload (MT5
ConnectEventArgs).
- ConnectException
Connecting or logging in failed (MT5
ConnectException).
- DealInternal
A deal — one immutable execution-ledger row (MT5
DealInternal).
- EquityPoint
An equity-history sample (MT5
EquityPoint).
- Expiration
Pending-order expiration (MT5
Expiration).
- InvalidSymbolException
The symbol is not in the account's catalog (MT5
InvalidSymbolException).
- InvestorModeException
A trade call on a read-only (investor) session (MT5
InvestorModeException).
- MailMessage
A mailbox message (MT5
MailMessage) — a ViiSync bulletin.
- MarketWatch
Daily market statistics for a symbol (MT5
MarketWatch), built from today's M1 bars and the live quote.
- NotEmittedByViiSyncAttribute
Marks an enum member (or member) that exists for source compatibility with MT5 code but that ViiSync never produces. The coverage matrix (docs/client-library/mt5-coverage.md) scores such members as PARTIAL.
- Order
The MT5 "order" view (MT5
Order): an open position, a working pending order, or a closed trade (history). Ticket is the position id for positions/closed trades and the order id for pending orders.
- OrderClientSafe
Connection-safe trading (MT5
OrderClientSafe): the same OrderSend / OrderClose / OrderModify / OrderDelete as ViiSyncAccountApi, but a call that loses its connection (NO_CONNECTION) or its answer (REQUEST_TIMEOUT) does not simply fail: the wrapper waits — up to TradeTimeoutSafe — for the API to be connected again, then settles the outcome from the server's state:- OrderClose / OrderDelete / OrderModify are idempotent on their target: if the position is gone / the order is no longer working / the levels are already in place, the call succeeded; otherwise it is sent once more.
- OrderSend is never re-sent (a second open would double the exposure): the new position or pending order is looked up by symbol, type, volume, magic and comment among the tickets that did not exist before the call; if the server has none, the original exception is thrown.
Refusals (NO_MONEY, INVALID_VOLUME, …) are not connection failures and are thrown at once, as by the API.
- OrderHistoryEventArgs
Result of an order-history download (MT5
OrderHistoryEventArgs).
- OrderInternal
An order record (MT5
OrderInternal): pending or market, working or historical.
- OrderProgress
Progress of one trade request (MT5
OrderProgress).
- OrderUpdate
A change to the account's orders/positions (MT5
OrderUpdate), raised byOnOrderUpdate.
- Pagination
Pages a list of orders for display (MT5
Pagination).
- ServerException
A server-side failure carrying an MT5 return code (MT5
ServerException).
- ServerRec
Server identity (MT5
ServerRec).
- Session
One trading/quoting window, minutes from midnight (UTC for ViiSync).
- SymBaseInfo
Account-wide symbol settings (MT5
SymBaseInfo).
- SymGroup
Per-symbol trade settings (MT5
SymGroup). In ViiSync these are fields of the symbol itself; this view presents them in MT5's shape. Volumes:*Volumein MT5 units (1e-8 lot),*Lotsin lots.
- SymbolBook
A symbol's order book keyed by price (MT5
SymbolBook).
- SymbolInfo
Instrument specification (MT5
SymbolInfo) plus ViiSync extras.
- SymbolSessions
Weekly quote and trade sessions of a symbol (index 0 = Sunday … 6 = Saturday). A symbol without time limits has one 00:00–24:00 window per day.
- SymbolUpdate
A symbol catalog change (MT5
SymbolUpdate).
- Symbols
The account's symbol catalog (MT5
Symbols), kept current from the engine's symbol pushes.
- TickBar
One historical tick (MT5
TickBar).
- TradeRequest
A trade request as sent (MT5
TradeRequest).
- TradeResult
The server's typed answer to a trade request (MT5
TradeResult).
- ViiSyncAccountApi
The ViiSync trading-account API, shaped like mtapi.io's
MT5APIso MT5 integrations port with minimal change: the same constructor (login, password, host, port),Connect,OrderSend/OrderClose/OrderModifywith MT5's parameter lists and enums,Symbols.Infos,GetQuote,OnQuote,OnOrderUpdate, theAccount*figures and the history downloads. Every blocking call has an…Asynctwin.Differences a porting developer should know: times are UTC (ViiSync's server clock is UTC, MT5 servers are usually UTC+2/+3); tickets are 64-bit ids issued by ViiSync; failures throw ServerException with MT5 return codes (Msg). State (positions, pending orders, account figures, symbols) is kept current from the engine's pushes, so reading GetOpenedOrders(OrderSort, bool) or AccountEquity costs no round trip.
- VolumeUnits
Volume units: like MT5,
Volumefields count 1/100 000 000 of a lot;Lotsfields are lots.
Structs
- MarketDepthEventArgs
Depth event payload (MT5
MarketDepthEventArgs).
- OrderProgressEventArgs
Compact progress notification (MT5
OrderProgressEventArgs).
- QuoteHistoryEventArgs
Bars delivered by
OnQuoteHistory(MT5QuoteHistoryEventArgs).
- TickHistoryEventArgs
Ticks delivered by
OnTickHistory(MT5TickHistoryEventArgs).
Enums
- AccMethod
Account margin accounting mode.
- BookBarType
Market-depth level side.
- CalculationMode
Symbol profit/margin calculation mode.
- CommissionPeriod
Commission charging period.
- CommissionType
Commission charging model.
- ConnectProgress
Connection progress (OnConnectProgress).
- DealType
Deal (ledger row) type.
- Direction
DEAL_ENTRY: what a deal did to its position.
- EquityTimeframe
Sampling step of CalculateEquityHistory.
- ExecutionType
Symbol execution mode.
- ExpirationFlags
Allowed expiration modes of a symbol.
- ExpirationType
Pending-order time in force.
- FillPolicy
Order filling policy (ORDER_TYPE_FILLING). Validated against the symbol's allowed filling (UNSUPPORTED_FILLING_MODE); every ViiSync client fill is all-or-nothing, so FOK and IOC are honoured by construction.
- FillingFlags
Allowed filling policies of a symbol.
- GTCMode
Good-till-cancelled handling of pending orders.
- InstantCommissionType
Which deals an instant commission is charged on.
- MarginMode
Symbol margin mode.
- Msg
Return codes (MT5 numbering). Trade results use the 10xxx trade-server codes; see ServerException.Code.
- OrderSort
Sort key for order lists.
- OrderState
Order lifecycle state (ViiSync: Placed → PartiallyFilled → Filled, or Cancelled / Rejected / Expired).
- OrderType
MT5 order / position type. Market positions are Buy/Sell; pending orders the Limit/Stop/StopLimit kinds.
- PlacedType
Who/what placed the order (ORDER_REASON).
- ProgressType
Progress of a trade request (OnOrderProgress).
- SwapType
Swap calculation mode.
- TradeMode
Symbol trade permission.
- TradeType
MT5 trade action. Accepted for source compatibility; the action is inferred from the order type.
- UpdateAction
Symbol catalog change kind.
- UpdateType
What an OnOrderUpdate event describes.
- V3DaysSwap
Weekday on which triple swap is charged.
- vCommissionUnitMode
Commission unit mode.
- vCommissionUnitType
Commission unit currency.
Delegates
- OnConnectProgress
Raised at each connection stage.
- OnMail
Raised when a mailbox message arrives (and by MailBodyRequest(long)).
- OnOrderBook
Raised with each order-book update of a subscribed symbol.
- OnOrderHistory
Raised with the result of a fire-and-forget history request.
- OnOrderProgress
Raised at each stage of a trade request.
- OnOrderUpdate
Raised on the API's receive thread when a position, order or deal changes; keep handlers short.
- OnQuote
Raised on the API's receive thread; keep handlers short (MT5 delegates, same shapes).
- OnQuoteHistory
Raised with the bars of a fire-and-forget bar request.
- OnSymbolUpdate
Raised once per changed symbol after the catalog is re-pushed.
- OnSymbolsUpdate
Raised once after a catalog change, after the per-symbol events.
- OnTickHistory
Raised once per page of a tick-history stream.